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

Override node name #1344

Merged
merged 5 commits into from
Nov 22, 2022
Merged

Override node name #1344

merged 5 commits into from
Nov 22, 2022

Conversation

honnix
Copy link
Member

@honnix honnix commented Nov 21, 2022

Signed-off-by: Hongxin Liang [email protected]

TL;DR

Override node name.

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

More details are captured in #3092.

I tested this on our setup. Everything seems to work fine, except the Nodes tab of the execution detail view. While Graph and Timeline both show the overridden node name, Nodes tab still shows the original task name.

Also note that many changes were made by black.

Tracking Issue

flyteorg/flyte#3092

Follow-up issue

NA

Signed-off-by: Hongxin Liang <[email protected]>
Signed-off-by: Hongxin Liang <[email protected]>
Signed-off-by: Hongxin Liang <[email protected]>
@@ -401,3 +397,24 @@ def my_wf(a: str):
_resources_models.ResourceEntry(_resources_models.ResourceName.CPU, "1"),
_resources_models.ResourceEntry(_resources_models.ResourceName.MEMORY, "100"),
]


def test_name_override():
Copy link
Member Author

Choose a reason for hiding this comment

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

Real change here.

@@ -87,6 +87,7 @@ def empty_wf2():
wf_spec = get_serializable(OrderedDict(), serialization_settings, empty_wf2)
assert wf_spec.template.nodes[0].upstream_node_ids[0] == "n1"
assert wf_spec.template.nodes[0].id == "n0"
assert wf_spec.template.nodes[0].metadata.name == "t2"
Copy link
Member Author

Choose a reason for hiding this comment

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

Real change here.

@honnix
Copy link
Member Author

honnix commented Nov 21, 2022

FAILED tests/flytekit/unit/cli/pyflyte/test_run.py::test_pyflyte_run_cli - ValueError: I/O operation on closed file. Not sure I understand what went wrong.

@eapolinario
Copy link
Collaborator

FAILED tests/flytekit/unit/cli/pyflyte/test_run.py::test_pyflyte_run_cli - ValueError: I/O operation on closed file. Not sure I understand what went wrong.

It's not related to your change. I'm actively investigating this.

@honnix
Copy link
Member Author

honnix commented Nov 21, 2022

FAILED tests/flytekit/unit/cli/pyflyte/test_run.py::test_pyflyte_run_cli - ValueError: I/O operation on closed file. Not sure I understand what went wrong.

It's not related to your change. I'm actively investigating this.

@eapolinario Thanks for heads-up!

wild-endeavor
wild-endeavor previously approved these changes Nov 22, 2022
Signed-off-by: Yee Hing Tong <[email protected]>
@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #1344 (65a5ef0) into master (dd3fcae) will decrease coverage by 0.06%.
The diff coverage is 92.85%.

❗ Current head 65a5ef0 differs from pull request most recent head dfd3487. Consider uploading reports for the commit dfd3487 to get more accurate results

@@            Coverage Diff             @@
##           master    #1344      +/-   ##
==========================================
- Coverage   68.85%   68.79%   -0.07%     
==========================================
  Files         287      287              
  Lines       26453    26462       +9     
  Branches     2497     2498       +1     
==========================================
- Hits        18215    18204      -11     
- Misses       7750     7773      +23     
+ Partials      488      485       -3     
Impacted Files Coverage Δ
setup.py 0.00% <ø> (ø)
tests/flytekit/unit/core/test_node_creation.py 95.60% <91.66%> (-0.20%) ⬇️
flytekit/core/node.py 54.73% <100.00%> (+0.97%) ⬆️
tests/flytekit/unit/cli/pyflyte/workflow.py 86.95% <0.00%> (-13.05%) ⬇️
flytekit/clis/sdk_in_container/run.py 79.86% <0.00%> (-4.30%) ⬇️
tests/flytekit/unit/cli/pyflyte/test_run.py 99.16% <0.00%> (-0.04%) ⬇️
flytekit/core/type_engine.py 58.77% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@honnix
Copy link
Member Author

honnix commented Nov 22, 2022

Hmm I guess I was using a different black version. I will try to fix that.

Signed-off-by: Yee Hing Tong <[email protected]>
@wild-endeavor
Copy link
Contributor

@honnix i just ran make fmt

@honnix honnix force-pushed the override-node-name branch from 65a5ef0 to dfd3487 Compare November 22, 2022 20:15
@honnix
Copy link
Member Author

honnix commented Nov 22, 2022

Sorry I missed the message. I reverted my commits.

@honnix
Copy link
Member Author

honnix commented Nov 22, 2022

@honnix i just ran make fmt

Thanks. The pre-commit thing. Nice!

@wild-endeavor wild-endeavor merged commit 7ceaae6 into master Nov 22, 2022
@honnix honnix deleted the override-node-name branch November 22, 2022 21:23
@honnix
Copy link
Member Author

honnix commented Nov 22, 2022

Thank you for merging this. Now I need your help to figure out why the UI is not consistent. I have attached some screenshots to help. Graph and Timeline are both good, but not Nodes. It feels like Nodes always takes the last part of the full name.

Screenshot 2022-11-22 at 22 26 29

Screenshot 2022-11-22 at 22 26 23

Screenshot 2022-11-22 at 22 26 08

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.

3 participants