che-devworkspace-generator doesn't seem to like the URLs I have in my meta.yaml files
Summary
Trying to build/host a local instance of the dev-file-registry and it's failing when running the ./build/scripts/generate_devworkspace_templates.sh command.
Fails when trying to parse the Git based URL. I had to tweak the execution of the che-devworkspace-generator since it always failed while using npx. Changed it to use node node_modules/@eclipse-che/che-devworkspace-generator/lib/entrypoint.js
name=$(basename "${devfile_repo}")
project="${name}={{_INTERNAL_URL_}}/resources/v2/${name}.zip"
echo "${devfile_url}" #print out the URL to be used
# Generate devworkspace-che-code-insiders.yaml
npm_config_yes=true node node_modules/@eclipse-che/che-devworkspace-generator/lib/entrypoint.js \
--devfile-url:"${devfile_url}" \
--editor-entry:che-incubator/che-code/insiders \
--plugin-registry-url:https://redhat-developer.github.io/devspaces/che-plugin-registry/"${VERSION}"/"${arch}"/v3 \
--output-file:"${dir}"devworkspace-che-code-insiders.yaml \
--project."${project}"
The output if ${devfile_url} is https://***/dev-spaces/devfiles/lombok-project/tree/v1-3.12-rhel8
The total error message is
stack=Error: Can not resolver the URL
at GitUrlResolver.resolve (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/resolve/git-url-resolver.js:31:19)
at Main.<anonymous> (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/main.js:113:40)
at step (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/main.js:61:23)
at Object.next (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/main.js:42:53)
at fulfilled (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/main.js:33:58)
Unable to start Error: Can not resolver the URL
at GitUrlResolver.resolve (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/resolve/git-url-resolver.js:31:19)
at Main.<anonymous> (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/main.js:113:40)
at step (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/main.js:61:23)
at Object.next (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/main.js:42:53)
at fulfilled (/vagrant/devspaces-stuff/che-devfile-registry/node_modules/@eclipse-che/che-devworkspace-generator/lib/main.js:33:58)
Relevant information
Trying to build it locally and push to our registry so that I can deploy it in a customized environment. It is running in a vagrant managed VirtualBox Ubuntu OS.
I had to tweak the execution of the che-devworkspace-generator since it always failed while using npx. Changed it to use node node_modules/@eclipse-che/che-devworkspace-generator/lib/entrypoint.js
@svor @vinokurig could you please take a look?
@willkara devfile-url must be a git repository url, but not a direct file url. We support GitHub, BitBucket, and BitBucket-Server repository urls.
@vinokurig , I'll be using self-hosted GitLab for our DevFile registry.
Might be a mental-block for now, but could you please describe the difference between git repository URL and direct file URL?
The one I used as an example was taking from the browser address-bar when I navigated to the branch I want to use.
could you please describe the difference between git repository URL and direct file URL?
By the direct file url I mean the url which points to a specific file from the repository tree.
The one I used as an example was taking from the browser address-bar when I navigated to the branch I want to use
This should work as it points to the repository's root.
I'll be using self-hosted GitLab for our DevFile registry.
We do not support GitLab Server yet. @ibuziuk Do we need an issue to add the GitLab Server support?
@vinokurig , I'd be able to help attack it. It'd need to be able to support gitlab.com as well as self-hosted versions.
I wonder if the self-hosted version necessitates the creation of a general git resolver, rather than falling back on hostnames?
We do not support Gitlab yet, so we would need a separate resolver for it. In case of Gitlab we can have one resolver for both SAAS and self hosted versions.
@willkara @vinokurig There are no plans to provide support for any other providers for che-devfile-registry since it is going to be deprecated in the short run - https://github.com/eclipse-che/che/issues/22960
For getting-started samples consider using cloud-native k8s cm based approach - https://eclipse.dev/che/docs/stable/administration-guide/configuring-getting-started-samples/
@ibuziuk , sad news! Seems like the new option is a lot more flexible and less involved.
Would you recommend the ConfigMap approach for self-hosted versions? Any chance you have an example or two to make sure I get it right? lol
When I attempt the ConfigMap version, should I disable the built-in DevFile registry?
Also, does this approach require a certain version? Seems like it works with 3.13
Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.
Mark the issue as fresh with /remove-lifecycle stale in a new comment.
If this issue is safe to close now please do so.
Moderators: Add lifecycle/frozen label to avoid stale mode.