-
Notifications
You must be signed in to change notification settings - Fork 301
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
Flyin - vscode resume task #2017
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2017 +/- ##
==========================================
+ Coverage 85.17% 85.87% +0.69%
==========================================
Files 272 306 +34
Lines 21144 22848 +1704
Branches 3466 3466
==========================================
+ Hits 18010 19620 +1610
- Misses 2543 2637 +94
Partials 591 591 ☔ View full report in Codecov by Sentry. |
troychiu
requested review from
wild-endeavor,
kumare3,
eapolinario,
pingsutw and
cosmicBboy
as code owners
December 3, 2023 10:55
ByronHsu
reviewed
Dec 4, 2023
plugins/flytekit-flyin/flytekitplugins/flyin/vscode_lib/decorator.py
Outdated
Show resolved
Hide resolved
ByronHsu
reviewed
Dec 4, 2023
plugins/flytekit-flyin/flytekitplugins/flyin/vscode_lib/decorator.py
Outdated
Show resolved
Hide resolved
Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
Signed-off-by: troychiu <[email protected]>
troychiu
force-pushed
the
vscode-task-resume
branch
from
December 7, 2023 18:25
cab1e33
to
286983f
Compare
Signed-off-by: byhsu <[email protected]>
Signed-off-by: byhsu <[email protected]>
pingsutw
approved these changes
Dec 8, 2023
Future-Outlier
pushed a commit
to Future-Outlier/flytekit
that referenced
this pull request
Dec 12, 2023
* functionality done Signed-off-by: troychiu <[email protected]> * remove redundant Signed-off-by: troychiu <[email protected]> * remove redundant Signed-off-by: troychiu <[email protected]> * add comments Signed-off-by: troychiu <[email protected]> * refactor Signed-off-by: troychiu <[email protected]> * Trigger Build Signed-off-by: troychiu <[email protected]> * fix suggestions Signed-off-by: troychiu <[email protected]> * fix tests Signed-off-by: troychiu <[email protected]> * empty Signed-off-by: byhsu <[email protected]> * lint Signed-off-by: byhsu <[email protected]> --------- Signed-off-by: troychiu <[email protected]> Signed-off-by: byhsu <[email protected]> Co-authored-by: byhsu <[email protected]> Signed-off-by: Future Outlier <[email protected]>
RRap0so
pushed a commit
to RRap0so/flytekit
that referenced
this pull request
Dec 15, 2023
* functionality done Signed-off-by: troychiu <[email protected]> * remove redundant Signed-off-by: troychiu <[email protected]> * remove redundant Signed-off-by: troychiu <[email protected]> * add comments Signed-off-by: troychiu <[email protected]> * refactor Signed-off-by: troychiu <[email protected]> * Trigger Build Signed-off-by: troychiu <[email protected]> * fix suggestions Signed-off-by: troychiu <[email protected]> * fix tests Signed-off-by: troychiu <[email protected]> * empty Signed-off-by: byhsu <[email protected]> * lint Signed-off-by: byhsu <[email protected]> --------- Signed-off-by: troychiu <[email protected]> Signed-off-by: byhsu <[email protected]> Co-authored-by: byhsu <[email protected]> Signed-off-by: Rafael Raposo <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tracking issue
flyteorg/flyte#4284
Why are the changes needed?
After users launch VSCode server and fix their failed tasks, they may want to resume the task to see if the workflow works well with modified tasks. In this PR, I provide a way to let users effortlessly resume the task with their updated code.
What changes were proposed in this pull request?
In runtime, vscode decorator will generate a Python script flyin_resume_task.py.
This script will send a signal to the main process, and the main process will know that it should resume the task.
End-to-end usage
With the following workflow, user can run
pyflyte run --remote demo.py wf --a 10 --b 0
. Since t1 will return a // b, there will be an exception (devision by zero) and the vscode server will be launched because run_task_first is set to true.(run_task_first was introduced in this pr #1997. When run_task_first is set to true, the decorator would first run user's task, and only launch vscode server if the task fails)
With flyin_interactive_entrypoint.py and launch.json, users can debug the task with the original input. For example, they can handle the case of b being equal to 0. (flyin_interactive_entrypoint.py and launch.json were introduced in #2000. They can help users easily debug the task in vscode server.)
After debugging is done, users may want to resume the task to see if the workflow works well with the modified task. They can simply enter
python flyin_resume_task.py
or even simpler, use launch.json, and go to Flyte console to check the result.Screenshots
Check all the applicable boxes