Add ability to have seperate OHIO helm repository configuration. - #41
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The setup script has unresolved repository matching and configuration-safety issues, plus two documentation typos.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds separate Ohio-specific Helm repository configuration to the container setup and documents its use.
Changes:
- Merges
repositories-ohio.yamlwith host Helm repositories. - Handles inferred repository additions and duplicate checks.
- Updates README documentation and AGENTS guidance.
File summaries
| File | Review findings |
|---|---|
setup-container.sh |
Moderate: guard failed yq merges before moving the generated file; handle missing host configuration; use fixed-string exact matching; detect aliases mapped to different URLs. |
README.md |
Nit: add the missing closing quote in the documented Bash command. |
AGENTS.md |
Nit: correct subtantive to substantive. |
Review details
Suppressed comments (2)
setup-container.sh:76
- This duplicate-name check runs
yqeven when${HELM_REPOSITORIES_YAML}does not exist, so projects without host repositories emit a file-not-found error for every dependency. It also treats the generated name as a regular expression, allowing URL metacharacters to cause false matches; guard the missing-file case and use a fixed-string exact match.
if ! yq -r '.repositories[].name' "${HELM_REPOSITORIES_YAML}" | grep -q '^'"${DEPENDENCY_NAME}"'$'; then
setup-container.sh:76
- Checking only whether the generated alias exists silently skips a dependency when that alias is already configured for a different URL. In that case the Chart.yaml URL is never added and Helm dependency resolution can fail or use the wrong repository; compare the existing alias's URL and either choose a collision-free alias or report the conflict instead of skipping it.
if ! yq -r '.repositories[].name' "${HELM_REPOSITORIES_YAML}" | grep -q '^'"${DEPENDENCY_NAME}"'$'; then
- Files reviewed: 3/3 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+57
to
+60
| yq eval-all '. as $repository_config ireduce ({}; . *+ $repository_config)' \ | ||
| "${HELM_REPOSITORIES_YAML}" "${HOST_HELM_REPOSITORIES_OHIO_YAML}" > /tmp/repositories.yaml | ||
| sudo mv /tmp/repositories.yaml "${HELM_REPOSITORIES_YAML}" | ||
| sudo chown vscode:vscode "${HELM_REPOSITORIES_YAML}" |
| DEPENDENCY_NAME=$(echo "${DEPENDENCY}" | sed -r 's/https?:\/\/(.*)/\1/' | sed -r 's/[\,\/]/-/g') | ||
| echo "Adding Helm repository for ${DEPENDENCY_NAME} from current project." | ||
| helm repo add "${DEPENDENCY_NAME}" "${DEPENDENCY}" | ||
| if ! yq -r '.repositories[].name' "${HELM_REPOSITORIES_YAML}" | grep -q '^'"${DEPENDENCY_NAME}"'$'; then |
| Skaffold workflow for changes affecting `Dockerfile`, package installation, entrypoint behavior, | ||
| or tooling versions. | ||
|
|
||
| When subtantive changes to the container are made, instruct the user to rebuild the devcontainer |
| ```bash | ||
| test -d "${HOST_HOME}"/.config/helm || mkdir -p "${HOST_HOME}"/.config/helm | ||
| cp ~/.config/helm/repositories.yaml "${HOST_HOME}/.config/repositories.yaml | ||
| cp ~/.config/helm/repositories.yaml "${HOST_HOME}/.config/helm/repositories.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.