-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
che task: Cannot run a che command after workspace restart for some containers #13993
Comments
From the screenshot, it looks like the name of the container is wrong (javalce vs. javaebs): does it change when we restart the workspace? Does che remember the container by id when first running a command? |
I couldn't reproduce with your devfile, but my current che installation is from yesterday (chectl/operator on OCP 4), so if that's something new I wouldn't catch it. |
@rhopp redeploy che, set image pull policy to always. It's what Jesus would do :-) |
@sunix can you open terminals for the containers? |
If I edit tasks.json and correct the container name, it works fine. The problem is that now we are persisting che commands in tasks.json ... only the first time. But the container name is changing after restart for plugins and editors. So the tasks are trying to run that on previous container name before the restart of the workspace. |
I can open terminals |
Yeah that behavior is weird and not synchronized with the devfile. linked to the epic. |
@skabashnyuk : This is very weird. Is that the configuration given in the devfile not supposed to be persisted as workspace configuration? |
@slemeur , it is a problem introduced by latest changes in the task plugin, the container running some plugins is changing name after restart. |
the question is: why side cars container with plugins has that generated suffix ? |
@slemeur We don't have the synchronization for But I didn't take in account that side cars container with plugins has that generated suffix. |
@RomanNikitenko can you provide more details about the fix you are thinking about? I am setting it as milestone |
@l0rd As quick fix at conflict resolving we can replace For case if user changed in
|
What is the value (for a developer) of editing a Che command from the tasks.json:
But the most important thing is that the devfile is the place where you want to persist configuration because it is portable and you could share it afterwards. We should have the devfile overrides tasks.json at workspace restart.
|
Editing tasks.json and having those changes persisted is much more valuable to me than having changes to the devfile override tasks.json. Editing devfiles is an enormous pain (see #13982) and not easily accessible. OTOH, I've frequently modified tasks.json to update or change commands, even just to test devfile improvements. If the server is to overwrite my tasks.json with what's in the devfile, that would be bad UX. In an even more involved use-case, having the devfile overwrite tasks.json would make working in a Che workspace for longer than "trying it out" very painful, since every task change would require
In environments where your workspace is stopped after 30 minutes of idling, this completely ends usability. |
Hello I have just been through this issue during a live demo at a developer conference. Could we consider a fix for this? |
@sunix What your blocker label means we don't release 7.3.0? |
@vparfonov it means it makes commands that would run in plugin sidecar containers unsuable after restart. So plz fix it ASAP. I put it blocker because it is breaking demos we are doing at conferences (and customer demos). |
Describe the bug
Cannot rerun commands that are targeting a plugin container after restart of a workspace.
Che version
Steps to reproduce
start a workspace with this devfile containing a command that would run on a plugin sidecar container. For instance:
open the workspace and execute the task: it works well
stop the workspace
restart it and reopen it
Try to run the task again, it doesn't work anymore. The terminal is appearing but nothing is executed.
The error
Uncaught (in promise) Error: container with name vscode-javaebs was not found. For workspace: workspaceeau9fy5dqm79n36l
. But thevscode-javaebs
was the container name when it started the first time.Fixing the
/projects/.theia/tasks.json
with the right machineName works.Expected behavior
The task is supposed to be running after restart and display "hello world" (for the previous example)
Runtime
minikube version
andkubectl version
)Installation method
Environment
The text was updated successfully, but these errors were encountered: