-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add Flyin Config for VSCode Extension #1989
Add Flyin Config for VSCode Extension #1989
Conversation
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1989 +/- ##
==========================================
+ Coverage 86.14% 86.15% +0.01%
==========================================
Files 319 320 +1
Lines 23399 23439 +40
Branches 3457 3457
==========================================
+ Hits 20157 20195 +38
- Misses 2651 2652 +1
- Partials 591 592 +1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
…nto add-flyin-dockerfile-install
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
…nto add-flyin-dockerfile-install Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
You misunderstand the purpose of this PR a bit. we should create predefined configs instead of adding extensions as constant. The title of this PR should be changed to The description can be changed to Why?We want to predefine flyin configs containing the most common extension set, so users don't have to provide the remote URL themselves. They can directly use our predefined configs. e.g.
Users are also free to create the config themselves by appending extension from flytekitplugins.flyin.predefined_config import VscodeConfig
c = VscodeConfig()
c.add_extension(...)
@vscode(
config=c
) What?We have created three predefined configs
|
plugins/flytekit-flyin/flytekitplugins/flyin/vscode_lib/decorator.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[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.
Code looks good, but have to make pr description clearer. My suggestion:
Why
- First use case: provide users predefined configs with common extension set, so users don't have to specify url themselves.
- Second use case: For users want to append the default extension list, provide
add_extension
method inVscodeConfig
dataclass to append the extension list. Directly changingextension_remote_path
will overwrite the list and not convenient.
What
- Add Predefined Config, for example variables like : COPILOT_CONFIG, VIM_CONFIG, CODE_TOGETHER_CONFIG
- Add Extension Variables: ...
- Add add_extensions function: ...
VIM_EXTENSION = "https://open-vsx.org/api/vscodevim/vim/1.27.0/file/vscodevim.vim-1.27.0.vsix" | ||
CODE_TOGETHER_EXTENSION = "https://openvsxorg.blob.core.windows.net/resources/genuitecllc/codetogether/2023.2.0/genuitecllc.codetogether-2023.2.0.vsix" | ||
|
||
# VSCode config with extensions |
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.
# VSCode config with extensions | |
# Predefined VSCode config with extensions |
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.
Fixed it, thank you really really much!
Signed-off-by: Future Outlier <[email protected]>
LGTM |
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
Signed-off-by: Future Outlier <[email protected]>
LGTM. Thank you @Future-Outlier |
Signed-off-by: Future Outlier <[email protected]> Co-authored-by: Future Outlier <[email protected]> Signed-off-by: Rafael Raposo <[email protected]>
Tracking issue
flyteorg/flyte#4284
Describe your changes
Why
add_extension
method inVscodeConfig
dataclass to append the extension list. Directly changingextension_remote_path
will overwrite the list and not convenient.What
COPILOT_CONFIG
,VIM_CONFIG
,CODE_TOGETHER_CONFIG
COPILOT_EXTENSION
,VIM_EXTENSION
,CODE_TOGETHER_EXTENSION
extension_remote_path
, you can use either str or List[str] as the input variable.Tests
Written in the Setup Process.
You can refer to the flyin tests too, it will teach you how to setup your custom config.
Setup Process
docker build -t localhost:30000/flytekit:flyin-2023-1127-2215 -f DockerfileVscode . docker push localhost:30000/flytekit:flyin-2023-1127-2215
Screenshots