ci(release): cap dist-* build-artifact retention at 2 days#953
ci(release): cap dist-* build-artifact retention at 2 days#953dev-punia-altimate wants to merge 2 commits into
Conversation
The per-platform dist-* artifacts are intra-run couriers: the publish and gh-release jobs download them within the same release run, after which the binaries live permanently as npm packages and GitHub Release assets (which do NOT count against the Actions artifact storage quota). With no retention set they inherited the org 90-day default and accumulated to ~90 GB across releases back to March — single-handedly exhausting the shared org artifact-storage quota and failing artifact uploads in other repos (e.g. altimate-ingestion). 2 days is plenty to span a release run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWgwuud3NLX8fdZp581v5y
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
📝 WalkthroughWalkthroughThe release workflow's build job artifact upload step gains a ChangesRelease Workflow Artifact Retention
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWgwuud3NLX8fdZp581v5y
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 133-135: In the .github/workflows/release.yml file, locate the
retention-days configuration (currently set to 5) and change the value from 5 to
2 to align with the PR objective and address the organization's artifact storage
quota concerns mentioned in the comment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 757107d3-492b-4176-a400-799e084f94ad
📒 Files selected for processing (1)
.github/workflows/release.yml
| # the run (worst run ~62 min) plus margin for a next-day partial re-run, | ||
| # so they don't accumulate against the org artifact-storage quota. | ||
| retention-days: 5 |
There was a problem hiding this comment.
Set retention to the intended 2 days (not 5).
Line 135 conflicts with the stated PR objective (retention-days: 2). Given prior org-wide quota exhaustion and CreateArtifact failures, this value mismatch should be corrected in this PR.
Suggested fix
- retention-days: 5
+ retention-days: 2📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # the run (worst run ~62 min) plus margin for a next-day partial re-run, | |
| # so they don't accumulate against the org artifact-storage quota. | |
| retention-days: 5 | |
| # the run (worst run ~62 min) plus margin for a next-day partial re-run, | |
| # so they don't accumulate against the org artifact-storage quota. | |
| retention-days: 2 |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/release.yml around lines 133 - 135, In the
.github/workflows/release.yml file, locate the retention-days configuration
(currently set to 5) and change the value from 5 to 2 to align with the PR
objective and address the organization's artifact storage quota concerns
mentioned in the comment.
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/release.yml">
<violation number="1" location=".github/workflows/release.yml:135">
P2: The PR title says "cap dist-* build-artifact retention at 2 days" and the Risks/Rollout sections reference a "2-day window," but this line sets `retention-days: 5`. If 5 days is intentional (as the inline comment and description body suggest), the PR title and rollout notes should be updated to avoid confusion. If 2 days was the actual intent, the code is wrong.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| # packages + GitHub Release assets. Keep them only long enough to span | ||
| # the run (worst run ~62 min) plus margin for a next-day partial re-run, | ||
| # so they don't accumulate against the org artifact-storage quota. | ||
| retention-days: 5 |
There was a problem hiding this comment.
P2: The PR title says "cap dist-* build-artifact retention at 2 days" and the Risks/Rollout sections reference a "2-day window," but this line sets retention-days: 5. If 5 days is intentional (as the inline comment and description body suggest), the PR title and rollout notes should be updated to avoid confusion. If 2 days was the actual intent, the code is wrong.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.yml, line 135:
<comment>The PR title says "cap dist-* build-artifact retention at 2 days" and the Risks/Rollout sections reference a "2-day window," but this line sets `retention-days: 5`. If 5 days is intentional (as the inline comment and description body suggest), the PR title and rollout notes should be updated to avoid confusion. If 2 days was the actual intent, the code is wrong.</comment>
<file context>
@@ -130,8 +130,9 @@ jobs:
- retention-days: 2
+ # the run (worst run ~62 min) plus margin for a next-day partial re-run,
+ # so they don't accumulate against the org artifact-storage quota.
+ retention-days: 5
# ---------------------------------------------------------------------------
</file context>
❌ Tests — Failures DetectedTypeScript — 15 failure(s)
Next StepPlease address the failing cases above and re-run verification. |
🤖 Code Review — OpenCodeReview (Gemini) — No Issues FoundNo supported files changed. |
Why
The Release workflow's per-platform
dist-*artifacts (actions/upload-artifact, noretention-daysset) were inheriting the org's 90-day default and piling up to ~90 GB across releases dating back to March 20 — single-handedly exhausting the shared org Actions artifact-storage quota and causingFailed to CreateArtifact: Artifact storage quota has been hitfailures in other repos (e.g. altimate-ingestion PR builds).These artifacts are spent intra-run couriers
dist-*only exists to hand the compiled binaries from the build matrix to the publish/release jobs within the same run. Job chain (noenvironment:/approval gates — verified):After the run, the binaries live permanently in two places, neither of which is an Actions artifact and neither counts against the storage quota:
npm publishuploads an immutable copy; npm never references the GitHub artifact again.*.tar.gz/*.zip+checksums.txt; these carry real download counts (v0.8.0 linux-x64 = 200, v0.8.7 darwin-arm64 = 179), proving this is the actual distribution path the installers use.Org-wide code search confirmed nothing downloads
dist-*cross-run or cross-repo.Why
retention-days: 5is safe (evidence)The artifact only needs to survive one release run. Measured durations of recent runs:
5 days → ~116x margin over the worst-ever run (62 min), ~480x over typical. Bumped from an initial 2 days to give comfortable headroom for re-running a partial publish/release job days later without a full rebuild.
Residual risk (accepted): re-running only the
publish-npm/github-releasejob >2 days after the build would find the artifact expired — fix is to re-run the whole release (rebuildsdist-*), which is normal practice.Cleanup already done
Separately deleted the existing backlog: 324
dist-*artifacts older than June 1 (74.3 GB) via the API. altimate-code live artifact storage dropped 90.73 GB → 16.40 GB, bringing the org back under the storage quota (after GitHub's 6–12h usage recalc).🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes