Devfile generateName only works in factory URLs
See original GitHub issueDescribe the bug
Currently, devfiles with generateName
instead of name
are handled in a somewhat confusing way. If the user passes the devfile through a factory url (/f?url=<>
), the devfile is used to create a workspace with the generated name set as .metadata.name
. However, devfiles with the generateName field cannot be pasted into a workspace config, as generateName is not supported there.
Having a feature in the devfile spec that is only valid in some cases is confusing.
Che version
- nightly
Steps to reproduce
- Start workspace from devfile with generateName field (e.g. https://github.com/eclipse/che-devfile-registry/blob/master/devfiles/java-maven/devfile.yaml)
- Check config, see that generateName is gone and instead
.metadata.name
is set - Try pasting devfile contents into workspace config, note validation error.
Expected behavior
The same devfile should be able to be passed to Che through all normal methods.
Additional context
https://github.com/eclipse/che/pull/14243#issuecomment-535911322
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (20 by maintainers)
Top Results From Across the Web
Chapter 4. Authoring devfiles - Red Hat Customer Portal
When only generateName is defined, it is used as the base of the generated name: <generateName>YYYYY. Note. For workspaces created using a factory,...
Read more >Introduction to Devfile - GitHub Pages
Please note that currently this way only works for the local (same machine) devfiles - URL can't be used here atm. Project details....
Read more >Re: [che-dev] Add metadata.namespace to Devfile - Eclipse
A devfile is a file format. It's main use case is to be shared (on a git repo for example) and used on...
Read more >Discover Eclipse Che 7 : devfile - Medium
By using instead of generateName metadata.name there will be no prefix so workspace names will all use only that name, however, ...
Read more >CHANGELOG.md · master · Jonathan Torres / che · GitLab
Get rid of non-working workaround to flakiness when Java LS server initialization failed ... factory will always use devfile generateName #14311 (sparkoo) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s because of Dashboard. But when you use
chectl workspace:start
and use devfile from devfile registry - you’ll get workspace with name<generateName><generatedPart>
. Probably reusing generate name instead of generatingwksp-xxxx
might be a good change for Dashboard as well.I guess it’s not actual anymore, and I’m sure it must be fixed by https://github.com/eclipse/che-dashboard/pull/22