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

Workspace panel actions are not working #19441

Closed
1 of 23 tasks
tsmaeder opened this issue Mar 29, 2021 · 20 comments
Closed
1 of 23 tasks

Workspace panel actions are not working #19441

tsmaeder opened this issue Mar 29, 2021 · 20 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. sprint/current

Comments

@tsmaeder
Copy link
Contributor

tsmaeder commented Mar 29, 2021

Describe the bug

I opened my usual self-hosting workspace this morning and ended up with an empty workspace. I saw no source in the explorer and I could not open any terminals in containers. After realizing I had no workspace roots open, I opened one by hand and my projects appeared. I could now open terminals in user containers, but not in any containers inside the "plugins" folder in the "my workspace" sidebar.

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

Start a workspace and try to use any action from the Workspace panel.
Also see: #19441 (comment)

Expected behavior

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift (include output of oc version)
  • minikube (include output of minikube version and kubectl version)
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • other: (please specify)

Screenshots

Installation method

  • chectl
    • provide a full command that was used to deploy Eclipse Che (including the output)
    • provide an output of chectl version command
  • OperatorHub
  • I don't know

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • Dev Sandbox (workspaces.openshift.com)
  • other: please specify

Eclipse Che Logs

Additional context

@tsmaeder tsmaeder added the kind/bug Outline of a bug - must adhere to the bug report template. label Mar 29, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Mar 29, 2021
@tsmaeder
Copy link
Contributor Author

Correction: opening terminals does not work in any container, it's just that I already had some open in that workspace.

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Mar 29, 2021

Thanks, Thomas, for raising the issue!

I tested on the dogfooding instance for the next version of the che-theia editor.
I can not reproduce the problem.

We need more details and steps to reproduce for an investigation.

@azatsarynnyy
Copy link
Member

I suspect, the steps maybe something like:

  • create a new persisted workspace with several projects where the multi-root mode is off
  • turn the multi-root mode on and restart the workspace
  • check the explorer

Maybe the problem is related to persisting/restoring the IDE state when one changes the multi-root mode across the sessions?

@benoitf
Copy link
Contributor

benoitf commented Mar 29, 2021

@tsmaeder please share console log of the browser when clicking on 'new terminal' icon

@tsmaeder
Copy link
Contributor Author

The browser log says:

Uncaught (in promise) Error: command 8 not found
    at Function.MessageFactory.replyErr (/home/theia/node_modules/@theia/plugin-ext/lib/common/rpc-protocol.js:380)
    at /home/theia/node_modules/@theia/plugin-ext/lib/common/rpc-protocol.js:246
    at processTicksAndRejections (/dashboard/internal/process/task_queues.js:97)

This looks like a command with arguments (aka "safe command") is not found when the front end is trying to execute the command.

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Mar 29, 2021

I see.
Looks like the problem is actual for the Workspace panel.
I tested it for Terminal menu when I wrote that I couldn't reproduce the issue

@tsmaeder
Copy link
Contributor Author

Confirmed, the commands from the "F1" menu work, as well.

@benoitf
Copy link
Contributor

benoitf commented Mar 29, 2021

it can't be a side effect of eclipse-theia/theia#9223 ?

@benoitf
Copy link
Contributor

benoitf commented Mar 29, 2021

I'm using quay.io/eclipse/che-theia:1caeb61 in my workspace and it works, trying with new images

@benoitf
Copy link
Contributor

benoitf commented Mar 29, 2021

so it doesn't work with quay.io/eclipse/che-theia:c881e91 aka eclipse-che/che-theia@c881e91 but works with quay.io/eclipse/che-theia:1caeb61 aka eclipse-che/che-theia@1caeb61

so I suspect regression is coming from upstream theia change

@azatsarynnyy
Copy link
Member

@RomanNikitenko could you please check it with the upstream commit before eclipse-theia/theia#9223

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Mar 29, 2021

Now I see that it's not related to the terminal functionality - the Workspace panel doesn't work for me at all!

I get the errors like:

actions

for any action from the Workspace panel

@RomanNikitenko RomanNikitenko changed the title Cannot open Terminal on Plugin Container in Multi Root Workspace Workspace panel actions are not working Mar 29, 2021
@RomanNikitenko
Copy link
Member

RomanNikitenko commented Mar 29, 2021

@RomanNikitenko could you please check it with the upstream commit before eclipse-theia/theia#9223

For testing I used the PR: eclipse-che/che-theia#1049
I pinned the theia commit: eclipse-theia/theia@d9c0fab
Che-theia commit: eclipse-che/che-theia@abda623

The Workspace panel works well for me.
You can use the devfile or the images provided by Happy Path tests: eclipse-che/che-theia#1049 (comment) for testing.

So, I believe the regression was caused by upstream changes after the commit: eclipse-theia/theia@d9c0fabb4

@azatsarynnyy
Copy link
Member

Thanks @RomanNikitenko for checking it.
@tsmaeder could you please take a look at eclipse-theia/theia#9223?
Maybe revert the commit, while investigating the issue.

@azatsarynnyy
Copy link
Member

I'm setting blocker as it prevents consuming the latest changes from the upstream Theia.

@azatsarynnyy azatsarynnyy added the severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. label Mar 29, 2021
@tsmaeder tsmaeder self-assigned this Mar 29, 2021
@tsmaeder
Copy link
Contributor Author

tsmaeder commented Mar 29, 2021

Not sure it's a blocker, technically, since there is a workaround. (use terminal menu and "Run Task...")

@ibuziuk ibuziuk removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Mar 29, 2021
@ericwill ericwill mentioned this issue Mar 29, 2021
46 tasks
@tsmaeder
Copy link
Contributor Author

t.b.h, I think the mechanism for "safeCommands" never worked at all:
the code here: https://github.com/eclipse-theia/theia/blob/master/packages/plugin-ext/src/plugin/command-registry.ts#L185 is supposed to convert commands with arguments into "safe commands". The command is remembered in the plugin host and only a proxy command is sent to the browser.
But only if "command.command" was not falsy (before). Since "toInternalCommand()" above makes sure the command never has a field "command", the code in the 'if' block never was executed.
I removed the if (command.command...) check. So now the conversion is actually done, as intended and that revealed the bogosity of the rest of the code.

@tsmaeder
Copy link
Contributor Author

The above analysis is slightly wrong: the command that is converted to an "internal" command is not used when creating a "safe command". So the command conversion is only broken for commands that use the field Command.id instead of Command.command.

@tsmaeder
Copy link
Contributor Author

Command.id is deprecated, so the right fix is determined by whether we can remove the id field and make command mandatory (as it is in the vscode API):

@RomanNikitenko
Copy link
Member

@tsmaeder
I guess we can close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. sprint/current
Projects
None yet
Development

No branches or pull requests

7 participants