-
Notifications
You must be signed in to change notification settings - Fork 59
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: only filter NodeExecutions when viewing the Nodes tab #88
Conversation
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.
👍
@@ -1,7 +1,7 @@ | |||
import { useState } from 'react'; | |||
|
|||
export function useTabState( | |||
tabs: { [k: string]: string }, | |||
tabs: { [k: string]: string | 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.
Should we type this?
tabs: { [k: string]: string | object }, | |
tabs: { [k: string]: string | { id: string; label: string } }, |
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.
Good suggestion. At the moment, the shape of the object doesn't matter. So I'm okay leaving it generic.
Codecov Report
@@ Coverage Diff @@
## master #88 +/- ##
==========================================
+ Coverage 63.86% 66.22% +2.36%
==========================================
Files 366 367 +1
Lines 5856 5860 +4
Branches 892 893 +1
==========================================
+ Hits 3740 3881 +141
+ Misses 2116 1979 -137
Continue to review full report at Codecov.
|
## [0.8.1](http://github.com/lyft/flyteconsole/compare/v0.8.0...v0.8.1) (2020-08-13) ### Bug Fixes * only use NE filter for Nodes tab ([#88](http://github.com/lyft/flyteconsole/issues/88)) ([f4ba80b](http://github.com/lyft/flyteconsole/commit/f4ba80b0498a0b37dc73ed3c3c8e72844101dcb5))
🎉 This PR is included in version 0.8.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
flyteorg/flyte#425
We share the loaded NodeExecutions between the two tabs on the ExecutionDetails page.
This is a useful performance optimization when both are viewing an unfiltered list of NodeExecutions. But it results in missing node information when a filter is applied in the Nodes tab and then the Graph tab is opened.
To address this, I updated the logic in
ExecutionNodeViews
to only pass the filter list if the current tab is the Nodes tab. This has the effect of resetting the fetchable for NodeExecutions when the tab is changed if a filter is applied. But if no filter is applied, the passed list will be empty in all cases, resulting in reuse of the previously-fetched data.The majority of this PR is actually cleanup work done to facilitate writing a unit test to cover the new behavior 😁