Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devworkspace-generator should support git repositories other than github.com #22105

Closed
l0rd opened this issue Mar 28, 2023 · 6 comments · Fixed by eclipse-che/che-devfile-registry#733
Assignees
Labels
area/devfile-registry kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. sprint/next team/A This team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che
Milestone

Comments

@l0rd
Copy link
Contributor

l0rd commented Mar 28, 2023

Is your enhancement related to a problem? Please describe

Devfile registry build, and in particular the devworkspace-generator, requires that the samples are in github.com.

If the samples are in GitHub enterprise repositories (e.g. github.<mycompany>.com) it's not possible to do a custom build of the registry.

Here are a couple of places where github.com is hardcoded.

Describe the solution you'd like

Supporting resolvers for GH enterprise, BB, GitLab etc...maybe overkill.

An alternative could be that samples get cloned locally and then generate_devworkspace_templates.sh invokes devworkspace-generator using the parameter --devfile-path rather than the --devfile-url.

Additional context

Note that currently, using parameter --devfile-path rather than --devfile-url, results in a devworkspace without a project (even if the --project parameter is provided):

node lib/entrypoint.js \
     --devfile-path:<git-repo-path>/devfile.yaml \
     --editor-entry:che-incubator/che-code/insiders \
     --plugin-registry-url:https://che-plugin-registry-main.surge.sh/v3/ \
     --output-file:/tmp/all-in-one-local.yaml \
     --project."<name>=<git-repo-path>"

So that should be fixed first.

@l0rd l0rd added kind/enhancement A feature request - must adhere to the feature request template. area/devfile-registry severity/P1 Has a major impact to usage or development of the system. labels Mar 28, 2023
@ibuziuk ibuziuk added sprint/next team/A This team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che labels Mar 29, 2023
@ibuziuk ibuziuk added this to the 7.64 milestone Apr 4, 2023
@vinokurig
Copy link
Contributor

An alternative could be that samples get cloned locally and then generate_devworkspace_templates.sh invokes devworkspace-generator using the parameter --devfile-path rather than the --devfile-url.

I don't think it is a good idea to git clone projects just for one file. I prefer to extend the resolver to be able to parse GitLab and Bitbucket urls.

@ibuziuk
Copy link
Member

ibuziuk commented Apr 11, 2023

@l0rd discussed that issue on the standup, wdyt would it be enough to support all SaaS versions (GitHub, BitBucket, GitLab, Azure) + the GitHub enterprise whose domain matches the pattern github.<mycompany>.com ?

@l0rd
Copy link
Contributor Author

l0rd commented Apr 11, 2023

@l0rd discussed that issue on the standup, wdyt would it be enough to support all SaaS versions (GitHub, BitBucket, GitLab, Azure) + the GitHub enterprise whose domain matches the pattern github.<mycompany>.com ?

GitHub Enteprise is enough. I am not sure we are going to get requests for other Git providers considered that we plan to switch to CNCF registry.devfile.io in the short/mid term.

@vinokurig
Copy link
Contributor

vinokurig commented Apr 12, 2023

@l0rd Is it ok to use the github.<mycompany>.com pattern and can we consider that the subdomain isolation property is always on in the github server instance? It means that the raw file location url will match the https://raw.<mycompany>.com/<user>/<repo>/<path to the file> pattern.

@nickboldt
Copy link
Contributor

Slip to 7.65

@l0rd
Copy link
Contributor Author

l0rd commented Apr 18, 2023

@l0rd Is it ok to use the github.<mycompany>.com pattern and can we consider that the subdomain isolation property is always on in the github server instance? It means that the raw file location url will match the https://raw.<mycompany>.com/<user>/<repo>/<path to the file> pattern.

@vinokurig yes that should be fine. Sorry for not answering earlier. Don't hesitate to ping me on slack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-registry kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. sprint/next team/A This team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants