Open AObuchow opened 2 months ago
@AObuchow
it's possible to create a workspace from a raw
devfile, like https://raw.githubusercontent.com/RomanNikitenko/web-nodejs-sample/refs/heads/testPR/devfile.yaml
But I agree about
It's unintuitive how giving the direct path to a devfile in a git repo doesn't work for creating a workspace
and I don't know if the raw devfile way can be used as a workaround for the described issue...
@AObuchow does df
parameter work? https://eclipse.dev/che/docs/stable/end-user-guide/url-parameter-for-the-devfile-file-name/
@ibuziuk The df
(devfilePath
) parameter works, but only if the repo is given in the expected https://<che_fqdn>#<git_repository_url>?df=<filename>.yaml
format, for example https://github.com/che-samples/web-nodejs-sample?devfilePath=devfile.yaml
.
If you try taking the git repo URL that includes the branch & the devfile path, and then concatenate ?devfilePath=<path-to-devfile>
, such as https://github.com/che-samples/web-nodejs-sample/blob/main/devfile.yaml?devfilePath=devfile.yaml
it will not work and you'll get the same error as I originally reported.
Something that might be insightful: the above error is complaining about the Git provider: The Git provider is not supported.
. I'm not exactly sure how the dashboard factory logic works, but it might be that the git provider regex is not configured to catch this case (where a git branch using /blob/
is provided, as well as a path to the devfile).
I tried removing the devfile file path from the URL, i.e.: https://github.com/che-samples/web-nodejs-sample/blob/main/devfile.yaml
-> https://github.com/che-samples/web-nodejs-sample/blob/main
, and this is not recognized as a valid git URL:
Note that https://github.com/che-samples/web-nodejs-sample/blob/main
actually redirects you to https://github.com/che-samples/web-nodejs-sample/tree/main
(/blob/
gets replaced with /tree/
).
The link with /tree/
will work when provided in the Dashboard: https://github.com/che-samples/web-nodejs-sample/tree/main
Is your enhancement related to a problem? Please describe
It's unintuitive how giving the direct path to a devfile in a git repo doesn't work for creating a workspace. For example, if you try starting a workspace from the following URL
https://github.com/che-samples/web-nodejs-sample/blob/main/devfile.yaml
, you'll get the following error:Instead, you need to use the following URL
https://github.com/che-samples/web-nodejs-sample/
.Describe the solution you'd like
It'd be nice if you could start a workspace by providing a git repo URL with the branch name & path to a devfile, such as
https://github.com/che-samples/web-nodejs-sample/blob/main/devfile.yaml
.When doing so, I'd expect this to be interpreted as the Dashboard git repo options having the branch selected as well as the devfile path configured:
Describe alternatives you've considered
No response
Additional context
No response