fix: edit command when entrypoint is tweaked
Signed-off-by: David Kwon [email protected]
What does this PR do?
When starting a workspace with devfilev2 with che-theia, the entrypoint (the args attribute) of the dev container component is modified if vscode extensions are present. If the dev container has a command attribute, the container may fail to run, and the workspace Pod would terminate with a CrashLoopBackOff error.
To reproduce the error, go to CHEHOST#https://github.com/eclipse-che/che-theia. The v1->v2 conversion library successfully converts the devfilev1 to devfilev2, but since we have a command defined in the dev container: https://github.com/eclipse-che/che-theia/blob/39511b763c67d02b388787a3b76939ac49241f45/devfile.yaml#L7-L10, the resulting workspace will fail to start because we have:
args:
- 'sh'
- '-c'
- '${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}'
Screenshot/screencast of this PR

What issues does this PR fix or reference?
Explained in What does this PR do?
How to test this PR?
Sorry, I'm having some trouble with creating the dashboard image. I will add it here if I can get it working.
PR Checklist
As the author of this Pull Request I made sure that:
- [x] The Eclipse Contributor Agreement is valid
- [x] Code produced is complete
- [ ] Code builds without errors
- [x] Tests are covering the bugfix
- [ ] The repository devfile is up to date and works
- [ ] Sections
What issues does this PR fix or referenceandHow to test this PRcompleted - [ ] Relevant user documentation updated
- [ ] Relevant contributing documentation updated
- [ ] CI/CD changes implemented, documented and communicated
- [ ] Optional Companion PR for updating the HappyPath tests is approved and ready to be merged
Reviewers
Reviewers, please comment how you tested the PR when approving it.
Happy Path Channel
HAPPY_PATH_CHANNEL=stable
Codecov Report
Merging #1343 (69622af) into main (c299f59) will increase coverage by
3.96%. The diff coverage is37.99%.
@@ Coverage Diff @@
## main #1343 +/- ##
==========================================
+ Coverage 32.78% 36.75% +3.96%
==========================================
Files 290 330 +40
Lines 9885 11334 +1449
Branches 1457 1568 +111
==========================================
+ Hits 3241 4166 +925
- Misses 6641 7163 +522
- Partials 3 5 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...theia-about/src/browser/about-che-theia-dialog.tsx | 0.00% <0.00%> (ø) |
|
| ...credentials/src/browser/che-credentials-service.ts | 0.00% <0.00%> (ø) |
|
| ...entials/src/browser/credentials-frontend-module.ts | 0.00% <0.00%> (ø) |
|
| ...eia-credentials/src/common/credentials-protocol.ts | 0.00% <0.00%> (ø) |
|
| ...eia-credentials/src/node/che-credentials-server.ts | 0.00% <0.00%> (ø) |
|
| ...s/src/node/che-theia-credentials-backend-module.ts | 0.00% <0.00%> (ø) |
|
| ...ashboard/src/browser/che-theia-dashboard-module.ts | 0.00% <0.00%> (ø) |
|
| ...ia-dashboard/src/browser/theia-dashboard-client.ts | 0.00% <0.00%> (ø) |
|
| ...rowser/src/browser/che-mini-browser-environment.ts | 0.00% <0.00%> (ø) |
|
| ...in-ext/src/browser/che-sidecar-file-system-main.ts | 100.00% <ø> (ø) |
|
| ... and 294 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 39511b7...69622af. Read the comment docs.