Reclaim artifact storage after each prebuilt run - #10
Merged
Conversation
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.
Ports the
reclaimjob from unslothai/llama.cppunsloth-prebuilt.yml, which this pipeline was copied from without it, and setsretention-dayson the upload steps that had none.Why
Nothing in this repo ever deleted a build artifact. Measured 2026-08-11: 168 live artifacts, 13.49 GiB across 27 runs, whose binaries were already published as release assets. llama.cpp has cleaned up after itself for a while; this repo inherited the pipeline before that job existed.
Two independent gaps caused it:
DELETEcalls in any workflow.retention-dayson 2 of 5 upload steps. The rest inherited the 90-day default, which is why artifacts from early July were still alive and set to expire in October.What this adds
reclaimjob (needs: [resolve, assemble],if: always()), ported with its gates intact:sd-<tag>-bin-<label>and assemble publishes<name>.zip, so the match is exact and fixed-string. Anything unmatched is KEPT.runs/$GITHUB_RUN_ID/artifactsis ever listed, so the job cannot reach a concurrent builds artifacts.always()rather than gating onpublishedis deliberate: apublish:falsedispatch and a cancelled run are exactly the cases that leaked in llama.cpp before.continue-on-error: truethroughout, so cleanup can never fail a published release.assemble.outputs.published- set only aftergh release edit --draft=falselands, soreclaimcan tell "these are now release assets" from "nothing will ever read these".retention-days: 7added to the 3 upload steps that lacked it, matching the two that already set it.Note on the full-set fallback artifact
unsloth-sd-prebuilt-<tag>(the "Upload full set (artifact fallback)" step) does not match any release asset name, so the published path keeps it - it was the single largest artifact at 1.38 GiB. That is llama.cpps conservative rule: never delete something that is not provably on the release. Withretention-days: 7it now ages out in a week instead of 90 days. If it is genuinely redundant once the release is up, deleting it explicitly would be a cheap follow-up, but that is a behaviour change I did not want to make silently.Verification
unsloth-sd-prebuilt.ymlparses as YAML; job graph isresolve, build-unix, build-linux-cuda, build-windows, assemble, reclaim.reclaimhaspermissions: actions: write, contents: readand both steps.retention-days.master-813-bfbef5b-uff6b225release: every bundle is<artifact name>.zip.Test plan
publish:falseand confirm the unpublished path deletes the runs artifacts