che icon indicating copy to clipboard operation
che copied to clipboard

CHE-server factory resolver returns an invalid autogenerated devfile

Open olexii4 opened this issue 2 years ago • 0 comments

Describe the bug

We cannot create a new workspace from the long git repo URL if it does not have a devfile. CHE-server factory resolver returns an autogenerated devfile that includes an invalid project name with a length of more than 63 characters.

Che version

next (development version)

Steps to reproduce

  1. Create a new workspace with the next link:
{CHE-server}#https://github.com/olexii4/che-editor-theiahkhjkhkjhkjhjhghjhgfghfhgfhgjfghfghjfghjfhgfghfghjfhgfghfhgjfhgjfhg
  1. We will have a warning message 'Failed to fetch resources. Devfile schema validation failed. Error: 0: instance.projects[0].name does not meet maximum length of 63' Знімок екрана 2024-01-25 о 15 56 23

Expected behavior

A new workspace should created without any warnings.

Runtime

OpenShift

Screenshots

No response

Installation method

chectl/next

Environment

Linux

Eclipse Che Logs

No response

Additional context

che-server response includes not valid project name che-editor-theiahkhjkhkjhkjhjhghjhgfghfhgfhgjfghfghjfghjfhgfghfghjfhgfghfhgjfhgjfhg with 83 character length. So, It is not a valid devfile object.

Знімок екрана 2024-01-24 о 16 12 01

{
  "v": "4.0",
  "source": "repo",
  "devfile": {
    "metadata": {
      "generateName": "che-editor-theiahkhjkhkjhkjhjhghjhgfghfhgfhgjfghfghjfghjfhgfghfghjfhgfghfhgjfhgjfhg"
    },
    "projects": [
      {
        "name": "che-editor-theiahkhjkhkjhkjhjhghjhgfghfhgfhgjfghfghjfghjfhgfghfghjfhgfghfhgjfhgjfhg",
        "source": {
          "location": "https://github.com/olexii4/che-editor-theiahkhjkhkjhkjhjhghjhgfghfhgfhgjfghfghjfghjfhgfghfghjfhgfghfhgjfhgjfhg.git",
          "type": "github"
        }
      }
    ],
    "apiVersion": "1.0.0"
  }
}

olexii4 avatar Jan 25 '24 14:01 olexii4