question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Devfile generateName only works in factory URLs

See original GitHub issue

Describe 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

  1. Start workspace from devfile with generateName field (e.g. https://github.com/eclipse/che-devfile-registry/blob/master/devfiles/java-maven/devfile.yaml)
  2. Check config, see that generateName is gone and instead .metadata.name is set
  3. 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:closed
  • Created 4 years ago
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
sleshchenkocommented, Oct 29, 2019

When using devfiles from the registry (create-workspace tab), the name seems to be ignored and instead gets something like wksp-xxxx.

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 generating wksp-xxxx might be a good change for Dashboard as well.

0reactions
sleshchenkocommented, May 6, 2020

I guess it’s not actual anymore, and I’m sure it must be fixed by https://github.com/eclipse/che-dashboard/pull/22

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found