fix: failed data loading/refreshing in TaskExecutionDetails #142
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.
TL;DR
Fixes a failure to load data in the TaskExecutionDetails view when coming from a page where the TaskExecution has already been loaded an is in a final state.
Also fixes a refresh issue with child NodeExecutions on that page.
Type
Complete description
The
enabled
flag onuseQuery
is meant to delay running a dependent query until data from the parent is available. We were abusing it a little bit by attempting to use it to return cached data from a query without running the query. A better implementation of this is to conditionally set thestaleTime
toInfinity
and disable refetch in the case where we want to just use whatever cached data is available. This updatesuseCondtionalQuery
to follow that logic.Also fixed an issue where the NodeExecutions list on the TaskExecutionDetails page was not refreshing when the parent generator task succeeded but the spawned NodeExecutions were still in progress. This required adding a refetchInterval to the query and fixing the logic in the
shouldEnableQuery
function.Tracking Issue
flyteorg/flyte#672