[BUG] Cache status of dynamic (parent) tasks is not updated properly #3096
Labels
bug
Something isn't working
flyteadmin
Issue for FlyteAdmin Service
flytepropeller
untriaged
This issues has not yet been looked at by the Maintainers
Describe the bug
When executing a dynamic task, the cache status in flyteadmin's database is not updated after all child tasks execute successfully even though datacatalog contains stored data.
Relaunching the same workflow/task with identical inputs leads to flytepropeller immediately recognising the stored data in datacatalog and skipping execution in favor of returning cached outputs.
Whilst this is most likely only a "visual" issue (the cache status is not displayed correctly for the first execution), the cache status should still be propagated properly for consistency reasons (as well as the current in-progress cache eviction implementation).
The issue is caused by flytepropeller's
dynamicNodeTaskNodeHandler
not setting theTaskNodeInfo
for thehandler.Transition
properly here (either assignment orreturn
is missing). Additionally, this assignment drops theOutputInfo
already stored in thehandler.ExecutionInfo
from theTaskNodeInfo
as the whole struct is just overwritten with the newly provided data.Output of
node_executions
flyteadmin API (http://localhost:8088/api/v1/node_executions/flytesnacks/development/aglb9tc88qtwh22qfw7t?filters=&limit=10000&sort_by.direction=ASCENDING&sort_by.key=created_at
) after first execution - note the lack ofcache_status
intask_node_metadata
:Output of
node_executions
flyteadmin API (http://localhost:8088/api/v1/node_executions/flytesnacks/development/abj76fsjzd7dw6d42bjm?filters=&limit=10000&sort_by.direction=ASCENDING&sort_by.key=created_at
) after second execution - note thecache_status
intask_node_metadata
is now set:Expected behavior
Running a cacheable dynamic task should update the parent node's cache status in flyteadmin accordingly.
Additional context to reproduce
Using latest versions of flyte:
house_price_prediction.multiregion_house_price_predictor.multi_region_house_price_prediction_model_trainer
from flytesnacks examples)node_executions
API)Screenshots
First execution, parent nodes not cached
First execution, child nodes cached
Second execution, parent nodes cached
Second execution, child nodes unknown
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: