-
Notifications
You must be signed in to change notification settings - Fork 99
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
feat: Use post-start event to start VS Code #921
Conversation
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.
A workspace can't start with this editor:
I've tested it in this way:
oc apply -f dw.yaml
where dw.yaml is:
kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
name: git-clone-sample-devworkspace
spec:
started: true
template:
projects:
- name: web-nodejs-sample
git:
remotes:
origin: "https://github.com/che-samples/web-nodejs-sample.git"
commands:
- id: say-hello
exec:
component: che-code-runtime-description
commandLine: echo "Hello from $(pwd)"
workingDir: ${PROJECT_SOURCE}/app
contributions:
- name: che-code
uri: https://gist.githubusercontent.com/svor/e442bfbe8ef1a65278a470528c24daa7/raw/f63edfb7b95249d36e717e9299769c5a3be8bef9/review-che-code.yaml
components:
- name: che-code-runtime-description
container:
env:
- name: CODE_HOST
value: 0.0.0.0
where https://gist.githubusercontent.com/svor/e442bfbe8ef1a65278a470528c24daa7/raw/f63edfb7b95249d36e717e9299769c5a3be8bef9/review-che-code.yaml provides a content of the editor with the current changes, it was taken from https://pr-check-921-devspaces-plugin-registry.surge.sh/v3/plugins/che-incubator/che-code/latest/devfile.yaml
If I try to create a workspace with an upstream editor, it starts:
oc apply -f dw2.yaml
where dw.yaml is:
kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
name: git-clone-sample-devworkspace
spec:
started: true
template:
projects:
- name: web-nodejs-sample
git:
remotes:
origin: "https://github.com/che-samples/web-nodejs-sample.git"
commands:
- id: say-hello
exec:
component: che-code-runtime-description
commandLine: echo "Hello from $(pwd)"
workingDir: ${PROJECT_SOURCE}/app
contributions:
- name: che-code
uri: https://gist.githubusercontent.com/svor/272c56c4aab0468a6079ac932d562a75/raw/6fa7505409e93cabf11e73d2c70478db6d43c07e/che-code2.yaml
components:
- name: che-code-runtime-description
container:
env:
- name: CODE_HOST
value: 0.0.0.0
@RomanNikitenko is it expected?
@svor Will compare what's a difference... UPD: sorry, I have the similar PR for the upstream, so I tested it for upstream... |
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
f696555
to
12751d5
Compare
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.
A workspace has started:
with this DW:
kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
name: git-clone-sample-devworkspace
spec:
started: true
template:
projects:
- name: web-nodejs-sample
git:
remotes:
origin: "https://github.com/che-samples/web-nodejs-sample.git"
commands:
- id: say-hello
exec:
component: che-code-runtime-description
commandLine: echo "Hello from $(pwd)"
workingDir: ${PROJECT_SOURCE}/app
contributions:
- name: che-code
uri: https://gist.githubusercontent.com/svor/e442bfbe8ef1a65278a470528c24daa7/raw/aecded5c28dbb6cf35f36f7fe91803ad66ef8cee/review-che-code.yaml
components:
- name: che-code-runtime-description
container:
env:
- name: CODE_HOST
value: 0.0.0.0
What does this PR do?
Use post-start event instead of command to start VS Code
Upstream changes: eclipse-che/che-plugin-registry#1566
What issues does this PR fix or reference?
eclipse-che/che#21879
Release Notes
Docs PR (if applicable)