Artifact retention prune utility for recorded retention-days #1

Closed
opened 2026-06-16 17:54:53 +00:00 by stephen · 1 comment
Owner

Why

retention-days is recorded in metadata but never enforced by the action. Operators using local storage or buckets without lifecycle rules need a first-party pruning tool.

Verified

  • README.md says retention-days is recorded but not enforced.
  • src/lib/upload-impl.js writes retentionDays metadata only.
  • No existing upload-artifact-action issues are filed.

Build

  • Add a prune command/script for local and S3 artifact backends.
  • Read metadata, honor retentionDays, and support dry-run/max-age.
  • Add tests for missing metadata and active-run preservation.
## Why `retention-days` is recorded in metadata but never enforced by the action. Operators using local storage or buckets without lifecycle rules need a first-party pruning tool. ## Verified - `README.md` says retention-days is recorded but not enforced. - `src/lib/upload-impl.js` writes `retentionDays` metadata only. - No existing upload-artifact-action issues are filed. ## Build - Add a prune command/script for local and S3 artifact backends. - Read metadata, honor retentionDays, and support dry-run/max-age. - Add tests for missing metadata and active-run preservation.
Author
Owner

Already implemented on main: the retention prune utility shipped in 7276057 (PR #2, merging c9529da). src/prune.js reads each artifact's recorded retentionDays, prunes only entries whose window has elapsed, supports --dry-run and a --force/--max-age fallback for records without a retention window, skips entries with missing/unusable metadata, and preserves fresh runs, with tests. Closing as done; the issue was just never closed at merge time.

Already implemented on `main`: the retention prune utility shipped in `7276057` (PR #2, merging `c9529da`). `src/prune.js` reads each artifact's recorded `retentionDays`, prunes only entries whose window has elapsed, supports `--dry-run` and a `--force`/`--max-age` fallback for records without a retention window, skips entries with missing/unusable metadata, and preserves fresh runs, with tests. Closing as done; the issue was just never closed at merge time.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rasterstate/upload-artifact-action#1
No description provided.