diff --git a/backend/src/cache/server/mutation.go b/backend/src/cache/server/mutation.go index 899cdcdef3..de59dae388 100644 --- a/backend/src/cache/server/mutation.go +++ b/backend/src/cache/server/mutation.go @@ -220,6 +220,7 @@ func generateCacheKeyFromTemplate(template string) (string, error) { "volumeMounts": nil, }, "inputs": nil, + "outputs": nil, // Output artifact/parameter names and paths are important and need to be considered. We can include the whole section since Argo does not seem to put the artifact s3 specifications here, leaving them in archiveLocation. "volumes": nil, "initContainers": nil, "sidecars": nil, diff --git a/backend/src/cache/server/mutation_test.go b/backend/src/cache/server/mutation_test.go index d8469e94f8..9252a7a884 100644 --- a/backend/src/cache/server/mutation_test.go +++ b/backend/src/cache/server/mutation_test.go @@ -205,9 +205,9 @@ func TestSetImage(t *testing.T) { func TestMutatePodIfCachedWithTeamplateCleanup(t *testing.T) { executionCache := &model.ExecutionCache{ - ExecutionCacheKey: "f5fe913be7a4516ebfe1b5de29bcb35edd12ecc776b2f33f10ca19709ea3b2f0", + ExecutionCacheKey: "5a20e3f2e74863b363291953082d9812a58e25f7117bface1c76d40ef0ee88fc", ExecutionOutput: "testOutput", - ExecutionTemplate: `Cache key was calculated from this: {"container":{"command":["echo", "Hello"],"image":"python:3.7"}}`, + ExecutionTemplate: `Cache key was calculated from this: {"container":{"command":["echo", "Hello"],"image":"python:3.7"},"outputs":"anything"}`, MaxCacheStaleness: -1, } fakeClientManager.CacheStore().CreateExecutionCache(executionCache)