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

Theia should accept previewurl links #14892

Closed
sparkoo opened this issue Oct 15, 2019 · 1 comment
Closed

Theia should accept previewurl links #14892

sparkoo opened this issue Oct 15, 2019 · 1 comment
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che 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.
Milestone

Comments

@sparkoo
Copy link
Member

sparkoo commented Oct 15, 2019

Is your enhancement related to a problem? Please describe.

During implementation of preview url support in the devfile #13945, we've found out that we would need changes also on Theia side.

Describe the solution you'd like

We will send preview url links in response for workspace. The object will look like this:

...
    "links": {
      "self": "http://che-eclipse-che.192.168.42.10.nip.io/api/workspace/workspace7grc58gn0jozwkmz",
      "ide": "http://che-eclipse-che.192.168.42.10.nip.io/admin/nodejs-mongo-ymkmt",
      "environment/statusChannel": "ws://che-eclipse-che.192.168.42.10.nip.io/api/websocket",
      "environment/outputChannel": "ws://che-eclipse-che.192.168.42.10.nip.io/api/websocket",
      "previewurl/runthewebapp_123": "http://ingress111aaa.192.168.42.10.nip.io/hello",
      "previewurl/createtestuser_456": "http://ingress222bbb.192.168.42.10.nip.io/some/path"
    },
...
      "commands": [
        {
          "commandLine": "npm install && npm run dev",
          "name": "run the web app",
          "attributes": {
            "componentAlias": "nodejs",
            "machineName": "nodejs",
            "workingDir": "${CHE_PROJECTS_ROOT}/nodejs-mongodb-app"
          },
          "type": "exec",
          "previewUrl": "${previewurl/runthewebapp_123}"
        },
        {
          "commandLine": "curl -X POST --data '{\"user\": {\"username\": \"test\", \"email\": \"[email protected]\", \"password\": \"password\"}}' -H \"Content-Type: application/json\" http://localhost:3000/api/users\n",
          "name": "create test user",
          "attributes": {
            "componentAlias": "nodejs",
            "machineName": "nodejs"
          },
          "type": "exec",
          "previewUrl": "${previewurl/createtestuser_456}"
        }
      ],
...

Theia should recognize links prefixed with previewurl/ and set the keys as variables with matching values. These variables will be used in command's previewUrl attribute, that Theia should evaluate with these variables.

Describe alternatives you've considered

Send full URL without variables, but this has many issues on Theia side regarding to tasks.json synchronization.

Additional context

see #13945 issue comment #13945 (comment)

@sparkoo sparkoo added kind/enhancement A feature request - must adhere to the feature request template. area/editor/theia Issues related to the che-theia IDE of Che team/ide labels Oct 15, 2019
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Oct 15, 2019
@l0rd l0rd added severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Oct 15, 2019
@vparfonov vparfonov added this to the Backlog - IDE 1 milestone Oct 17, 2019
@sparkoo
Copy link
Member Author

sparkoo commented Oct 18, 2019

I've prepared server image with preview url quay.io/mvala/che-server:previewurl. PR is currently in review #14713

cc: @RomanNikitenko

@RomanNikitenko RomanNikitenko self-assigned this Oct 18, 2019
@RomanNikitenko RomanNikitenko added the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Oct 22, 2019
@vparfonov vparfonov modified the milestones: Backlog - IDE 1, 7.4.0 Oct 23, 2019
@RomanNikitenko RomanNikitenko removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che 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.
Projects
None yet
Development

No branches or pull requests

5 participants