Skip to content
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: failed data loading/refreshing in TaskExecutionDetails #142

Merged
merged 1 commit into from
Jan 15, 2021

Conversation

schottra
Copy link
Contributor

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

  • Bug Fix
  • Feature
  • Plugin

Complete description

The enabled flag on useQuery 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 the staleTime to Infinity and disable refetch in the case where we want to just use whatever cached data is available. This updates useCondtionalQuery 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

@codecov-io
Copy link

Codecov Report

Merging #142 (fcab137) into master (d8daf6c) will decrease coverage by 0.10%.
The diff coverage is 68.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
- Coverage   74.43%   74.32%   -0.11%     
==========================================
  Files         415      414       -1     
  Lines        7310     7310              
  Branches     1154     1159       +5     
==========================================
- Hits         5441     5433       -8     
- Misses       1869     1877       +8     
Impacted Files Coverage Δ
src/components/App/App.tsx 85.71% <ø> (-0.50%) ⬇️
src/components/data/QueryAuthorizationObserver.tsx 29.41% <ø> (ø)
src/components/hooks/useFetchableData.ts 91.07% <ø> (-1.79%) ⬇️
src/components/data/apiContext.ts 61.90% <20.00%> (-32.22%) ⬇️
...utions/TaskExecutionDetails/TaskExecutionNodes.tsx 57.57% <33.33%> (ø)
src/components/Navigation/ProjectSelector.tsx 100.00% <100.00%> (ø)
...rc/components/Navigation/SearchableProjectList.tsx 100.00% <100.00%> (ø)
src/components/hooks/useConditionalQuery.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd62120...fcab137. Read the comment docs.

@service-github-lyft-semantic-release
Copy link
Contributor

🎉 This PR is included in version 0.19.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@schottra schottra deleted the fix-conditional-queries branch January 15, 2021 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants