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

Restart from local devfile doesn't work anymore #23292

Open
batleforc opened this issue Dec 17, 2024 · 15 comments
Open

Restart from local devfile doesn't work anymore #23292

batleforc opened this issue Dec 17, 2024 · 15 comments
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.

Comments

@batleforc
Copy link

Describe the bug

Hi, i just made the update to the latest image and ended up being unable to use the restart from local devfile.
When I use it, the dashboard shows the screen
image

A full reinstall has already been done

Che version

next (development version)

Steps to reproduce

  1. start a workspace based on https://github.com/batleforc/WeeboDevImage
  2. Edit the devfile has follow
schemaVersion: 2.3.0
metadata:
  name: WeeboDevImage
  language: golang
  version: 1.0.0

components:
- name: tools
  container:
    image: ghcr.io/batleforc/weebodevimage/che-golang:main
    memoryLimit: 2Gi
    mountSources: true
- name: devtool
  container:
    image: buildpack-deps:bookworm
    memoryLimit: 1Gi
    mountSources: false
    command: ['tail']
    args: ['-f', '/dev/null']

Use the restart from local devfile feature in vscode
3. Ends up with the following error

    - lastTransitionTime: '2024-12-17T19:43:38Z'
      message: "Error processing devfile: failed to merge DevWorkspace parents/plugins: 1 error occurred:\n\t* Some Attributes are already defined in plugin 'unknown': version. If you want to override them, you should do it in the plugin scope.\n\n"
      reason: BadRequest
      status: 'True'
      type: FailedStart
    - lastTransitionTime: '2024-12-17T19:43:39Z'
      message: Workspace stopped due to error
      status: 'False'
      type: Started
  1. if you edit the dev workspaces object ( update done with headlamp), then no IDE will be injected inside the end object

Expected behavior

To have the workspaces up and running

Runtime

Kubernetes (vanilla)

Screenshots

No response

Installation method

chectl/next

Environment

Linux

Eclipse Che Logs

No response

Additional context

No response

@batleforc batleforc added the kind/bug Outline of a bug - must adhere to the bug report template. label Dec 17, 2024
@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 Dec 17, 2024
@ibuziuk
Copy link
Member

ibuziuk commented Dec 18, 2024

@RomanNikitenko @azatsarynnyy @vitaliy-guliy please, take a look?

@ibuziuk ibuziuk added area/editor/vscode Issues related to the Code OSS editor of Che severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Dec 18, 2024
@RomanNikitenko
Copy link
Member

RomanNikitenko commented Dec 18, 2024

@vitaliy-guliy
could you check if it's related to the recent changes in the che-code: che-incubator/che-code#465

@vitaliy-guliy
Copy link
Contributor

I have checked it on our dogfooding cluster (OpenShift based) and haven't found any issues.
Will retry it right now on the minikube.

@vitaliy-guliy
Copy link
Contributor

@batleforc does restart from local devfile work if you just add a container environment variable?

@batleforc
Copy link
Author

Hi @vitaliy-guliy
Same problem,
I've tried with the following devfile:

schemaVersion: 2.3.0
metadata:
  name: WeeboDevImage
  language: golang
  version: 1.0.0

components:
- name: tools
  container:
    image: ghcr.io/batleforc/weebodevimage/che-golang:main
    memoryLimit: 2Gi
    mountSources: true
    env:
      - name: ENV
        value: dev-che

@batleforc
Copy link
Author

image

@ibuziuk
Copy link
Member

ibuziuk commented Dec 18, 2024

@vitaliy-guliy @RomanNikitenko @azatsarynnyy probably unrelated to this issue but today I have the following error on Developer Sandbox when trying to restart from the local devfile:

Screenshot 2024-12-18 at 17 04 13

for what it worth there are no self-signed certs on the rosa cluster afaik

@batleforc
Copy link
Author

@ibuziuk Already had the issue in my own setup, just had to restart the full che instance to fix it

@ibuziuk
Copy link
Member

ibuziuk commented Dec 19, 2024

cc: @tolusha

@vitaliy-guliy
Copy link
Contributor

