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

Che-Code auto-opened terminal doesn't work (for main branch) #21537

Closed
Tracked by #21551
azatsarynnyy opened this issue Jul 7, 2022 · 12 comments · Fixed by che-incubator/che-code#90
Closed
Tracked by #21551

Che-Code auto-opened terminal doesn't work (for main branch) #21537

azatsarynnyy opened this issue Jul 7, 2022 · 12 comments · Fixed by che-incubator/che-code#90
Assignees
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@azatsarynnyy
Copy link
Member

Describe the bug

The terminal widget that's opened automatically on Che-Code start is not connected to machine-exec.
image

Note, that the terminal opened manually (from the dropdown menu) works as expected:
image

Che version

next (development version)

Steps to reproduce

Start a workspace with Che-Code editor.

Expected behavior

The auto-opened terminal should be ready to use.

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

Linux

Eclipse Che Logs

In the editor container:

time="2022-07-07T19:13:47Z" level=error msg="Unable to initialize terminal. Cause: container with name Terminal was not found."


### Additional context

_No response_
@azatsarynnyy azatsarynnyy added kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. team/editors area/editor/vscode Issues related to the Code OSS editor of Che labels Jul 7, 2022
@l0rd
Copy link
Contributor

l0rd commented Jul 7, 2022

The other problem is that when opening from the dropdown the lines are truncated:

truncated-lines

@l0rd
Copy link
Contributor

l0rd commented Jul 7, 2022

And I have also this issue

@pdfruth
Copy link

pdfruth commented Jul 8, 2022

I am impacted by this as well.
Things were working well until about 6-8 (or so) days ago, when @l0rd explained how to enable the VScode editor here.

Is there any way to work around this until a resolution is found?
For example, Is there a way to explicitly set the image tag on the id: che-incubator/che-code/insiders in the che-editor.yaml file?
Looking at the image tags at https://quay.io/repository/che-incubator/che-code?tab=tags I can see that this image was tagged as follows about 8 days ago, when things were working;
quay.io/che-incubator/che-code:insiders-694ef6e

@pdfruth
Copy link

pdfruth commented Jul 11, 2022

Answering my own question

Is there any way to work around this until a resolution is found?
For example, Is there a way to explicitly set the image tag on the id: che-incubator/che-code/insiders in the che-editor.yaml file?

I have reconfigured my project's .che/che-editor.yaml file from this;

id: che-incubator/che-code/insiders
registryUrl: https://eclipse-che.github.io/che-plugin-registry/main/v3

to this;

reference: https://<mygist>/che-editor.yaml

And the file at https://<mygist>/che-editor.yaml contains this;
Notice: the explicit setting of image: quay.io/che-incubator/che-code:insiders-694ef6e refers to a previous version of the quay.io/che-incubator/che-code image, tagged approximately a day or so before the issue being reported above began to manifest

schemaVersion: 2.1.0
metadata:
  name: che-code
commands:
  - id: init-container-command
    apply:
      component: che-code-injector
events:
  preStart:
    - init-container-command
components:
  - name: che-code-runtime-description
    container:
      image: quay.io/devfile/universal-developer-image@sha256:53cec58dd190dd1e06100478ae879d7c28abd8fc883d5fdf5be3eb6e943fe5e7
      command:
        - /checode/entrypoint-volume.sh
      volumeMounts:
        - name: checode
          path: /checode
      memoryLimit: 1024Mi
      memoryRequest: 256Mi
      cpuLimit: 500m
      cpuRequest: 30m
      endpoints:
        - name: che-code
          attributes:
            type: main
            cookiesAuthEnabled: true
            discoverable: false
            urlRewriteSupported: true
          targetPort: 3100
          exposure: public
          path: '?tkn=eclipse-che'
          secure: false
          protocol: https
        - name: code-redirect-1
          attributes:
            discoverable: false
            urlRewriteSupported: true
          targetPort: 13131
          exposure: public
          protocol: http
        - name: code-redirect-2
          attributes:
            discoverable: false
            urlRewriteSupported: true
          targetPort: 13132
          exposure: public
          protocol: http
        - name: code-redirect-3
          attributes:
            discoverable: false
            urlRewriteSupported: true
          targetPort: 13133
          exposure: public
          protocol: http
    attributes:
      app.kubernetes.io/component: che-code-runtime
      app.kubernetes.io/part-of: che-code.eclipse.org
  - name: checode
    volume: {}
  - name: che-code-injector
    container:
      image: quay.io/che-incubator/che-code:insiders-694ef6e
      command:
        - /entrypoint-init-container.sh
      volumeMounts:
        - name: checode
          path: /checode
      memoryLimit: 128Mi
      memoryRequest: 32Mi
      cpuLimit: 500m
      cpuRequest: 30m

@l0rd
Copy link
Contributor

l0rd commented Jul 11, 2022

Thanks for sharing that @pdfruth

azatsarynnyy added a commit to che-incubator/che-code that referenced this issue Jul 11, 2022
Disable terminal auto-opening until eclipse-che/che#21537 is fixed
@azatsarynnyy
Copy link
Member Author

I'm going to disable terminal auto-opening in che-incubator/che-code#68 until we investigate and fix this issue.

@azatsarynnyy
Copy link
Member Author

Fixed for che-incubator/che-code/insiders.
Next, need to fix it in the main branch of Che-Code.

@azatsarynnyy azatsarynnyy self-assigned this Jul 19, 2022
@azatsarynnyy azatsarynnyy added this to the 7.52 milestone Jul 19, 2022
@azatsarynnyy azatsarynnyy changed the title Che-Code auto-opened terminal doesn't work Che-Code auto-opened terminal doesn't work (for main branch) Aug 3, 2022
@azatsarynnyy
Copy link
Member Author

I've investigated what caused that problem \o/
It looks like the recently introduced extended Shell integration support in VS Code https://code.visualstudio.com/updates/v1_70#_terminal
brokes our implementation of the machine-exec-aware terminal.
I'm going to disable that feature by default in Che-Code in order to fix the terminal in the main branch and restore publishing the next images from the main branch.

@l0rd
Copy link
Contributor

l0rd commented Aug 6, 2022

@azatsarynnyy nice catch! Are we still going to replace the machine-exec based terminal support in favor of the VS Code native terminal?

I think that still something that is worth working on to avoid problems like this one in the future and to support extension that rely on the VS Code terminal API like the powershell extension. Opening a remote terminal can be supported using kubectl exec -ti <container-name> -- bash. Let me know if you need me to create an issue for that.

@azatsarynnyy
Copy link
Member Author

@l0rd it was my assumption that the problems of PowerShell extension are caused by our machine-exec implementation of terminal. I want to investigate the PowerShell-related issues first #21626, and then we can decide if it really requires getting rid of the machine-exec stuff, or maybe the problems are caused by other parts of Che-Code.

@l0rd
Copy link
Contributor

l0rd commented Aug 9, 2022

@azatsarynnyy ok please let me know how your investigation is going. And in general we should discuss the value of having the machine-exec based terminal vs its costs.

@azatsarynnyy
Copy link
Member Author

To fix this issue we have disabled the Shell integration support in Che-Code (che-incubator/che-code#90).
After significantly reworking the remote terminals support (#21626 (comment)), we've returned back the VS Code native terminal and enabled Shell integration by default (che-incubator/che-code#124).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants