Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

feat(multi-root): Multi-root is the only mode in Che-Theia, no feature toggle anymore #1191

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

RomanNikitenko
Copy link
Member

@RomanNikitenko RomanNikitenko commented Aug 5, 2021

Signed-off-by: Roman Nikitenko [email protected]

What does this PR do?

Removes the Multi-root feature toggle support from Che-Theia.
It was possible to turn on single root mode in a devfile, like:

attributes:
 multiRoot: 'off'

So, with current PR changes the corresponding attribute in a devfile has no effect.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#19594

How to test this PR?

  • All functionality should work correctly as before these changes.
  • I tested with the following section in my devfile:
attributes:
  multiRoot: 'off'

The result: it creates a workspace in multi-root (not single root) mode

  • I tested backward compatibility:

first, I created a workspace from a devfile with default editor in the single root mode

example of devfile for single root mode

apiVersion: 1.0.0
metadata:
name: default-editor-single-root
attributes:
multiRoot: 'off'
projects:
- name: console-java-simple
  source:
    location: 'https://github.com/che-samples/console-java-simple'
    type: git
    branch: java1.11
components:
- id: redhat/java/latest
  preferences:
    java.server.launchMode: Standard
  type: chePlugin
- mountSources: true
  endpoints:
    - attributes:
        public: 'false'
      name: debug
      port: 5005
  memoryLimit: 512Mi
  type: dockerimage
  volumes:
    - name: m2
      containerPath: /home/user/.m2
  alias: maven
  image: 'quay.io/eclipse/che-java11-maven:next'
  env:
    - value: ''
      name: MAVEN_CONFIG
    - value: '-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/user'
      name: MAVEN_OPTS
    - value: '-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom'
      name: JAVA_OPTS
    - value: '-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom'
      name: JAVA_TOOL_OPTIONS
commands:
- name: maven build
  actions:
    - workdir: '${CHE_PROJECTS_ROOT}/console-java-simple'
      type: exec
      command: mvn clean install
      component: maven
- name: maven build and run
  actions:
    - workdir: '${CHE_PROJECTS_ROOT}/console-java-simple'
      type: exec
      command: mvn clean install && java -jar ./target/*.jar
      component: maven

then I added an editor with my changes to the existing devfile:

- type: cheEditor
    reference: 'https://raw.githubusercontent.com/chepullreq4/pr-check-files/master/che-theia/pr-1191/simple/che-theia-editor.yaml'

and restarted my workspace.
The result: my workspace started in the multi-root mode.

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Happy Path Channel

HAPPY_PATH_CHANNEL=stable

@codecov
Copy link

codecov bot commented Aug 5, 2021

Codecov Report

Merging #1191 (8d5b43a) into main (c299f59) will increase coverage by 0.04%.
The diff coverage is 25.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1191      +/-   ##
==========================================
+ Coverage   32.78%   32.83%   +0.04%     
==========================================
  Files         290      290              
  Lines        9885     9887       +2     
  Branches     1457     1452       -5     
==========================================
+ Hits         3241     3246       +5     
+ Misses       6641     6638       -3     
  Partials        3        3              
Impacted Files Coverage Δ
...theia-about/src/browser/about-che-theia-dialog.tsx 0.00% <0.00%> (ø)
...rowser/src/browser/che-mini-browser-environment.ts 0.00% <0.00%> (ø)
...he-server/src/node/che-server-http-service-impl.ts 0.00% <0.00%> (ø)
...-che-server/src/node/che-server-remote-api-impl.ts 38.88% <0.00%> (ø)
...browser/contribution/exec-terminal-contribution.ts 0.00% <0.00%> (ø)
...al/src/browser/contribution/terminal-quick-open.ts 0.00% <0.00%> (ø)
...a-terminal/src/browser/terminal-frontend-module.ts 0.00% <0.00%> (ø)
...references/src/browser/theme/theme-synchronizer.ts 0.00% <0.00%> (ø)
...eia-workspace/src/browser/che-navigator-widget.tsx 0.00% <0.00%> (ø)
...-workspace/src/browser/che-quick-open-workspace.ts 0.00% <0.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 929e119...8d5b43a. Read the comment docs.

@che-bot
Copy link
Contributor

che-bot commented Aug 5, 2021

✅ E2E Happy path tests succeed 🎉

Try Che-Theia editor only Try Che-Theia with Java/maven example Try Che-Theia with NodeJs example

See Details

name link
che-theia quay.io/crw_pr/che-theia:1191
che-theia-endpoint-runtime-binary quay.io/crw_pr/che-theia-endpoint-runtime-binary:1191

Test product:

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

@zWingz zWingz mentioned this pull request Aug 6, 2021
9 tasks
@RomanNikitenko RomanNikitenko changed the title feat(multi-root): Multi-root is the only mode in Che-Theia, no featur… feat(multi-root): Multi-root is the only mode in Che-Theia, no feature toggle anymore Aug 6, 2021
@RomanNikitenko RomanNikitenko marked this pull request as ready for review August 6, 2021 11:00
@RomanNikitenko
Copy link
Member Author

For reviewers:
I'm going to have a quite long vacation - please merge the PR if it looks good enough and there are no objections...

@benoitf benoitf merged commit f37bbc9 into eclipse-che:main Aug 6, 2021
@che-bot che-bot added this to the 7.35 milestone Aug 6, 2021
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.

3 participants