@batleforc I've created a test PR che-incubator/che-code#470
Could you create a workspace using the editor from the PR ( quay.io/che-incubator-pull-requests/che-code:pr-470-amd64 ) and try to restart the workspace, but skip copying the attributes?
I've added saving the new devworkspace object to '/projects/new-devfile.yaml', it is possible to cancel updating the devfile and check for changes.

@batleforc
Copy link
Author

Hi @vitaliy-guliy
I've setup the new workspace and restarted will skipping the copying of attributes, and it perfectly works. I made the most basic change (reverting the add of the env or no change at all) and I end up with the previous error.

@vitaliy-guliy
Copy link
Contributor

@batleforc it fails when copying the attributes, right? If yes, could you share both (of course, if it can be shared) '/projects/new-devfile.yaml' files, with and without attributes? I just want to understand whether the section contains some attributes, that we should not copy.

@batleforc
Copy link
Author

@vitaliy-guliy it fails when copying the attributes 👍 and yes, there is nothing private in those manifest.

Without copying the attributes:

devfile:
  schemaVersion: 2.3.0
  metadata:
    name: WeeboDevImage
    language: golang
    version: 1.0.0
  components: &ref_0
    - name: tools
      container:
        image: ghcr.io/batleforc/weebodevimage/che-golang:main
        memoryLimit: 2Gi
        mountSources: true
devWorkspace:
  apiVersion: workspace.devfile.io/v1alpha2
  kind: DevWorkspace
  metadata:
    name: WeeboDevImage
    annotations:
      che.eclipse.org/devfile: |
        schemaVersion: 2.3.0
        metadata:
          name: WeeboDevImage
          language: golang
          version: 1.0.0
        components:
          - name: tools
            container:
              image: ghcr.io/batleforc/weebodevimage/che-golang:main
              memoryLimit: 2Gi
              mountSources: true
  spec:
    started: true
    routingClass: che
    template:
      components: *ref_0
      projects:
        - git:
            remotes:
              origin: https://github.com/batleforc/WeeboDevImage.git
          name: weebodevimage
    contributions:
      - name: editor
        kubernetes:
          name: che-code-WeeboDevImage
devWorkspaceTemplates:
  - apiVersion: workspace.devfile.io/v1alpha2
    kind: DevWorkspaceTemplate
    metadata:
      name: che-code-WeeboDevImage
    spec: {}
suffix: WeeboDevImage

While copying the attributes :

devfile:
  schemaVersion: 2.3.0
  metadata:
    name: WeeboDevImage
    language: golang
    version: 1.0.0
  components: &ref_0
    - name: tools
      container:
        image: ghcr.io/batleforc/weebodevimage/che-golang:main
        memoryLimit: 2Gi
        mountSources: true
devWorkspace:
  apiVersion: workspace.devfile.io/v1alpha2
  kind: DevWorkspace
  metadata:
    name: WeeboDevImage
    annotations:
      che.eclipse.org/devfile: |
        schemaVersion: 2.3.0
        metadata:
          name: WeeboDevImage
          language: golang
          version: 1.0.0
        components:
          - name: tools
            container:
              image: ghcr.io/batleforc/weebodevimage/che-golang:main
              memoryLimit: 2Gi
              mountSources: true
  spec:
    started: true
    routingClass: che
    template:
      components: *ref_0
      projects:
        - git:
            remotes:
              origin: https://github.com/batleforc/WeeboDevImage.git
          name: weebodevimage
      attributes:
        controller.devfile.io/devworkspace-config:
          name: devworkspace-config
          namespace: eclipse-che
        controller.devfile.io/storage-type: per-user
        version: null
    contributions:
      - name: editor
        kubernetes:
          name: che-code-WeeboDevImage
devWorkspaceTemplates:
  - apiVersion: workspace.devfile.io/v1alpha2
    kind: DevWorkspaceTemplate
    metadata:
      name: che-code-WeeboDevImage
    spec: {}
suffix: WeeboDevImage

@batleforc
Copy link
Author

And I made absolutely no change to the devfile and encountered the problem

@vitaliy-guliy
Copy link
Contributor

And I made absolutely no change to the devfile and encountered the problem

Thanks, version: null in the attrubutes looks strange.
I will update the pull request a bit, I think it make sense to copy only attributes which value is not empty.

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
Status: No status
Development

No branches or pull requests

5 participants