-
Notifications
You must be signed in to change notification settings - Fork 672
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: Make 'flytectl compile' consider launchplans used within workflows #5463
Fix: Make 'flytectl compile' consider launchplans used within workflows #5463
Conversation
a73e2ac
to
cf4edce
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5463 +/- ##
==========================================
+ Coverage 60.97% 60.98% +0.01%
==========================================
Files 793 793
Lines 51350 51378 +28
==========================================
+ Hits 31312 31335 +23
- Misses 17152 17156 +4
- Partials 2886 2887 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
67ca4a3
to
03d0c2b
Compare
The docs generation in CI seems to be broken, I saw other Actions fail with the same error at the moment. |
03d0c2b
to
5246e6c
Compare
Signed-off-by: Dennis Keck <[email protected]>
5246e6c
to
47b74bf
Compare
Signed-off-by: Dennis Keck <[email protected]>
Signed-off-by: Dennis Keck <[email protected]>
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.
Thank you for fixing this and adding a test that would have caught the problem 🙏
…ws (flyteorg#5463) * Fix: Make 'flytectl compile' consider launchplans used within workflows Signed-off-by: Dennis Keck <[email protected]> * Add raw file for test Signed-off-by: Dennis Keck <[email protected]> * Add documentation on how to create a package Signed-off-by: Dennis Keck <[email protected]> --------- Signed-off-by: Dennis Keck <[email protected]>
…ws (flyteorg#5463) * Fix: Make 'flytectl compile' consider launchplans used within workflows Signed-off-by: Dennis Keck <[email protected]> * Add raw file for test Signed-off-by: Dennis Keck <[email protected]> * Add documentation on how to create a package Signed-off-by: Dennis Keck <[email protected]> --------- Signed-off-by: Dennis Keck <[email protected]> Signed-off-by: Vladyslav Libov <[email protected]>
Why are the changes needed?
This workflow can be registered with
pyflyte register
and executed in a cluster. However,pyflyte --pkgs <module> package
+flytectl compile
gives the following error:... Compiling workflow: wfs.wf.outer_workflow :( Error Compiling workflow: wfs.wf.outer_workflow Error: Collected Errors: 1 Error 0: Code: WorkflowReferenceNotFound, Node Id: start-node, Description: Referenced Workflow [resource_type:LAUNCH_PLAN name:"name_override"] not found.
What changes were proposed in this pull request?
The error occurs since flytectl compile does not consider all launchplans but only the default launchplan for the currently compiled workflow.
To do so, one needs to compile workflows in the correct order, which I do by recursively calling a new
handleWorkflow
function. Please point me to other places if there is already code handling this.As far as I have checked there are no recursion checks necessary as they would be caught during packaging?
How was this patch tested?
Added a unit test based on the example above. Additionally we tried the
flytectl compile
command on a number of our internal workflows.Note to reviewers: We couldn't find whether the source files for the
testdata/*.tgz
should be checked in as well - should they?Check all the applicable boxes
Related PRs
Replaces #5437