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

GH-5989: Fix task registration with node_dependency_hints #2992

Conversation

Tom-Newton
Copy link
Contributor

@Tom-Newton Tom-Newton commented Dec 9, 2024

Tracking issue

Closes flyteorg/flyte#5989

Why are the changes needed?

To fix directly registering tasks that use node_dependency_hints pointing to a workflow.

What changes were proposed in this pull request?

Make FlyteRemote._serialize_and_register always return the remote version of the provided entity regardless of whether it happens to be the last entity to be registered.

How was this patch tested?

Wrote a new unittest

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

node_dependency_hints were introduced by #2015

Docs link

Signed-off-by: Thomas Newton <[email protected]>
Signed-off-by: Thomas Newton <[email protected]>
Signed-off-by: Thomas Newton <[email protected]>
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 46.78%. Comparing base (2877dcc) to head (9d3c0cc).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
flytekit/remote/remote.py 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2992      +/-   ##
==========================================
- Coverage   51.51%   46.78%   -4.73%     
==========================================
  Files         203      200       -3     
  Lines       21199    20950     -249     
  Branches     2707     2708       +1     
==========================================
- Hits        10920     9802    -1118     
- Misses       9688    10663     +975     
+ Partials      591      485     -106     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Tom-Newton
Copy link
Contributor Author

Hmm.... looks like my test is failing on CI, I'll investigate shortly.

Signed-off-by: Thomas Newton <[email protected]>
Signed-off-by: Thomas Newton <[email protected]>
@Tom-Newton Tom-Newton force-pushed the tomnewton/fix_task_registration_with_node_dependency_hints/GH-5989 branch from b3071b8 to 3efd4ea Compare December 9, 2024 16:42
Signed-off-by: Thomas Newton <[email protected]>
Comment on lines +527 to +529
flyte_workflow = FlyteWorkflow.promote_from_closure(compiled_wf, node_launch_plans)
flyte_workflow.template._id = workflow_id
return flyte_workflow
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This bit isn't necessary, but it looks like tasks already do this and it makes it easier to unittest.

@eapolinario
Copy link
Collaborator

Thank you!

@eapolinario eapolinario merged commit 9a89fd3 into flyteorg:master Dec 11, 2024
104 checks passed
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.

[BUG] Task registration fails if node_dependency_hints includes a workflow
2 participants