-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix local overwrite cache #2198
Fix local overwrite cache #2198
Conversation
Signed-off-by: ChungYujoyce <joyce.bhps@gmail.com>
Signed-off-by: ChungYujoyce <joyce.bhps@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2198 +/- ##
==========================================
- Coverage 85.53% 85.52% -0.01%
==========================================
Files 309 309
Lines 23460 23467 +7
Branches 3630 3632 +2
==========================================
+ Hits 20066 20070 +4
- Misses 2752 2753 +1
- Partials 642 644 +2 ☔ View full report in Codecov by Sentry. |
Signed-off-by: ChungYujoyce <joyce.bhps@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
Don't worry about the failing unit tests in https://github.com/flyteorg/flytekit/actions/runs/7969843181/attempts/2?pr=2198, those are being fixed in #2199.
* Fix local overwrite cache Signed-off-by: ChungYujoyce <joyce.bhps@gmail.com> * take off print Signed-off-by: ChungYujoyce <joyce.bhps@gmail.com> * change overwrite logic Signed-off-by: ChungYujoyce <joyce.bhps@gmail.com> --------- Signed-off-by: ChungYujoyce <joyce.bhps@gmail.com> Signed-off-by: Jan Fiedler <jan@union.ai>
Tracking issue
Closes flyteorg/flyte#4727
Why are the changes needed?
We can't overwrite the cache when using
pyflyte run --overwrite-cache
in local runs.What changes were proposed in this pull request?
--overwrite-cache
is added, we getrun_level_params.overwrite_cache=True
and set the environment variableFLYTE_LOCAL_CACHE_OVERWRITE=true
accordingly.FLYTE_LOCAL_CACHE_OVERWRITE=true
, the task will be executed and overwrite the existing cache.add
function inLocalTaskCache
is changed toset
as the previous one can't update the cache if there's already an existing one.How was this patch tested?
Added a test which confirms that setting
FLYTE_LOCAL_CACHE_OVERWRITE=true
can successfully overwrite the existing cache.Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link