Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-1717

If metadata.name is changed for an existing devfile, an SQL error is shown and changes cannot be saved; Discard Changes does not refresh editor

    XMLWordPrintable

Details

    • False
    • False

    Description

      1. launch workspaces.openshift.com
      2. select Workspaces -> Add Workspace -> Custom Workspace
      3. paste in new devfile from this PR https://raw.githubusercontent.com/redhat-developer/codeready-workspaces/2781f57708146a2a2eb12b7346104733d5c5f7ed/dependencies/che-devfile-registry/devfiles/00_java8-maven-eap/devfile.yaml
      4. open workspace
      5. note that the commands fail, because the path to the project is now different (was ${CHE_PROJECTS_ROOT}/kitchensink-example, now needs to be ${CHE_PROJECTS_ROOT}/kitchensink-example/kitchensink-jsp
      6. shut down the workspace
      7. go edit your devfile, to fix the commands as noted above:

      diff --git a/dependencies/che-devfile-registry/devfiles/00_java8-maven-eap/devfile.yaml b/dependencies/che-devfile-registry/devfiles/00_java8-maven-eap/devfile.yaml
      index e8a3c9f1..9c39889c 100644
      --- a/dependencies/che-devfile-registry/devfiles/00_java8-maven-eap/devfile.yaml
      +++ b/dependencies/che-devfile-registry/devfiles/00_java8-maven-eap/devfile.yaml
      @@ -43,7 +43,7 @@ commands:
         -
           name: 1. Build
           actions:
      -      - workdir: '${CHE_PROJECTS_ROOT}/kitchensink-example'
      +      - workdir: '${CHE_PROJECTS_ROOT}/kitchensink-example/kitchensink-jsp'
               type: exec
               command: scl enable rh-maven35 'mvn clean install'
               component: maven
      @@ -65,7 +65,7 @@ commands:
               component: maven
               command: cp target/*.war /opt/eap/standalone/deployments/ROOT.war && 
                 echo 'Archive was deployed, click on eap endpoint from Workspace view to open the application'
      -        workdir: ${CHE_PROJECTS_ROOT}/kitchensink-example
      +        workdir: ${CHE_PROJECTS_ROOT}/kitchensink-example/kitchensink-jsp
         -
           name: 4. Hot update
           actions:
      @@ -73,7 +73,7 @@ commands:
               type: exec
               component: maven
               command: "scl enable rh-maven35 'mvn clean install' && sleep 2 && cp target/*.war /opt/eap/standalone/deployments/ROOT.war"
      -        workdir: ${CHE_PROJECTS_ROOT}/kitchensink-example
      +        workdir: ${CHE_PROJECTS_ROOT}/kitchensink-example/kitchensink-jsp
      

      But... can't save changes!

      8. If I paste in new changes, the SAVE button flashes green then grey again... and while it might look like an autosave happened... nope!

      Attachments

        1. image-2021-04-06-14-06-40-996.png
          image-2021-04-06-14-06-40-996.png
          64 kB
        2. image-2021-04-06-14-07-06-128.png
          image-2021-04-06-14-07-06-128.png
          2 kB
        3. Screenshot_20210625_110546.png
          Screenshot_20210625_110546.png
          202 kB
        4. Screenshot_20210625_153601.png
          Screenshot_20210625_153601.png
          170 kB
        5. screenshot-1.png
          screenshot-1.png
          212 kB
        6. screenshot-2.png
          screenshot-2.png
          43 kB
        7. screenshot-3.png
          screenshot-3.png
          28 kB
        8. screenshot-4.png
          screenshot-4.png
          297 kB
        9. screenshot-5.png
          screenshot-5.png
          48 kB

        Issue Links

          Activity

            People

              tdancs Tibor Dancs (Inactive)
              nickboldt Nick Boldt
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: