Add previewURL support in Devfile format
See original GitHub issueIs 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
commands:
- name: run
previewUrl:
port: <a port>
path: <a subpath>
actions:
- type: exec
component: mysql
command: mvn clean
workdir: /projects/spring-petclinic
Implementation
- MVP as beta feature. Server side implementation https://github.com/eclipse/che/issues/14893
- Validate devfile with schema with matching apiVersion https://github.com/eclipse/che/issues/14824
- Theia side for previewurl proposed solution https://github.com/eclipse/che/issues/14892
- Theia shows two dialogues when previewUrl is defined in command https://github.com/eclipse/che/issues/14802
- Theia doesn’t update command’s previewUrl on 2nd workspace start https://github.com/eclipse/che/issues/14803
- Document preferences related to preview URL functionality https://github.com/eclipse/che/issues/14999
- Promote to stable https://github.com/eclipse/che/issues/15412
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:47 (47 by maintainers)
Top Results From Across the Web
Chapter 4. Authoring devfiles - Red Hat Customer Portal
The workspace name will be in the <generateName>YYYYY format, for example, devfile-sample-2y7kp , where Y is a random [a-z0-9] character. Adding a generated ......
Read more >Devfile object Schema | Introduction to Devfile - GitHub Pages
Workspaces created from devfile, will use it as base and append random suffix. It's used when name is not defined. generateName. is optional;...
Read more >What is a devfile
With devfiles, you record the instructions for configuring and running your build environment as a YAML-formatted text file. Then, optionally, you can ...
Read more >Previewing running applications in the AWS Cloud9 ...
To test this behavior, add the following JavaScript code to a file that's named ... To return the content in a different format,...
Read more >Devfile v2 and IDE plug-ins in Eclipse Che - Medium
Devfile v2 support in Eclipse Che is done through milestones enhancements. ... redhat/java VS Code extension in the Eclipse Che workspace.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Since we already have something that almost does the job - dockerimage endpoint (or rather the server in the old workspace config model), I’m struggling to see the real benefit of having a
previewUrl
placed on a command.The intention seems to be that when the user invokes the command, Theia will know what URL to open to show the web ui of the application the command has supposedly started. Or at least that’s how I understood it.
But this completely ignores the usecase of invoking the application using the terminal or some other means (like would we be smart enough if
previewUrl
was placed on a command specifying launch configuration? how would that even work if the referenced launch.json contained more configs?).IMHO, we’d be much better served with adding endpoint support to other component types and adding the
path
(and maybe evenprotocol
) to the endpoint configuration. In such arrangement, we’d support all invocation modes.If we wanted to add the support for automatically opening URL for commands, I think we could do it using a command attribute referencing the endpoint, e.g.:
WDYT @skabashnyuk @sleshchenko @l0rd ?
(I updated the example to use the
previewEndpoint
wording @sleshchenko suggested. I like it better than my originalopensEndpoint
).I’ve created an issue for Theia support of previewurl by proposed solution #14892
cc: @RomanNikitenko @l0rd