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

feat: add cache icons for cached tasks in graph view #400

Merged
merged 2 commits into from
Apr 18, 2022

Conversation

olga-union
Copy link
Contributor

@olga-union olga-union commented Apr 18, 2022

Signed-off-by: Olga Nad [email protected]

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

Added icons to indicate cache status of the task in graph view.
Removed unused code components/flytegraph/Graph.tsx.

Tracking Issue

fixes flyteorg/flyte#300

Follow-up issue

NA

Demo

With read from cache tasks: Screen Shot 2022-04-18 at 12 12 21 PM
With written into cache tasks: Screen Shot 2022-04-18 at 12 11 35 PM

Bonus

Fixed placement of sub headers in info section above the tabs.
Before: Screen Shot 2022-04-14 at 10 20 29 AM
After: Screen Shot 2022-04-18 at 12 12 48 PM

@olga-union olga-union requested review from a team, ursucarina, anrusina and jsonporter and removed request for a team April 18, 2022 17:25
@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

Merging #400 (1ab2b6d) into master (9ce77a7) will decrease coverage by 0.10%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #400      +/-   ##
==========================================
- Coverage   67.18%   67.08%   -0.11%     
==========================================
  Files         407      407              
  Lines        9133     9147      +14     
  Branches     1609     1614       +5     
==========================================
  Hits         6136     6136              
- Misses       2997     3011      +14     
Impacted Files Coverage Δ
.../Executions/ExecutionDetails/ExecutionMetadata.tsx 97.05% <ø> (ø)
...ents/flytegraph/ReactFlow/customNodeComponents.tsx 0.00% <0.00%> (ø)
...flytegraph/ReactFlow/transformDAGToReactFlowV2.tsx 0.00% <0.00%> (ø)
src/components/flytegraph/ReactFlow/types.ts 0.00% <ø> (ø)
src/components/flytegraph/ReactFlow/utils.tsx 15.51% <ø> (ø)

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 e060056...1ab2b6d. Read the comment docs.

@@ -23,7 +23,7 @@ const useStyles = makeStyles((theme: Theme) => {
position: 'relative',
},
detailsContainer: {
alignItems: 'center',
alignItems: 'start',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

jsonporter
jsonporter previously approved these changes Apr 18, 2022
Copy link
Contributor

@jsonporter jsonporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

anrusina
anrusina previously approved these changes Apr 18, 2022
Copy link
Contributor

@anrusina anrusina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment on lines 252 to 253
if (cacheStatus === CatalogCacheStatus.CACHE_HIT) {
return <CachedOutlined style={cacheIconStyles} />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: switch could be a better choice from readability perspective

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rewrote it in switch this morning, but then decided to use ifs 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated!

@@ -23,7 +23,7 @@ const useStyles = makeStyles((theme: Theme) => {
position: 'relative',
},
detailsContainer: {
alignItems: 'center',
alignItems: 'start',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe it's only me, but I feel like icon should go 1-2 px lower, to align better with text (as it mainly uses lower case naming), plus it looks like in cases when cache icon present right margin after the icon should become smaller for 2px too.
Screen Shot 2022-04-18 at 12 32 29 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added 1px margin top in customNodeComponents.tsx, where the icon styles are defined

@olga-union olga-union dismissed stale reviews from anrusina and jsonporter via 1ab2b6d April 18, 2022 20:01
Copy link
Contributor

@anrusina anrusina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@anrusina anrusina merged commit 0c0cd4b into master Apr 18, 2022
@anrusina anrusina deleted the olga-union/add-cached-icon-graph branch April 18, 2022 22:17
@flyte-bot
Copy link
Collaborator

🎉 This PR is included in version 0.54.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] User vs System errors should be clearly classified and labeled in metrics
4 participants