-
Notifications
You must be signed in to change notification settings - Fork 245
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
New Features in VSCode Plugin: Auto server termination after max idle time and default installation of python + jupyter notebook extensions #1977
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1977 +/- ##
===========================================
+ Coverage 62.54% 80.67% +18.12%
===========================================
Files 313 173 -140
Lines 23252 16943 -6309
Branches 3525 2312 -1213
===========================================
- Hits 14543 13668 -875
+ Misses 8286 2702 -5584
- Partials 423 573 +150 ☔ View full report in Codecov by Sentry. |
nit you have to resolve the DCO issue by adding sign-off to your commit. Check details |
0ed6b19
to
0994c7d
Compare
|
1364073
to
a2989d5
Compare
…le seconds and install the python + jupyter notebook extentions Signed-off-by: JasonZhu1313 <jasonchu13@outlook.com>
Signed-off-by: JasonZhu1313 <jasonchu13@outlook.com>
Signed-off-by: JasonZhu1313 <jasonchu13@outlook.com>
ab9f844
to
cee300c
Compare
Signed-off-by: byhsu <byhsu@linkedin.com>
607d270
to
a9f8b7f
Compare
Thanks jason for the great work! I have validated the following use cases, and they all worked well from flytekit import task, workflow
from flytekitplugins.vscode import vscode, VscodeConfig
from flytekitplugins.vscode.constants import DEFAULT_CODE_SERVER_EXTENSIONS
@task(
container_image="localhost:30000/flytekit-vscode:0.0.2",
environment={"FLYTE_SDK_LOGGING_LEVEL": "20"}
)
@vscode(
)
def t():
...
@task(
container_image="localhost:30000/flytekit-vscode:0.0.2",
environment={"FLYTE_SDK_LOGGING_LEVEL": "20"}
)
@vscode(
max_idle_seconds=10,
)
def t_suicide():
...
config_with_vim = VscodeConfig(
extension_remote_paths=DEFAULT_CODE_SERVER_EXTENSIONS+["https://open-vsx.org/api/vscodevim/vim/1.27.0/file/vscodevim.vim-1.27.0.vsix"]
)
@task(
container_image="localhost:30000/flytekit-vscode:0.0.2",
environment={"FLYTE_SDK_LOGGING_LEVEL": "20"}
)
@vscode(
config=config_with_vim
)
def t_vim():
...
@workflow
def wf():
t()
t_suicide()
t_vim() |
Thanks! Nice integrate test covers all cases |
LGTM. Thank you @JasonZhu1313 and @ByronHsu! |
I am wondering if it's possible or even needed to add tests to test exit handler? |
Congrats on merging your first pull request! 🎉 |
… time and default installation of python + jupyter notebook extensions (flyteorg#1977) --------- Signed-off-by: JasonZhu1313 <jasonchu13@outlook.com> Signed-off-by: byhsu <byhsu@linkedin.com> Co-authored-by: byhsu <byhsu@linkedin.com>
… time and default installation of python + jupyter notebook extensions (flyteorg#1977) --------- Signed-off-by: JasonZhu1313 <jasonchu13@outlook.com> Signed-off-by: byhsu <byhsu@linkedin.com> Co-authored-by: byhsu <byhsu@linkedin.com> Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
New Features in VSCode Plugin: Auto server termination after max idle time and default installation of python + jupyter notebook extensions
TL;DR
Please replace this text with a description of what this PR accomplishes.
This is a followup PR of VSCode Plugin contribution: #1922 with additional features:
Type
Are all requirements met?
Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
Termination after max idle time
Replace original hard coded server_up_seconds with max_idle_seconds, check the heartbeat file located at ~/.local/share/code-server/heartbeat ever 60 seconds source, if the duration if the time till last connection is longer than max idle seconds, terminate the VSCode server.
Installation of python + jupyter notebook extensions from urls
Expose plugins_remote_paths argument in vscode annotation, so users could choose plugin urls they'd like to install. By default python and Jupyter notebook plugin will be installed.
The urls of plugin follows this pattern:
We'll be extracting the ${extension name} from url using regex as the extension name on local disk, the extension will be named with .vsix extension.
Ex. Python plugin url
Will be downloaded on local disk as python.vsix for installation.
Tracking Issue
#1922
Tests
The delta (duration in seconds after last activity detected) is refreshed after connected to vscode server. And server is terminated after delta reaches to max idle time.
Plugins are installed successfully