support ignore cache option for workflow task execution#4635
Closed
huanghongbo-hhb wants to merge 4 commits into
Closed
support ignore cache option for workflow task execution#4635huanghongbo-hhb wants to merge 4 commits into
huanghongbo-hhb wants to merge 4 commits into
Conversation
Signed-off-by: huanghongbo <huanghongbo@koderover.com>
Signed-off-by: huanghongbo <huanghongbo@koderover.com>
32e8d37 to
5988fbf
Compare
4208a8c to
5988fbf
Compare
Signed-off-by: huanghongbo <huanghongbo@koderover.com>
Signed-off-by: huanghongbo <huanghongbo@koderover.com>
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.
Background
Workflow task execution already supports using
ignore_cacheto control whether object storage cache restores historical cache content. However, shared storage cache did not support the same behavior.This change aligns the behavior of the two cache backends:
ignore_cache=false: restore previous cache and publish new cacheignore_cache=true: skip restoring previous cache, but still publish new cacheChanges
1. Object storage cache
Add full
ignore_cachesupport for object storage cache in workflow task execution:ignore_cache=true, skipdownload archivetar archive/ cache upload logicCovered job types:
2. Shared storage cache
Add dedicated restore/publish logic for shared storage cache:
shared_cache_restorestepshared_cache_publishstepBehavior:
ignore_cache=falseshared_cache_restoreshared_cache_publishignore_cache=trueshared_cache_restoreshared_cache_publishImplementation details:
/zadig/cache-store.../tasks/task-<taskID>-<jobName>.../mergedmergedCovered job types:
Design Notes
This shared storage implementation uses a straightforward approach:
tasks/+merged/directory layout to support cache restore and cache publishThe goal of this version is to support the basic
ignore_cachesemantics for shared storage cache:Validation
Object storage cache
Validation result:
ignore_cache=false, logs contain bothdownload archiveandtar archiveignore_cache=true, logs no longer containdownload archivetar archiveis still preservedConclusion:
Shared storage cache
Validation result:
ignore_cache=true:shared_cache_restoreis not executedshared_cache_publishis executedThis change is