-
Notifications
You must be signed in to change notification settings - Fork 332
Add remote workflow version execution support to pyflyte run #3338
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
Conversation
|
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
This commit adds support for executing remote workflows via the `pyflyte run remote-workflow` command, similar to the existing `remote-task` and `remote-launchplan` commands. Changes include: - Add WORKFLOW_LAUNCHER constant to DynamicEntityLaunchCommand - Update _fetch_entity() to handle workflow launcher type - Add workflow version support (name:version syntax) - Update get_command() in RemoteEntityGroup to create workflow launcher - Add comprehensive unit tests for remote workflow execution Signed-off-by: CtfChan <23730526+CtfChan@users.noreply.github.com>
b337274 to
2dd7279
Compare
|
Hi @CtfChan
|
|
Hi @machichima. I meant for this to allow users to execute a specific workflow version via CLI. I found this issue a while back not sure if you've seen this before flyteorg/flyte#6404. |
machichima
left a comment
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.
Sorry for the delay. LGTM
Thank you so much!
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #3338 +/- ##
===========================================
- Coverage 76.21% 46.58% -29.63%
===========================================
Files 216 216
Lines 22700 22629 -71
Branches 2975 2974 -1
===========================================
- Hits 17301 10542 -6759
- Misses 4540 11560 +7020
+ Partials 859 527 -332 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Congrats on merging your first pull request! 🎉 |
|
Bito Review Skipped - No Changes Detected |

Tracking issue
N/A
Why are the changes needed?
Currently, the
pyflyte runcommand supports executing remote tasks (remote-task) and remote launch plans (remote-launchplan), but lacks support for executing exact version of remote workflows directly. This creates an inconsistent user experience and limits flexibility when users want to execute workflows that are already registered in a Flyte backend.What changes were proposed in this pull request?
This PR adds support for executing remote workflows via the
pyflyte run remote-workflowcommand, bringing feature parity with the existing remote task and launch plan execution capabilities.Changes include:
WORKFLOW_LAUNCHERconstant toDynamicEntityLaunchCommandclass_fetch_entity()method to handle the workflow launcher type by callingfetch_workflow()on the remote instancename:versionsyntaxget_command()inRemoteEntityGroupto create aDynamicEntityLaunchCommandwith the workflow launcher when the command isremote-workflowtest_remote_workflowandtest_remote_workflow_with_version) to verify the functionalityHow was this patch tested?
Added two new unit tests in
tests/flytekit/unit/cli/pyflyte/test_run.py:test_remote_workflow: Tests basic remote workflow execution with parameterstest_remote_workflow_with_version: Tests version-specific workflow execution using thename:versionsyntaxBoth tests:
FlyteRemoteandrun_remoteto verify correct behaviorCliRunnerto simulate command-line executionfetch_workflow()is called with the correct argumentsAll tests pass successfully:
Setup process
N/A
Screenshots
N/A
Check all the applicable boxes
Related PRs
N/A
Docs link
N/A
Summary by Bito
This pull request enhances the pyflyte run command by enabling the execution of remote workflows, introducing a WORKFLOW_LAUNCHER constant, and modifying the _fetch_entity method for workflow compatibility. It also supports version-specific workflows and includes comprehensive unit tests for reliability.