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

Run workspace from factory of Bitbucket.org repo using devfile ver.1.0.0 (or no devfile) fails on DS 3.2.0

    • False
    • None
    • False
    • Release Notes
    • Hide
      = New workspaces based on Bitbucket.org-hosted repositories fail to start without a v2 devfile

      Currently, new workspaces based on a Bitbucket.org-hosted repository fail to start if the repository contains no devfile or a v1 devfile. The result is the *Failed to create the workspace* error message.

      .Workaround

      * If the repository does not contain a devfile, add a v2.1 devfile to the repository.

      * If the repository contains a v1 devfile, migrate the devfile from v1 to v2.1. See link:https://devfile.io/docs/2.1.0/migrating-to-devfile-v2[].
      Show
      = New workspaces based on Bitbucket.org-hosted repositories fail to start without a v2 devfile Currently, new workspaces based on a Bitbucket.org-hosted repository fail to start if the repository contains no devfile or a v1 devfile. The result is the *Failed to create the workspace* error message. .Workaround * If the repository does not contain a devfile, add a v2.1 devfile to the repository. * If the repository contains a v1 devfile, migrate the devfile from v1 to v2.1. See link: https://devfile.io/docs/2.1.0/migrating-to-devfile-v2 [].
    • Known Issue
    • Done
    • Workaround Exists
    • Hide

      If no devfile present, add a v2.1 devfile. If a v1 devfile is present, replace apiVersion: 1.0.0 with schemaVersion: 2.1.0 in workspace's devfile.yaml

      Show
      If no devfile present, add a v2.1 devfile. If a v1 devfile is present, replace apiVersion: 1.0.0 with schemaVersion: 2.1.0 in workspace's devfile.yaml
    • Hide
      Show
      Deploy DS 3.2.0 on OCP cluster Launch factory from Bitbucket.org repo which uses devfile.yaml with apiversion 1.0.0 , e.g. https://devspaces.apps.ocp411-oshmara.crw-qe.com/f?url=https://bitbucket.org/ashmaraev/public-bb-repo/src/master/ See the error

      • When trying to run a workspace from factory from Bitbucket.org repo using devfile apiversion 1.0.0, the process fails with an error:
      dashboard start workspace page
      Unable to create devworkspace: DevWorkspace.workspace.devfile.io "public-repo-testname" is invalid: [<nil>: Invalid value: "": "spec.template.projects[0]" must validate one and only one schema (oneOf). Found none valid, spec.template.projects[0].git: Required value]
      
      method:POST/devworkspace
      {
        "devworkspace": {
          "apiVersion": "workspace.devfile.io/v1alpha2",
          "kind": "DevWorkspace",
          "metadata": {
            "name": "public-repo-testname",
            "namespace": "admin-devspaces",
            "annotations": {
              "che.eclipse.org/devfile-source": "url:\n  location: 'https://bitbucket.org/ashmaraev/public-bb-repo/src/master/'\nfactory:\n  params: 'url=https://bitbucket.org/ashmaraev/public-bb-repo/src/master/'\n",
              "che.eclipse.org/last-updated-timestamp": "2022-10-13T14:01:46.560Z",
              "che.eclipse.org/che-editor": "eclipse/che-theia/latest"
            },
            "labels": {},
            "uid": ""
          },
          "spec": {
            "started": false,
            "routingClass": "che",
            "template": {
              "components": [],
              "attributes": {
                "metadata-name-field": "generateName",
                "metadata-name-original-value": "public-repo-testname",
                "dw.metadata.annotations": {
                  "che.eclipse.org/devfile-source": "url:\n  location: 'https://bitbucket.org/ashmaraev/public-bb-repo/src/master/'\nfactory:\n  params: 'url=https://bitbucket.org/ashmaraev/public-bb-repo/src/master/'\n",
                  "che.eclipse.org/last-updated-timestamp": "2022-10-13T14:01:46.560Z",
                  "che.eclipse.org/che-editor": "eclipse/che-theia/latest"
                },
                "che-theia.eclipse.org/sidecar-policy": "mergeImage"
              },
              "projects": [
                {
                  "attributes": {},
                  "name": "public-bb-repo"
                }
              ],
              "commands": []
            }
          }
        }
      }
      
      • Note: if use devfile.yaml with schemaVersion: 2.1.0 a workspace is run properly

            [CRW-3440] Run workspace from factory of Bitbucket.org repo using devfile ver.1.0.0 (or no devfile) fails on DS 3.2.0

            • Verified on DS 3.6.0.RC-20-04 with
            Index image v4.10: brew.registry.redhat.io/rh-osbs/iib:482692
            Index image v4.12: brew.registry.redhat.io/rh-osbs/iib:482694
            

            works properly - a workspace can be run

            • The issue is closed

            Shmaraiev Oleksandr added a comment - Verified on DS 3.6.0.RC-20-04 with Index image v4.10: brew.registry.redhat.io/rh-osbs/iib:482692 Index image v4.12: brew.registry.redhat.io/rh-osbs/iib:482694 works properly - a workspace can be run The issue is closed

            Ilya Buziuk added a comment - Merged to main https://github.com/eclipse-che/che-dashboard/pull/750 Resolving

            Still can reproduce on v. 3.5.0

            apiVersion: 1.0.0
            metadata:
              name: private-repo-testname

            Maryna Dolhalova (Inactive) added a comment - Still can reproduce on v. 3.5.0 apiVersion: 1.0.0 metadata: name: private-repo-testname

            Nick Boldt added a comment -

            Slip to 3.5 – is this something that can be owned by someone else? Seems Florent has moved on to other projects...

            Nick Boldt added a comment - Slip to 3.5 – is this something that can be owned by someone else? Seems Florent has moved on to other projects...

            Ilya Buziuk added a comment -

            fbenoit@redhat.com hi, maybe you can take a look at this converter issue for 3.4 ?

            Ilya Buziuk added a comment - fbenoit@redhat.com hi, maybe you can take a look at this converter issue for 3.4 ?

            Oleksii Orel added a comment - - edited

            I have analyzed this bug. If we remove 'projects' or change the source type to 'git'  it will create and start a new workspace.

            I have tested it with https://gist.githubusercontent.com/olexii4/fc3b757806e660dee0fbe1bc131df3d1/raw/b72b77b4b96f1a85e6b85137d7bbfef2216fe7c6/empty.yaml

             So, this problem depends on the devfile-converter lib:
            ```

            "@eclipse-che/devfile-converter": "0.0.1-d624e3e"

            ```.

            Oleksii Orel added a comment - - edited I have analyzed this bug. If we remove 'projects' or change the source type to 'git'  it will create and start a new workspace. I have tested it with https://gist.githubusercontent.com/olexii4/fc3b757806e660dee0fbe1bc131df3d1/raw/b72b77b4b96f1a85e6b85137d7bbfef2216fe7c6/empty.yaml  So, this problem depends on the devfile-converter lib: ``` "@eclipse-che/devfile-converter": "0.0.1-d624e3e" ```.

            Ilya Buziuk added a comment -

            still, reproducible on 3.3 should be planned for 3.4

            Ilya Buziuk added a comment - still, reproducible on 3.3 should be planned for 3.4

            ibuziuk@redhat.com

            Shmaraiev Oleksandr added a comment - ibuziuk@redhat.com I checked, that you asked - launch a factory from repo without a `devfile`. Factory link e.g. -> https://devspaces.apps.ocp411-oshmara.crw-qe.com/f?url=https://bitbucket.org/ashmaraev/my-repo/src/master/ It seems we have the same result, see the screenshot:

            Ilya Buziuk added a comment -

            oshmarai could you please clarify what happens if the repo does not contain devfile at all?

            Ilya Buziuk added a comment - oshmarai could you please clarify what happens if the repo does not contain devfile at all?

              oorel Oleksii Orel
              oshmarai Shmaraiev Oleksandr
              Shmaraiev Oleksandr Shmaraiev Oleksandr
              Max Leonov Max Leonov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: