Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

che-starter #316: Adding support of attributes in workspace config required for Che 7 support. Adding tests for che 7 / theia stacks #323

Merged
merged 3 commits into from
Jan 15, 2019

Conversation

ibuziuk
Copy link
Member

@ibuziuk ibuziuk commented Jan 9, 2019

related issue - #316

…kspace config required for Che 7 support. Adding tests for che 7 / theia stacks

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
@ibuziuk
Copy link
Member Author

ibuziuk commented Jan 9, 2019

Workspace creation works just fine with attributes in the workspace config, but there is a problem with the startup. Basically, the following link is used for workspace startup after creation:

{
  "href": "https://che.prod-preview.openshift.io/ibuziuk@redhat.com/che-starter-h7u51",
  "rel": "ide url",
  "method": "GET"
}

However, when I navigate to this URL theia IDE is not shown for some reason, even though workspace is marked as started:

image

However, when I navigate to the very same workspace from dashboard via https://che.prod-preview.openshift.io/dashboard/#/ide/ibuziuk@redhat.com/che-starter-h7u51 theia IDE is shown without problems:

image

@l0rd @garagatyi do you think this might be an IDE issue ? any ideas whom should I contact regarding this ?

@ibuziuk ibuziuk requested review from garagatyi and l0rd January 9, 2019 15:27
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
@l0rd
Copy link
Contributor

l0rd commented Jan 9, 2019

Yes I had the same problem when working with chectl. The URL in the response opens a GWT IDE. So I used this regex to get the correct URL.

Anyway it looks to me something that should be fixed upstream.

@garagatyi
Copy link

This REST link was added by request from IDE team a long time ago. So, no wonder that it is outdated.

@garagatyi
Copy link

By outdated I mean that it is designed to be compatible with the GWT IDE. We didn't think about theia back then

@ashumilova
Copy link

Workspace link has only GWT IDE location. From dashboard - we redirect to workspace-loader app and it decides which IDE to load in this method https://github.com/eclipse/che/blob/master/workspace-loader/src/index.ts#L348
So if there is server with type - "ide" (in case of Theia) - then its loaded, otherwise - GWT IDE from workspace links is loaded.
With new flow - really needs to be revised.

@ibuziuk
Copy link
Member Author

ibuziuk commented Jan 10, 2019

@ashumilova @l0rd thanks for clarifications. I have created dedicated issue upstream - eclipse-che/che#12376
will IDE team be able to take it to the next sprint, or should I workaround this situation on che-starter side ?

@ashumilova
Copy link

Just a suggestion - maybe send from che-starter not to workspace ide link, but to workspace loader in the format: "workspace-loader/namespace/workspacename" and it will handle the IDEs?

@ibuziuk
Copy link
Member Author

ibuziuk commented Jan 10, 2019

@ashumilova it is not that simple since it would require changes in fabric8-wit / fabric8-ui which are also fall back on the ide url send from che-starter which is than opened in the browser. So, the possible workaround would be similar to what @l0rd suggested in his comment above [1]. However, the ideal solution would be fixing this problem upstream.

[1] #323 (comment)

@ashumilova
Copy link

ashumilova commented Jan 10, 2019

Yes, I mean nearly the same like here:
ideURL.replace(/\/[^/|.]*\/[^/|.]*$/g, '\/dashboard\/#\/ide$&')
but go to "workspace-loader/namespace/workspacename", cause this path "dashboard/#/ide/namespace/workspacename" also redirects to it at the end under the hood.

@ibuziuk
Copy link
Member Author

ibuziuk commented Jan 10, 2019

So, you mean https://che.prod-preview.openshift.io/ibuziuk@redhat.com/che-starter-h7u51 would eventually become https://che.prod-preview.openshift.io/workspace-loader/ibuziuk@redhat.com/che-starter-h7u51 ?

@ashumilova
Copy link

ashumilova commented Jan 10, 2019

No, here are my workspace links:
screenshot from 2019-01-10 15-26-55
following the regex transforms ide link https://che.openshift.io/ashumilo/theia-evyv5 to
https://che.openshift.io/dashboard/#/ide/ashumilo/theia-evyv5
I was proposing to change regex, that it will be converting ide link to
https://che.openshift.io/workspace-loader/ashumilo/theia-evyv5

@ashumilova
Copy link

ashumilova commented Jan 10, 2019

Sorry, @ibuziuk , you were right about :
https://che.prod-preview.openshift.io/ibuziuk@redhat.com/che-starter-h7u51
if taken as an example from this comment
it trasnforms to
https://che.prod-preview.openshift.io/workspace-loader/ibuziuk@redhat.com/che-starter-h7u51

that should work

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants