Repository navigation
Let ec delete finish when the service's entry is already gone - #273
Merged
Merged
Conversation
del_key let the YamlFileError from remove_key escape when the key was already absent from values.yaml (e.g. removed by a direct commit while the Argo CD app still existed), so ec delete crashed with a traceback and never reached the parameter unset and root app refresh that let Argo CD prune the app. An absent key now makes no commit and logs a one-line note, and push_remove_key carries on with the unset and refresh. A missing intermediate segment raises GitError with nothing written, as in set_value/set_values. A service Argo CD does not know is still refused by _check_service. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013HgLeGnwBSg3Xx1VgxEpt8
Contributor
|
Warning Review limit reachedThis review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Next included review available in 12 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Comment |
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.
Summary
ec delete <svc>on a service whoseservices.<svc>entry is already gonefrom the deployment repo's
apps/values.yaml(removed by a direct commit whilethe Argo CD Application still exists) crashed with a raw traceback:
del_keycaught onlyFileNotFoundError/ShellError, so the error escapedpush_remove_keybefore itsargocd app unsetandargocd app get <root> --refreshsteps - the refresh is what lets the root app prune the orphanedchild Application.
WARNING: services.<svc> already absent from apps/values.yaml - no commit made,and
push_remove_keygoes on to the unset and refresh.services:at all) raisesGitErrorwith nothing written, the same as
set_value/set_valuessince Stop ec deploy and ec start writing enabled: true #271._check_service.Test plan
tox -e pre-commit,type-checking,tests- 149 passed; the 3 new tests(
test_del_key_already_absent_makes_no_commit,test_del_key_missing_parent_raises,test_delete_already_absent_still_refreshes) fail without the fixargocdagainst a bare repo seeded from theb01-1-deployment
apps/values.yaml: delete of a present entry isunchanged; delete of an already-removed entry exits 0, makes no commit,
and runs
app unset+app get <root> --refresh(5.5.0: traceback,exit 1, neither ran); delete of a service not in Argo is still refused
🤖 Generated with Claude Code
https://claude.ai/code/session_013HgLeGnwBSg3Xx1VgxEpt8