-
Notifications
You must be signed in to change notification settings - Fork 301
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
Option to disable local caching #2106
Option to disable local caching #2106
Conversation
Signed-off-by: Bernhard Stadlbauer <[email protected]>
Signed-off-by: Bernhard Stadlbauer <[email protected]>
Signed-off-by: Bernhard Stadlbauer <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2106 +/- ##
=======================================
Coverage 85.77% 85.78%
=======================================
Files 313 313
Lines 23500 23513 +13
Branches 3512 3514 +2
=======================================
+ Hits 20158 20171 +13
Misses 2734 2734
Partials 608 608 ☔ View full report in Codecov by Sentry. |
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.
Ideally we should also make pyflyte run --(option for invalidating cache) work in local mode
flytekit/configuration/internal.py
Outdated
@@ -66,6 +66,11 @@ class AZURE(object): | |||
CLIENT_SECRET = ConfigEntry(LegacyConfigEntry(SECTION, "client_secret")) | |||
|
|||
|
|||
class LOCAL(object): |
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.
Local
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.
Thanks, fixed in 836398a
Signed-off-by: Bernhard Stadlbauer <[email protected]>
That sounds reasonable. I've poked around a little and found |
Aah it should be invalidate per cache key only |
@kumare3 I've opened flyteorg/flyte#4727 to track the |
(Dropping a message to be notified once this is merged <3) |
Tracking issue
Closes flyteorg/flyte#4395
Why are the changes needed?
While local caching is useful in some cases, it has often led to unexpected errors for users not being aware. Especially in large codebases this can lead to unexpected test failures, etc.
What changes were proposed in this pull request?
This PR introduces a new config section
local
with one valuecachen_enabled
(which defaults to true):How was this patch tested?
Added a test which confirms that setting
FLYTE_LOCAL_CACHE_ENABLED=false
prevents the local use of the cache.Check all the applicable boxes
Docs link
Changed in flyteorg/flytesnacks#1425
https://flyte--1425.org.readthedocs.build/projects/cookbook/en/1425/auto_examples/development_lifecycle/task_cache.html#how-does-local-caching-work