Skip to content

Report agent cleanup read failures - #256

Merged
gilesknap merged 1 commit into
mainfrom
fix/delete-agent-errors
Sep 13, 2026
Merged

gilesknap merged 1 commit into
mainfrom
fix/delete-agent-errors

Conversation

@gilesknap

Copy link
Copy Markdown
Member

Summary

  • preserve Kubernetes read failures while discovering managed ServiceAccounts and token Secrets
  • report the failed operation together with namespace, identity and context
  • require final ServiceAccount verification to succeed before reporting cleanup complete
  • retain the successful nothing to delete result for a genuinely empty list

Validation

  • focused fake-kubectl checks: forbidden discovery exits 1 with identity/context; successful empty discovery exits 0
  • bash -n k8s/delete-agent-sa.sh
  • git diff --check
  • uv run --locked tox -e pre-commit

No live Kubernetes objects were deleted during validation.

Fixes #133.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

This 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 0239b283-6544-4acb-a551-409d001fd453

📥 Commits

Reviewing files that changed from the base of the PR and between 54938f8 and 2858c03.

📒 Files selected for processing (1)
  • k8s/delete-agent-sa.sh

Comment @coderabbitai help to get the list of available commands.

@gilesknap
gilesknap merged commit b12975f into main Sep 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

delete-agent-sa.sh reports 'nothing to delete' when it cannot list ServiceAccounts

1 participant