Repository navigation
fix(sysext): warn, do not fail, when a pruned payload is not deleted - #105
Merged
Merged
Conversation
The metadata is already live when the delete step runs, and a pruned payload that stays in the bucket costs storage, nothing else. Each payload the step cannot or must not delete is now a ::warning::, followed by 1 summary warning and 1 line in $GITHUB_STEP_SUMMARY; the step exits 0. A missing input or a malformed pruned-report line still fails before any delete (ADR-0019).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Author
Cross-review record
Tests: Checks: |
bketelsen
approved these changes
Nov 14, 2026
7 tasks done
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
Follow-up to #104 (ADR-0019, issue #102).
scripts/delete-pruned-payloads.shruns after the guarded metadata is live. A pruned payload that it cannot delete (a faileddelete-object, an unreadable live manifest, a missing local manifest), or must not delete (a live manifest still lists it), stays in the bucket. That costs storage, nothing else: no manifest lists it, or it is listed and must stay. Until now each such object was::error::and the step exited 1, so a publish whose packages and metadata were already live went red.Now:
::warning::that names the key;N pruned sysext payload object(s) were not deleted from s3://… (M deleted); …) and appends the same line to$GITHUB_STEP_SUMMARYwhen it is set;Unchanged: a missing input or a malformed pruned-report line still fails the step before any delete, and the delete rule itself (delete only when neither the live nor the local manifest lists the payload) is the same.
Checks
make checkscope:make verifygreen locally (tidy, vet, gofmt, lint at the mise pin, docs integrity, unit tests)make ci—make verify vuln test-race build-crossgreen locally; the Docker-built packages and the integration suite run in CI (no Docker on this host)Risk tier
Rationale: the PR touches the L1 path
scripts/delete-pruned-payloads.sh(publication: the pruned-payload delete). Safe: no condition for a delete changes, so no object can be deleted that was kept before; only the exit status and the annotation level of an object that is not deleted change, and input or report errors still stop the step before any delete.Docs housekeeping
docs/design/ci-cd.mdstep 10 updatedVerification
node scripts/check-docs.mjsgreen (insidemake verify)internal/releaseasset/sysext_write_guard_test.go):TestDeletePrunedPayloadsWarnsOnDeleteFailure(warning, summary warning, exactly 1 step-summary line, exit 0, object kept; a malformed report still fails and writes no summary), and the refusal cases inTestDeletePrunedPayloadsOnlyAfterMetadataIsLiveandTestDeletePrunedPayloadsNeverAfterFailedMetadataWritenow expect a warning and exit 0, with the object kept.TestDeletePrunedPayloadsWarnsOnDeleteFailure,TestDeletePrunedPayloadsOnlyAfterMetadataIsLiveandTestDeletePrunedPayloadsNeverAfterFailedMetadataWritefail.GITHUB_STEP_SUMMARYto a temporary file, so a CI run never writes to the job's real summary.