question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Task: Changing a command in the devfile of an existing workspace is not taken in account

See original GitHub issue

Describe the bug

Changing any of the devfile commands of an existing (and started) workspace from the dashboard is not affecting the workspace (even after restart).

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

  1. start a workspace with this devfile containing a command that would run on a plugin side car container. For instance:

     $ chectl workspace:start -f <(chectl devfile:generate --name=test-task-change-devfile --dockerimage=sunix/git-devtools --command="echo hello world")
       ✔ Retrieving Che Server URL...http://che-che.192.168.39.13.nip.io
       ✔ Verify if Che server is running...RUNNING (auth disabled)
       ✔ Create workspace from Devfile /dev/fd/63
     
     Workspace IDE URL:
     http://che-che.192.168.39.13.nip.io/dashboard/#/ide/che/test-task-change-devfile
    
    apiVersion: 1.0.0
    metadata:
      name: test-task-change-devfile
    components:
      - alias: sunix-git-devtools
        type: dockerimage
        image: sunix/git-devtools
        memoryLimit: 512M
        mountSources: true
        command:
          - tail
        args:
          - '-f'
          - /dev/null
    commands:
      - name: echo hello world
        actions:
          - type: exec
            command: echo hello world
            component: sunix-git-devtools
            workdir: /projects/
    
  2. open the workspace and execute the task: it works well Eclipse Che | test-task-change-devfile - Google Chrome_361

  3. stop the workspace

  4. go to the dashboard and edit the devfile. Change the command to display ‘hello che world’ Selection_362

  5. restart the workspace

  6. rerun the task. It is displaying ‘hello world’ and not ‘hello che world’ Eclipse Che | test-task-change-devfile - Google Chrome_363

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
  • che-operator
  • minishift-addon
  • I don’t know

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • other: please specify

Additional context

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
RomanNikitenkocommented, Jul 24, 2019
  • We have tasks in a devfie, they are copied to a config file when workspace is started.
  • User can edit the tasks in a config file and the changes are applied for execution in runtime
  • We have conflict if user doesn’t change the label for the task - we have one task from devfile and one from config file with the same label.
  • I proposed to add some prefix if we have conflict, and it was another opinion to avoid prefixing
  • At the moment the tasks from tasks.json file have higher priority than tasks from devfile (because user working in the running workspace and if he changes some args for command it’s expected to execute this configuration from tasks.json file, not origin task from devfile)

I think the issue can be fixed when we provide synchronization for config file and devfile. At the moment as workaround user can edit label for the task which he customized.

0reactions
che-botcommented, Jan 4, 2021

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 4. Authoring devfiles - Red Hat Customer Portal
A list of pre-defined commands. Projects to clone. A devfiles is a YAML file that CodeReady Workspaces consumes and transforms into a cloud...
Read more >
Introduction to Devfile - GitHub Pages
Commands expanded​​ Devfile allows to specify commands set to be available for execution in workspace. Each command may contain subset of actions, which...
Read more >
Adding commands - Devfile
Adding commands. A devfile allows to specify commands to be available for execution in a workspace. Every command can contain a subset of...
Read more >
Import a project from your laptop to an Eclipse Che workspace.
Defining an Eclipse Che workspace for a project (create a devfile ). ... oc rsync command. But there is no exclude filter taken...
Read more >
Re: [che-dev] How to collect and persist all workspace logs?
Right, the command `workspace:start` only creates a workspace from a devfile, it does not call the workspace start API. > > But the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found