Skip to content

Add manage:cleanup-leaked-test-features command#104

Open
jirkasemmler wants to merge 1 commit into
mainfrom
jirka/cleanup-leaked-test-features
Open

Add manage:cleanup-leaked-test-features command#104
jirkasemmler wants to merge 1 commit into
mainfrom
jirka/cleanup-leaked-test-features

Conversation

@jirkasemmler

Copy link
Copy Markdown
Contributor

Changes:

  • New command manage:cleanup-leaked-test-features <token> <url> [--force] — one-off deletion of features leaked by connection manage E2E tests. The tests created features with random names and never deleted them (fixed going forward in keboola/connection#7914), so test stacks accumulated tens of thousands of them.
  • Matches features of types admin/project/global whose name starts with one of the test prefixes (test-feature-, manage-feature-test-, random-feature-, new-feature-, first-feature-, second-feature-).
  • Dry-run by default, deletes only with --force; refuses to run against production hosts.
  • Progress output: per-type listing counts, sample of matched features (all with -v), progress line every 100 deletions; exits 1 if any deletion fails.

Already used to clean up the AWS E2E stack (~35k leaked features). Requires a super-admin manage token — with a plain admin token the API silently filters the list to canBeManageByAdmin=1 AND canBeManagedViaApi=1 and leaked features are not visible.


Additional notes

⚠️ Don't forget to release new version after merge

🤖 Generated with Claude Code

One-off cleanup of features leaked by connection manage E2E tests
(tests created randomly-named features and never deleted them; fixed
in keboola/connection#7914). Matches features by test name prefixes,
dry-run by default, refuses to run against production hosts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jirkasemmler
jirkasemmler requested review from a team and martinsifra and removed request for a team July 20, 2026 12:13
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.

1 participant