-
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
Add previewURL support in Devfile format #13945
Comments
@l0rd Does the scope of this issue limited to add previewUrl only in devfile. Or it also means to add some information in workspace runtime. Like
|
@l0rd any comments? |
How would ports-plugin utilize this information? |
The idea is to add a new attribute(look like an old Che6 commands attribute) in commands in runtime |
@l0rd is command executed always on one of existing servers? Or can it start new one? |
There's an issue how to find correct server with URL. There are already exposed URL's in object Another approach would be to create an extra route for previewUrl. I'm going to investigate this option. |
@l0rd @skabashnyuk are both |
I agree that path may be optional with |
That is all internal logic of che server. That should not be our focus. I think that port is mandatory. It can be already declared as an endpoint in devfile https://github.com/eclipse/che-devfile-registry/blob/master/devfiles/java-web-spring/devfile.yaml#L29 or editor https://github.com/eclipse/che-plugin-registry/blob/d9998222c284d40ae0d2e1661452c1bcd5e4fddb/v3/plugins/ws-skeleton/eclipseide/4.9.0/meta.yaml#L17 or plugin, or it can be a command that can start a new server. |
there is Theia issue that affects the previewUrl feature #14876 |
As for the beta feature, I think @sparkos' s solution #13945 (comment) - is ok-ish. A couple of question to @sparkos' s solution
|
When #14876 is fixed, we don't have to do any sophisticated calculations. At workspace startup, we basically find URL for command (either it exists by defined endpoint or we create service+route), put it into the map under some key and put this key to command's attribute. Theia then receives this map and command's attributes and must properly update |
I've just realized that having random noise in key would mean that this key will change at each workspace startup, which is not ok for Theia. We should change |
we even don't need the |
Sounds ok. |
to sum up the proposed solution: server will create workspace object like this:
Theia's responsibility is then to resolve variables in Key |
ok for me |
After restarting workspace key |
yes, it will be calculated from command name, so as long as the name won't change, crc will be the same. |
I've created an issue for Theia support of previewurl by proposed solution #14892 cc: @RomanNikitenko @l0rd |
@sparkoo that's fine for me |
When are you planning to merge this work to stable? |
@slemeur we can plan it for next sprint, or even include it in current sprint. It should be straightforward patch. |
all issues in the scope of this epic are done. closing. |
Is your enhancement related to a problem? Please describe.
Extend current devfile spec to be allow users to specify a previewURL for a given command
Describe the solution you'd like
Implementation
The text was updated successfully, but these errors were encountered: