Further deployment cleanup to drain all ghcr-ci entries#4337
Open
mitchdz wants to merge 5 commits intoNVIDIA:mainfrom
Open
Further deployment cleanup to drain all ghcr-ci entries#4337mitchdz wants to merge 5 commits intoNVIDIA:mainfrom
mitchdz wants to merge 5 commits intoNVIDIA:mainfrom
Conversation
Signed-off-by: mdzurick <mitch_dz@hotmail.com>
Signed-off-by: mdzurick <mitch_dz@hotmail.com>
1. github.paginate() → github.paginate.iterator() — streams one page
at a time instead of loading 76K deployments into memory
2. Promise.all → Promise.allSettled — partial failures don't crash the
batch; counts successes and stops when rate-limited
3. BATCH 100 → 50 — stays within GitHub's secondary rate limit (~100
concurrent API calls)
4. Fixed indentation — object properties now indented properly
relative to their braces
5. response.data — iterator yields response objects, so .data is used
correctly to access the deployment array per page
Signed-off-by: mdzurick <mitch_dz@hotmail.com>
- No pagination at all. Fetches page 1 repeatedly with listDeployments
(50 items per call). After deleting those, the next fetch returns
the next batch since the old ones are gone.
- Capped at 200 deletions per run (MAX_PER_RUN). Uses ~408 API calls
per environment per run, well within the 15,000/hour budget shared
with CI.
- Still uses Promise.allSettled so a single 403 doesn't crash the
step. Stops gracefully on partial failures.
Signed-off-by: mdzurick <mitch_dz@hotmail.com>
Signed-off-by: mdzurick <mitch_dz@hotmail.com>
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
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.
listDeploymentsreturns 30 results by default. The cleanup jobdeleted one page per cron tick, but ghcr-ci deployments accumulate
faster than that (~14 per CI run). Old deployments were never fully
drained, leaving "temporarily deployed to ghcr-ci" entries on PR
timelines indefinitely.