From 03eed12c3b06f0f551e873814ce1e4c21bdbbdcf Mon Sep 17 00:00:00 2001 From: Kirill Nikolaev Date: Thu, 14 Mar 2024 16:57:35 +0100 Subject: [PATCH] Add a warning for when we can't respect requested retention. --- dist/upload/index.js | 3 +++ src/upload/upload-artifact.ts | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/dist/upload/index.js b/dist/upload/index.js index de3d4c9f..ca3de9fe 100644 --- a/dist/upload/index.js +++ b/dist/upload/index.js @@ -126145,6 +126145,9 @@ function run() { if (inputs.retentionDays) { options.retentionDays = inputs.retentionDays; } + if (inputs.retentionDays && inputs.retentionDays != 30) { + core.warning(`Namespace artifacts storage retains objects for 30 days. retentionDays=${inputs.retentionDays} will not be honored.`); + } if (typeof inputs.compressionLevel !== 'undefined') { options.compressionLevel = inputs.compressionLevel; } diff --git a/src/upload/upload-artifact.ts b/src/upload/upload-artifact.ts index 8c775437..595bf3cd 100644 --- a/src/upload/upload-artifact.ts +++ b/src/upload/upload-artifact.ts @@ -62,6 +62,11 @@ export async function run(): Promise { if (inputs.retentionDays) { options.retentionDays = inputs.retentionDays } + if (inputs.retentionDays && inputs.retentionDays != 30) { + core.warning( + `Namespace artifacts storage retains objects for 30 days. retentionDays=${inputs.retentionDays} will not be honored.` + ) + } if (typeof inputs.compressionLevel !== 'undefined') { options.compressionLevel = inputs.compressionLevel