Repository navigation
fix(propeller): stop recompiling dynamic workflows larger than a cach… - #8130
Conversation
…e entry Signed-off-by: ChickenBenny <zxc123benny14159@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8130 +/- ##
==========================================
+ Coverage 57.33% 57.34% +0.01%
==========================================
Files 931 931
Lines 58331 58336 +5
==========================================
+ Hits 33445 33454 +9
+ Misses 21833 21831 -2
+ Partials 3053 3051 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: ChickenBenny <zxc123benny14159@gmail.com>
51a0ea1 to
ad81245
Compare
|
Hi @Sovietaced @pingsutw, could one of you take a look when you have a moment? This fixes #7916: dynamic workflows whose compiled CRD is larger than a storage-cache entry get recompiled on every evaluation round, because It's a small change (2 files in |
Tracking issue
Closes #7916
Why are the changes needed?
When a dynamic workflow's compiled CRD (
futures_compiled.pb) is larger than the storage cache's per-entry limit (1/1024 ofstorage.cache.max_size_mbs), propeller recompiles the dynamic workflow on every evaluation round.cachedRawStore.ReadRawreturns the data together withCACHE_WRITE_FAILEDwhen the blob store read succeeds but the cache write fails.ReadProtobuftreats that as a soft failure, butgetRawBytesinremote_workflow_store.goreturns early on any error and drops the data.RetrieveCachethen fails, andbuildContextualDynamicWorkflowfalls back to recompiling. The blob is the same size every round, so this keeps happening until the dynamic node finishes.What changes were proposed in this pull request?
getRawBytes: ignoreCACHE_WRITE_FAILEDlikeReadProtobufdoes, and return an error if the reader is nil.PutFlyteWorkflowCRD: ignoreCACHE_WRITE_FAILEDlikeWriteProtobufdoes. The blob is already written at that point, but the error caused a misleadingFailed to cache Dynamic workflowlog every round.How was this patch tested?
Added
Test_cacheFlyteWorkflowLargerThanCacheEntry. It uses a 1MB storage cache and a 100-node CRD that is larger than a cache entry:The new test fails on the base commit with
[CACHE_WRITE_FAILED] Failed to Cache the metadataand passes with this change:I also reproduced it end to end on the
flytectl demosandbox (v1.16.9) with a@dynamicthat fans out 20 tasks, each sleeping 20s. Withstorage.cache.max_size_mbs: 1, the "this will cause the dynamic workflow to be recompiled" warning showed up 31 times in one run. With100it showed up 0 times.Check all the applicable boxes
Related PRs
None.