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

che-editor URL parameter should have higher priority than .che/che-editor.yaml #21563

Closed
Tracked by #21941 ...
l0rd opened this issue Jul 19, 2022 · 4 comments · Fixed by eclipse-che/che-dashboard#716
Closed
Tracked by #21941 ...
Assignees
Labels
area/dashboard kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/current

Comments

@l0rd
Copy link
Contributor

l0rd commented Jul 19, 2022

Describe the bug

If I specify che-editor URL parameter I expect it to have higher priority compared to the editor specified in the git repository .che/che-editor.yaml.

Che version

next (development version)

Steps to reproduce

Start a workspace specifying the che-editor URL parameter using a git repository that contains a .che/che-editor.yaml.

For example, using the dogfooding Che instance, a repository that has a .che/che-editor.yaml where che-code is specified and the parameter che-editor=eclipse/che-theia/next:

https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/#https://github.com/l0rd/tilt-example-java/?che-editor=eclipse/che-theia/next

Expected behavior

The editor specified in the URL parameter should be used, not the one in the .che/che-editor.yaml file.

Runtime

OpenShift

Screenshots

No response

Installation method

chectl/next

Environment

Amazon

Eclipse Che Logs

No response

Additional context

No response

@l0rd l0rd added the kind/bug Outline of a bug - must adhere to the bug report template. label Jul 19, 2022
@l0rd l0rd changed the title URL parameter to specify the editor should have higher priority che-editor URL parameter should have higher priority than .che/che-editor.yaml Jul 19, 2022
@l0rd l0rd added area/dashboard severity/P1 Has a major impact to usage or development of the system. labels Jul 19, 2022
@azatsarynnyy
Copy link
Member

I've tried the provided factory link
https://che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com/#https://github.com/l0rd/tilt-example-java/?che-editor=eclipse/che-theia/next. For me, it spinned up a Che-Theia-based workspace.
At first sight, it looks like expected behavior. But actually, it works like that because the content of the .che/che-editor.yaml file is ignored. I've described that problem in #21639

@ibuziuk
Copy link
Member

ibuziuk commented Jan 25, 2023

@akurinnoy reopened for verification, the expected priority

  • URL parameter
  • .che/che-editor.yaml
  • CR property

@dipakkarde
Copy link

dipakkarde commented Feb 3, 2023

Hello Team,

I tried to reproduce this issue with below steps :

Step 1] Set the defaultEditor to theia in checluster CR and was able to create a workspace with theia IDE by default :

defaultEditor: eclipse/che-theia/latest

Step 2] Then created a repo with ".che/che-editor.yaml" and set :

id: che-incubator/che-code/insiders

Workspaces gets created with VScode IDE by default.

So found that option ".che/che-editor.yaml" has higher priority than setting "defaultEditor" parameter in checluster CR

Step 3] To check the priority of option "URL parameter for the workspace IDE" followed below steps :

  • Set defaultEditor to theia in checluster CR
  • Set ".che/che-editor.yaml" to eclipse/che-theia/latest
  • Next tried to start workspace as per the below format :

https://devspaces-&lt;openshift_deployment_name&gt;.&lt;domain_name&gt;"#<git_repository_url>?che-editor=<editor_key>

Trying with URL paratmeter : che-editor=<editor_key>:

https://devspaces.apps.raunakbocp4.india.aws.cee.support#https://github.com/dipakkarde/che-demo?che-editor=che-incubator/che-code/insiders

But I found that workspace is getting created with "Theia" IDE only.

Further I also tried setting "defaultEditor" to VScode in checluster CR, But still workspace gets created with Theia IDE only.

So found ".che/che-editor.yaml" only having higher priority than other two options.

Attaching here some screenshots for reference. Let me know if any details required.

Let me know if in case I am missing anything.

defaultEditor
che-editor-yaml
my-project-devfile
myproject-workspace
my-project

@ibuziuk
Copy link
Member

ibuziuk commented Feb 7, 2023

need to make sure that we backport the fix to 7.60.x so that it would land in 3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/current
Projects
None yet
6 participants