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

feat: Use post-start event to start VS Code #1566

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 12 additions & 4 deletions che-editors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,15 @@ editors:
- id: init-container-command
apply:
component: che-code-injector
- id: init-che-code-command
exec:
component: che-code-runtime-description
commandLine: 'nohup /checode/entrypoint-volume.sh > /checode/entrypoint-logs.txt 2>&1 &'
events:
preStart:
- init-container-command
postStart:
- init-che-code-command
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main idea is - initialization of the che-code on the post-start event vs execution entrypoint as a command to avoid overriding the UDI entrypoint.

I've tested creation of a workspace for the VS Code editor without Dashboard usage and I can confirm that the UDI entrypoint is not overridden anymore if I use these changes for the description of the editor.

At the same time there is still a problem when I create a workspace from the dashboard. So - I guess:

  • logic on the DWO side works correctly
  • we still need some changes on the dashboard side

I guess resolving this issue should fix the problem on the dashboard side.
So, let's keep the PR still as a draft.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it using this sample, it contains the same changes for the editor description.
It works well after merging the corresponding changes on the dashboard side.

components:
- name: che-code-injector
container:
Expand All @@ -366,8 +372,6 @@ editors:
memoryRequest: 256Mi
cpuLimit: 500m
cpuRequest: 30m
command:
- /checode/entrypoint-volume.sh
volumeMounts:
- name: checode
path: /checode
Expand Down Expand Up @@ -426,9 +430,15 @@ editors:
- id: init-container-command
apply:
component: che-code-injector
- id: init-che-code-command
exec:
component: che-code-runtime-description
commandLine: 'nohup /checode/entrypoint-volume.sh > /checode/entrypoint-logs.txt 2>&1 &'
events:
preStart:
- init-container-command
postStart:
- init-che-code-command
components:
- name: che-code-injector
container:
Expand All @@ -448,8 +458,6 @@ editors:
memoryRequest: 256Mi
cpuLimit: 500m
cpuRequest: 30m
command:
- /checode/entrypoint-volume.sh
volumeMounts:
- name: checode
path: /checode
Expand Down