Repository navigation
fix(#9392): keep deleting uninstall vars and secrets after a failure - #9394
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
uninstallRepoResources deleted a repository's fullsend variables and secrets in two loops that returned at the first failed delete, so no name later in either list was attempted. A rerun stopped at the same name for as long as that delete kept failing, leaving every later credential in the repository. Both loops now record each failed delete and continue with the remaining names. The collected errors are joined into the existing errors.Join result, so the repository is still reported as failed and every failed delete is listed. The trigger-token and webhook-secret delete errors keep their redaction via safeAPIError. Vars/secrets counts reflect only successful deletes. New tests wrap forge.FakeClient to fail selected names (first and middle) and assert every name is still attempted, each failure is reported, counts are correct, and webhook credential errors withhold the server text. Note: pre-commit could not fetch remote hook repos (TLS failure in the sandbox). Hooks applicable to the changed Go files were run directly (gofmt, go vet, whitespace/EOF/private-key/merge-conflict checks, gitleaks, broken-symlink lint) and passed. The semgrep hook was skipped because its pinned ruleset could not be downloaded. Closes #9392 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 9:36 PM UTC · Completed 9:43 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.13 |
|
Risk Assessment: moderate (2/5) DetailsSmall, well-tested bug fix by a bot with scope matching issue #9392, with moderate risk driven by high regression churn and change coupling in uninstall.go and modifying existing behavior without a feature flag. |
|
Looks good to me Labels: Go bug fix in the repos uninstall CLI path. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch was previously deployed
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
fullsend repos uninstallnow tries to delete every one of a repository's fullsend variables and secrets, even when one delete fails. Before,uninstallRepoResourcesstopped each delete loop at the first failure, so the remaining credentials stayed in the repository and every rerun stopped at the same name.Changes
internal/repos/uninstall.go: when a variable or secret delete fails, the loop records the error and moves on to the next name. The errors are combined into the existingerrors.Joinresult, so the repository is still reported asFAILEDand every failed delete is listed. Errors from deleting the trigger-token and webhook-secret still go throughsafeAPIError, so the server's error text stays hidden.internal/repos/uninstall_delete_errors_test.go: new tests use a wrappedforge.FakeClientthat fails selected names (the first and a middle one):Testing
go test -race ./internal/repos/passespre-commititself could not fetch its hook repos in the sandbox (TLS failure), and the semgrep hook did not run because its pinned ruleset could not be downloaded.🤖 Generated with Claude Code
Closes #9392
Post-script verification
agent/9392-uninstall-continue-deletes)edc87cff31da34689be418a8b5ae5256502e8422..HEAD)