-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Automatically generate meta.yaml given a vsx repo+branch+dockerfile #17029
Comments
A few comments/questions:
|
What about adding
Dependencies are in
Good point. I do not have an answer yet. I am investigating if we could use an OCI registry to store and pulls vsx so maybe quay.io? @gorkem any idea? |
I guess we need a CDN backed download are for these ? |
Yes that could work.
I looked into it a bit more and it works in the general case, however there are a few corner cases. The vscode-openshift-connector So here we need to handle two cases:
Maybe a possible solution is to put these in the sidecar as well? I.e. leave Speaking of sidecars, we will need a field for the sidecar image location. |
It depends what we are aiming for. If we are going to build and publish (vsix + sources) every upstream vsix, then yes eventually we'll need something like that. Right now we are using download.jboss.org Alternatively we could allow users to contribute by pointing to a vsix file anywhere (provided it's not the VS Code marketplace), and only host downstream vsix's on download.jboss.org for use in CRW. |
@ericwill "Dependencies not listed in the package.json" looks like a bug. Why an extension has dependencies when running in Che but doesn't when running in vscode? And for |
I've just looked around the openshift connector repo and it looks like they add vscode-kubernetes-tools to their extension dependencies when they're packaging the vsx: https://github.com/redhat-developer/vscode-openshift-tools/blob/40b1716e3c78c08b0a4dddd811af53ffba19a931/Jenkinsfile#L33. I guess that would explain why vscode-kubernetes-tools and vscode-yaml are there as well |
yes, dependencies are added by the CI, they do exist in the final vsix |
@JPinkney @ericwill @benoitf that breaks our mechanism in 2 ways:
For situation like this one (that I hope are rare exceptions) I think we have 3 options:
And in the short term I would go with 1) and, once we have more experience, decide how to move forward. |
Are there any other examples of dependencies that are not listed on the @dgolovin Is it possible to solve this by installing the dependency extension to at the |
I agree -- I haven't found any other examples yet, if I do I'll raise them here. |
I don't think this is the same thing, but we also include the A few other remarks:
|
That maybe a workaround to make sure that they both run in the same sidecar container. That is a temporary solution while we are waiting for the proper solution to be implemented (the work is currently on hold because the controller team is completing the OpenShift console web terminal work).
Right. The plugins you mention are not vscode extensions and the
Both approaches have their pros and cons. Inferring where an image is hosted is possible if we use a hosting / naming convention based on the vsx id and version (i.e. As a contributor I would probably like more the idea to add a Dockerfile (or reference an existing one) rather then build, push and maintain an image in my personal dockerhub or quay.io account. |
As mentioned in this other issue one vsx may be packaged in different sidecar images (think about jdt.ls in different openjdk images). To support this scenario we may use one of the following syntaxes: {
"repository": "https://github.com/redhat-developer/vscode-java",
"checkout": "v0.57.0",
"dockerfiles": [
"./dockerfiles/redhat-developer.vscode-java/Dockerfile.java8",
"./dockerfiles/redhat-developer.vscode-java/Dockerfile.java11"
]
} or {
"repository": "https://github.com/redhat-developer/vscode-java",
"checkout": "v0.57.0",
"dockerfile": "./dockerfiles/redhat-developer.vscode-java/Dockerfile.java8",
"alternativeDockerfiles": [
"./dockerfiles/redhat-developer.vscode-java/Dockerfile.java11"
]
} |
The main issue blocking this work now is where to host the vsix files. If we are to build publish all extensions ourselves, we'll need to find a place to put them. In the meantime (as a workaround) I can just point to the upstream GitHub hosted release asset, until a decision is made. I am also working on the report generation which should be finished by next week sometime. |
If we are to generate the My suggestion is to host the |
I think we should NOT commit the |
I think it might be beneficial to have them versioned, there are often cases where we need to patch a What do you think about this flow:
This allows us to:
WDYT? |
@ericwill done ? |
Is your enhancement related to a problem
Adding a new vsx extension in the che-plugin-registry involves the manual and error prone creation of a
meta.yaml
. Most of themeta.yaml
fields can be retrieved from a vscode extensionpackage.json
.Describe the solution you'd like
Adding a new vs code extension in the plugin registry should be as simple as adding a new entry in a
vscode-extensions.json
file at the root of the GitHub repository:This format is similar to open-vsx/publish-extensions extensions.json.
We should progressively replace the meta.yaml with corresponding entries in a
vscode-extensions.json
in the GitHub repository. Thevscode-extensions.json
tometa.yaml
conversion should be part of the build of the che-plugin-registry.This is only for vs-code extensions. Other plugins as theia or machine-exec will still be specified as meta.yaml files.
Included in epic #15819
Subtasks
vscode-extensions.json
like:meta.yaml
informations should be automatically generated (at build time) reading thepackage.json
of the extension. vsx should be automatically built and published on https://download.jboss.org/jbosstools/.vscode-extensions.json
format (alphabetic order of entries, mandatory "repository" and "checkout" fields, git repo and tag exist)vscode-extensions.json
as a source to check for updates: if a newer tag exist create a PR to update the extension "checkout".vscode-extensions.json
.EXPOSE <port>
andVOLUME <path>
instructions). In that case the meta.yaml containerenv
,command
andargs
don't need to be generated because those can be specified in the Dockerfile.vscode-extensions.json
The text was updated successfully, but these errors were encountered: