eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

Not able to start some devfile.io samples with the Intellij IDEA Community #22847

Open akurinnoy opened 7 months ago

akurinnoy commented 7 months ago

Describe the bug

Some devfile.io samples are not able to start within 5 min and then fail with the following message: DevWorkspace failed to progress past step 'Waiting for editor to start' for longer than timeout (300s).

Che version

next (development version)

Steps to reproduce

  1. Go to https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/dashboard/#/create-workspace
  2. Find the django (or go) sample from devfile.io registry.
  3. In the kebab menu (dots in the top-right corner) select IntelliJ IDEA Comunity (or JetBrains PyCharm Community).
  4. A new workspace should be created, but it will fail to start.

Expected behavior

The workspace starts successfully, and the selected editor opens.

Runtime

OpenShift

Screenshots

Screenshot 2024-02-26 at 11 51 17

Screenshot 2024-02-26 at 16 10 10

Screenshot 2024-02-26 at 16 22 25

Installation method

other (please specify in additional context)

Environment

other (please specify in additional context)

Eclipse Che Logs

No response

Additional context

Failed DevWorkspace:

apiVersion: workspace.devfile.io/v1alpha2
kind: DevWorkspace
metadata:
  annotations:
    che.eclipse.org/che-editor: che-incubator/che-idea/next
    che.eclipse.org/devfile: |
      schemaVersion: 2.1.0
      metadata:
        name: go
        displayName: Go Runtime
        description: >-
          Go (version 1.19.x) is an open source programming language that makes it
          easy to build simple, reliable, and efficient software.
        icon: >-
          https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
        tags:
          - Go
        projectType: Go
        language: Go
        provider: Red Hat
        version: 1.2.0
        namespace: akurinnoy-che
      starterProjects:
        - name: go-starter
          description: A Go project with a simple HTTP server
          git:
            checkoutFrom:
              revision: main
            remotes:
              origin: https://github.com/devfile-samples/devfile-stack-go.git
      components:
        - container:
            endpoints:
              - name: http-go
                targetPort: 8080
              - exposure: none
                name: debug
                targetPort: 5858
            image: registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145
            args:
              - tail
              - '-f'
              - /dev/null
            env:
              - name: DEBUG_PORT
                value: '5858'
            memoryLimit: 1024Mi
            mountSources: true
          name: runtime
      commands:
        - exec:
            env:
              - name: GOPATH
                value: ${PROJECT_SOURCE}/.go
              - name: GOCACHE
                value: ${PROJECT_SOURCE}/.cache
            commandLine: go build main.go
            component: runtime
            group:
              isDefault: true
              kind: build
            workingDir: ${PROJECT_SOURCE}
          id: build
        - exec:
            commandLine: ./main
            component: runtime
            group:
              isDefault: true
              kind: run
            workingDir: ${PROJECT_SOURCE}
          id: run
        - exec:
            commandLine: |
              GOPATH=${PROJECT_SOURCE}/.go \
              GOCACHE=${PROJECT_SOURCE}/.cache \
              dlv \
                --listen=127.0.0.1:${DEBUG_PORT} \
                --only-same-user=false \
                --headless=true \
                --api-version=2 \
                --accept-multiclient \
                debug --continue main.go
            component: runtime
            group:
              isDefault: true
              kind: debug
            workingDir: ${PROJECT_SOURCE}
          id: debug
      attributes:
        dw.metadata.annotations:
          che.eclipse.org/devfile-source: |
            url:
              location: https://registry.devfile.io/devfiles/go/1.2.0
            factory:
              params: >-
                che-editor=che-incubator/che-idea/next&storageType=per-workspace&url=https://registry.devfile.io/devfiles/go/1.2.0
    che.eclipse.org/last-updated-timestamp: '2024-02-26T13:06:26.058Z'
  resourceVersion: '1607669760'
  name: go
  uid: d0eed66a-468f-4028-9825-f2158b6102f1
  creationTimestamp: '2024-02-26T13:06:25Z'
  generation: 5
spec:
  contributions:
    - kubernetes:
        name: che-idea-go
      name: editor
  routingClass: che
  started: false
  template:
    attributes:
      controller.devfile.io/devworkspace-config:
        name: devworkspace-config
        namespace: dogfooding
      controller.devfile.io/scc: container-build
      controller.devfile.io/storage-type: per-workspace
      controller.devfile.io/use-starter-project: go-starter
    commands:
      - exec:
          commandLine: go build main.go
          component: runtime
          env:
            - name: GOPATH
              value: '${PROJECT_SOURCE}/.go'
            - name: GOCACHE
              value: '${PROJECT_SOURCE}/.cache'
          group:
            isDefault: true
            kind: build
          workingDir: '${PROJECT_SOURCE}'
        id: build
      - exec:
          commandLine: ./main
          component: runtime
          group:
            isDefault: true
            kind: run
          workingDir: '${PROJECT_SOURCE}'
        id: run
      - exec:
          commandLine: |
            GOPATH=${PROJECT_SOURCE}/.go \
            GOCACHE=${PROJECT_SOURCE}/.cache \
            dlv \
              --listen=127.0.0.1:${DEBUG_PORT} \
              --only-same-user=false \
              --headless=true \
              --api-version=2 \
              --accept-multiclient \
              debug --continue main.go
          component: runtime
          group:
            isDefault: true
            kind: debug
          workingDir: '${PROJECT_SOURCE}'
        id: debug
    components:
      - container:
          args:
            - tail
            - '-f'
            - /dev/null
          endpoints:
            - exposure: public
              name: http-go
              protocol: http
              targetPort: 8080
            - exposure: none
              name: debug
              protocol: http
              targetPort: 5858
          env:
            - name: DEBUG_PORT
              value: '5858'
          image: 'registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145'
          memoryLimit: 1024Mi
          mountSources: true
          sourceMapping: /projects
        name: runtime
    starterProjects:
      - description: A Go project with a simple HTTP server
        git:
          checkoutFrom:
            revision: main
          remotes:
            origin: 'https://github.com/devfile-samples/devfile-stack-go.git'
        name: go-starter
status:
  conditions:
    - lastTransitionTime: '2024-02-26T13:12:20Z'
      message: >-
        DevWorkspace failed to progress past step 'Waiting for editor to start'
        for longer than timeout (300s)
      reason: InfrastructureFailure
      status: 'True'
      type: FailedStart
    - lastTransitionTime: '2024-02-26T13:12:20Z'
      message: Workspace stopped due to error
      status: 'False'
      type: Started
    - lastTransitionTime: '2024-02-26T13:12:20Z'
      status: Unknown
      type: DevWorkspaceResolved
    - lastTransitionTime: '2024-02-26T13:12:20Z'
      status: Unknown
      type: StorageReady
    - lastTransitionTime: '2024-02-26T13:12:20Z'
      status: Unknown
      type: RoutingReady
    - lastTransitionTime: '2024-02-26T13:12:20Z'
      status: Unknown
      type: ServiceAccountReady
    - lastTransitionTime: '2024-02-26T13:12:20Z'
      status: Unknown
      type: PullSecretsReady
    - lastTransitionTime: '2024-02-26T13:12:20Z'
      status: Unknown
      type: DeploymentReady
    - lastTransitionTime: '2024-02-26T13:12:20Z'
      status: Unknown
      type: Ready
  devworkspaceId: workspaced0eed66a468f4028
  mainUrl: >-
    https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/akurinnoy/go/8887/?backgroundColor=434343&wss
  message: >-
    DevWorkspace failed to progress past step 'Waiting for editor to start' for
    longer than timeout (300s)
  phase: Failed
RomanNikitenko commented 7 months ago

From logs:

image
artaleks9 commented 7 months ago

I faced out with this problem, when I was working on the check PR, and rechecked on usual deployed Che next. So, I can exactly speak about problem with run workspace using che-idea/next and che-pycharm/next editor, for Python, django, go and Laravel samples.

RomanNikitenko commented 7 months ago

Not able to start some devfile.io samples with the Intellij IDEA Community

I guess some devfile.io samples contain ubi9-based containers.