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

Change Flyin VScode Default Extensions #2058

Merged
merged 5 commits into from
Dec 21, 2023

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Dec 16, 2023

Tracking issue

flyteorg/flyte#4284

Why are the changes needed?

Currently, downloading the python and jupyter extensions is time-consuming.
It will take 6 - 8 minutes to download them, so we want to move the download resource from openvsx to github.

What changes were proposed in this pull request?

Move all extensions source url to GitHub.

How was this patch tested?

add more test in test_vscode_config function.

Setup process

pyflyte run --remote vscode_task.py wf
FROM python:3.10-slim-buster

MAINTAINER Flyte Team <[email protected]>
LABEL org.opencontainers.image.source https://github.com/flyteorg/flytekit
WORKDIR /root
ENV PYTHONPATH /root

# ARG VERSION
ARG TARGETARCH

# 1. Update the necessary packages for flytekit
# 2. Install code-server
# 3. Download code-server extensions for Python and Jupyter via wget
# 4. Install flytekit and flytekit-flyin with no cache
# 5. Delete apt cache. Reference: https://gist.github.com/marvell/7c812736565928e602c4
# 6. Some packages will create config file under /home by default, so we need to make sure it's writable
# 7. Change the permission of /tmp, so that others can run command on it
RUN apt-get update \
    && apt-get install build-essential wget git -y \
    && pip install -U git+https://github.com/flyteorg/flytekit.git@c3dd1248d06a21d4727ead5912b51eeb5bfae6ae#subdirectory=plugins/flytekit-flyin \
    && pip install -U git+https://github.com/flyteorg/flytekit.git@c3dd1248d06a21d4727ead5912b51eeb5bfae6ae \
    && apt-get clean autoclean \
    && apt-get autoremove --yes \
    && rm -rf /var/lib/{apt,dpkg,cache,log}/ \
    && useradd -u 1000 flytekit \
    && chown flytekit: /root \
    && chown flytekit: /home \
    && :

USER flytekit

Screenshots

It took only 1 minute to download 5 extensions and installed them. (include download code-server)
image

Check all the applicable boxes

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

Copy link

codecov bot commented Dec 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a41bd1f) 86.00% compared to head (f8605fd) 86.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2058   +/-   ##
=======================================
  Coverage   86.00%   86.00%           
=======================================
  Files         309      309           
  Lines       23060    23065    +5     
  Branches     3489     3489           
=======================================
+ Hits        19832    19837    +5     
  Misses       2617     2617           
  Partials      611      611           

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

@Future-Outlier Future-Outlier marked this pull request as ready for review December 20, 2023 13:45
Future Outlier added 3 commits December 21, 2023 07:21
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
@Future-Outlier
Copy link
Member Author

Let's move python and jupyter extensions back, it's fast now!
image
image

@troychiu
Copy link
Member

LGTM. Thank you!

@pingsutw pingsutw merged commit ad328a7 into flyteorg:master Dec 21, 2023
77 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.

3 participants