feat: implement garbage-collect for all providers#9
Merged
frostebite merged 1 commit intorefactor/orchestrator-extractionfrom May 3, 2026
Merged
Conversation
…--garbageMaxAge - AWS: Fix garbageMaxAge wiring (was converted to boolean, now passes actual hours). Fix buggy isOlderThan1day (used getDay() instead of actual age diff). Add dry-run output logging instead of silently skipping. Return summary of actions taken. - K8s: Implement garbage collection — cleans up completed/failed jobs, orphaned pods, build-credentials secrets, and service accounts older than maxAge. Respects --dry-run and --filter flags. - Docker: Implement garbage collection — removes stopped unity containers, prunes dangling images (or all unity images with --fullCache), and removes orchestrator volumes. Respects --dry-run and --garbageMaxAge. - CLI: Wire --garbageMaxAge from CLI options into the garbage-collect command (was previously ignored, always passed 0). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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
Implements proper garbage collection for all main providers, fixes
--garbageMaxAgewiring, and ensures--dry-runworks correctly.garbageMaxAge(was converted to a boolean, now passes actual hours). Fixed buggyisOlderThan1daywhich usedgetDay()(returns 0-6) instead of computing actual age. Added dry-run output logging and returns a summary of actions taken.build-credentials-*secrets, andservice-account-*service accounts older than maxAge. Respects--dry-runand--filter.--fullCache), and removes orchestrator volumes. Respects--dry-runand--garbageMaxAge.--garbageMaxAgefrom CLI options into the garbage-collect dispatch (was previously ignored, always passed 0).Addresses feedback from game-ci/documentation#541 (review comment about safety/confirmation).
Test plan
game-ci garbage-collect --provider-strategy aws --dry-runshows what would be deleted without deletinggame-ci garbage-collect --provider-strategy aws --garbageMaxAge 48only targets resources >48h oldgame-ci garbage-collect --provider-strategy k8s --dry-runlists stale jobs/pods/secretsgame-ci garbage-collect --provider-strategy local-docker --dry-runlists stale containers/images🤖 Generated with Claude Code