che
che copied to clipboard
CHE-server factory resolver returns an invalid autogenerated devfile
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
- Create a new workspace with the next link:
{CHE-server}#https://github.com/olexii4/che-editor-theiahkhjkhkjhkjhjhghjhgfghfhgfhgjfghfghjfghjfhgfghfghjfhgfghfhgjfhgjfhg
- 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'
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.
{
"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"
}
}