Repository navigation
Stop ec deploy and ec start writing enabled: true - #271
Conversation
The argocd-apps chart defaults a service to enabled and only acts on an
explicit enabled: false. ec deploy and ec start --commit now remove the
service's enabled key instead of writing enabled: true, so apps/values.yaml
stays free of redundant flags. ec stop --commit still writes enabled: false.
A service mapping emptied by the removal is written as {}.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015CNJRqN3sP4tk4gXcWP12y
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughValues updates can now remove YAML paths and clear matching Argo CD overrides. YAML serialization is validated before writes, and key removal preserves surrounding comments. Deploy and committed start remove the service’s explicit ChangesService override removal
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant ArgoCommands
participant push_values
participant set_values
participant ValuesRepository
participant ArgoCDOverrides
ArgoCommands->>push_values: Pass enabled key for removal
push_values->>set_values: Pass remove_keys
set_values->>ValuesRepository: Remove YAML paths
push_values->>ArgoCDOverrides: Unset removed-key overrides and child overrides
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete merge-blocking issue is identified. The described changes remove redundant enabled flags while retaining explicit stop behavior and guarding invalid YAML writes. Merge after normal checks pass. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change preserves existing deployment authority and adds safeguards against invalid YAML and updates to missing services. No introduced security finding was established. Remaining uncertainty concerns configuration convergence after interruption and compatibility with the deployed chart. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 27.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 40 functions across 5 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
set_values treated a missing intermediate path segment (e.g. an absent services.<svc> entry) the same as a genuinely-absent leaf key, so ec deploy/ec start --commit on a service never added to the deployment repo's values.yaml committed nothing and reported success whenever the requested version matched the revision line. Add YamlPathNotFoundError to distinguish the two cases in YamlFile.set_key/remove_key, and raise GitError from set_values when one is hit - restoring the 5.4.1/5.5.0b1 behaviour of failing clearly instead of silently succeeding. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015CNJRqN3sP4tk4gXcWP12y
Removing the last key of a service entry whose first body line is a
comment (a commented-out pin above the live one) left ruamel emitting
`{}` at column 0 after the comment - unparseable YAML that ec committed
and pushed. An emptied mapping is now replaced by a fresh one, which
keeps the comment and emits valid YAML.
Removing a key also took the comment and blank lines that follow it
with it, deleting section headers such as i19's "# DAQ services ..."
when the service above them was deployed. Those lines now move to
whatever precedes the removed key; only the removed line's own
end-of-line comment goes with it.
YamlFile.dump_file parses the YAML it produces before writing it and
refuses to write anything that does not parse, so set_value, set_values
and del_key raise GitError and commit nothing.
set_value (ec stop --commit) on a service missing from values.yaml now
raises the same GitError as deploy and start --commit instead of a raw
YamlPathNotFoundError traceback.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015CNJRqN3sP4tk4gXcWP12y
The argocd-apps chart defaults a service to enabled and only acts on an explicit
enabled: false.ec deployandec start --commitremove the service'senabledkey instead of writingenabled: true, so a deployment repo'sapps/values.yamlstays free of redundant flags.ec stop --commitstill writesenabled: false. A service mapping emptied by the removal is written as{}(the schema rejects null).set_values()/push_values()gain aremove_keysparameter, generalising the existing redundant-targetRevisionremoval.Writes to
apps/values.yaml:ec deploy/ec start --commit/ec stop --commiton a service with noservices.<name>entry raise a clearGitErrorand commit nothing.set_valuesdistinguishes a missing intermediate path segment (the service itself absent) from an absent leaf key (nothing to remove).# DAQ services ...stay where they were. Only the removed line's own end-of-line comment goes with it.#targetRevision:above the live pin); the comment is kept above{}.YamlFile.dump_fileparses the YAML it produces before writing; output that does not parse raisesGitErrorand nothing is written, committed or pushed.Tested: full suite (121 passed), ruff, pyright, also the YAML tests under ruamel.yaml 0.19.1; real-CLI end-to-end against scratch copies of b01-1-deployment and i19-deployment with a fake
argocd(41 scenarios: every written values.yaml parses;ec deploy b01-1-tiled mainkeeps#targetRevision: enable-tiled; deployingi19-epics-opis mainkeeps the DAQ section header).🤖 Generated with Claude Code
https://claude.ai/code/session_015CNJRqN3sP4tk4gXcWP12y
Summary by CodeRabbit
enabled: trueoverrides; existingenabledoverrides are removed.