Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ to GitHub's blob store. This action writes to devino instead.
artifacts of the run, and extracts safely into `path`.

Retention is enforced by bucket lifecycle rules: `retention-days` is rounded
up to 1/3/5/7/14/30 days and stored as an object tag; anything else expires
after 90 days.
up to 1/3/5/7/14/30/90 days and stored as an object tag (values above 90 are
capped at 90). When `retention-days` is not set the artifact expires after
14 days, which matches how the org's test reports and screenshots are used.

## Inputs

Expand Down
4 changes: 2 additions & 2 deletions lib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
DEFAULT_AUDIENCE = "storage.devino.ca"
# Lifecycle rules on the bucket expire objects tagged retention=<N> after N
# days; untagged objects expire after 90 days (same default as GitHub).
RETENTION_BUCKETS = [1, 3, 5, 7, 14, 30]
RETENTION_BUCKETS = [1, 3, 5, 7, 14, 30, 90]
GLOB_CHARS = set("*?[")


Expand Down Expand Up @@ -355,7 +355,7 @@ def retention_tag(days):
for b in RETENTION_BUCKETS:
if n <= b:
return b
return None # > 30 days: bucket default (90)
return RETENTION_BUCKETS[-1] # > 90 days: cap at the longest rule


def do_upload():
Expand Down
2 changes: 1 addition & 1 deletion upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inputs:
description: "warn | error | ignore"
default: warn
retention-days:
description: "Days to keep the artifact (1-90). Rounded up to 1/3/5/7/14/30; anything above 30 keeps the 90-day default."
description: "Days to keep the artifact. Rounded up to 1/3/5/7/14/30/90 (capped at 90); unset means 14 days."
default: ""
compression-level:
description: "gzip level 0-9"
Expand Down
Loading