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

Small fixes #181

Merged
merged 6 commits into from
Mar 10, 2021
Merged

Small fixes #181

merged 6 commits into from
Mar 10, 2021

Conversation

olexii4
Copy link
Contributor

@olexii4 olexii4 commented Mar 5, 2021

What does this PR do?

This PR provides several improvements:

  • Subscribe workspaces that are already starting to the EnvironmentOutput channel.
  • Add 'show-workspaces' and 'restart-workspace' handlers.
  • Fixed styles.
  • Fixed error message.

What issues does this PR fix or reference?

fixes eclipse-che/che#19070
fixes eclipse-che/che#19174
fixes eclipse-che/che#18917
fixes eclipse-che/che#18589
fixes eclipse-che/che#19234

Screenshot from 2021-03-05 03-53-45
Screenshot from 2021-03-05 03-54-15
Screenshot from 2021-03-05 17-53-08

Signed-off-by: Oleksii Orel [email protected]

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

Code coverage diff between base branch:master and head branch: CHE-19070

File % Stmts % Branch % Funcs % Lines
total 56.13 55.6 41.95 41.12 54.52 54.19 55.92 55.38
src/components/DevfileEditor/index.tsx 22.05 21.83 10.47 10 11.76 11.76 22.11 21.88
src/containers/IdeLoader.tsx 68.94 61.38 66.67 58.82 75 65.63 68.75 61.17
src/services/cheWorkspaceClient/index.ts 27.5 26.83 6.67 5.88 18.18 18.18 25.97 25.32
src/services/validate-token/index.ts 33.33 0 0 33.33
src/store/Workspaces/index.ts 6.67 0 0 6.67

@che-bot
Copy link
Contributor

che-bot commented Mar 5, 2021

✅ E2E dashboard-next tests succeed 🎉

See Details

  • Jenkins job

  • logs and configs

  • Che dashboard-next image:quay.io/crw_pr/che-dashboard:181

  • Che server image: quay.io/crw_pr/che-server:181

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

Docker image build succeeded: docker.io/maxura/che-server:che-dashboard-pull-181

Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found another tiny bug which would be good to fix but not critical, \n are not displayed correctly:

Screenshot_20210305_113520
the message from Che Server

{"jsonrpc":"2.0","method":"runtime/log","params":{"time":"2021-03-05T09:37:41.809521613Z","text":"List of plugins and editors to install\n- redhat/java/latest - Java Linting, Intellisense, formatting, refactoring, Maven/Gradle support and more...\n- eclipse/che-machine-exec-plugin/nightly - Che Plug-in with che-machine-exec service to provide creation terminal or tasks for Eclipse Che workspace containers.\n- eclipse/che-theia/next - Eclipse Theia, get the latest release each day.\n","runtimeId":{"ownerId":"a2f45de2-006b-4b46-a3eb-66db9f286f72","envName":"default","workspaceId":"workspace37y0tb6hifcdrdk3"}}}

@sleshchenko
Copy link
Member

Seems this PR introduces a bug with multiple subscription to the logs which leads to duplicates lines, after I restarted workspace more than one in the same tab

Screenshot_20210305_114539
Screenshot_20210305_114550

@sleshchenko
Copy link
Member

Close workspace works as expected, but I was not able to enable plugins to make Theia restart a workspace
Screenshot_20210305_115021

@che-bot
Copy link
Contributor

che-bot commented Mar 5, 2021

❌ E2E dashboard-next tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

Code coverage diff between base branch:master and head branch: CHE-19070

File % Stmts % Branch % Funcs % Lines
total 56.13 55.6 41.95 41.3 54.52 54.19 55.92 55.38
src/components/DevfileEditor/index.tsx 22.05 21.83 10.47 10.23 11.76 11.76 22.11 21.88
src/containers/IdeLoader.tsx 68.94 61.38 66.67 59.7 75 65.63 68.75 61.17
src/services/cheWorkspaceClient/index.ts 27.5 26.83 6.67 6.25 18.18 18.18 25.97 25.32
src/services/validate-token/index.ts 33.33 0 0 33.33
src/store/Workspaces/index.ts 6.67 0 0 6.67

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

Docker image build succeeded: docker.io/maxura/che-server:che-dashboard-pull-181

@che-bot
Copy link
Contributor

che-bot commented Mar 5, 2021

❌ E2E dashboard-next tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

Code coverage diff between base branch:master and head branch: CHE-19070

File % Stmts % Branch % Funcs % Lines
total 56.13 55.59 41.95 41.3 54.52 54.19 55.92 55.37
src/components/DevfileEditor/index.tsx 22.05 21.83 10.47 10.23 11.76 11.76 22.11 21.88
src/containers/IdeLoader.tsx 68.94 61.38 66.67 59.7 75 65.63 68.75 61.17
src/services/cheWorkspaceClient/index.ts 27.5 26.83 6.67 6.25 18.18 18.18 25.97 25.32
src/services/validate-token/index.ts 33.33 0 0 33.33
src/store/Workspaces/index.ts 6.63 0 0 6.63

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

Docker image build succeeded: docker.io/maxura/che-server:che-dashboard-pull-181

@olexii4 olexii4 changed the title Subscribe workspaces that are already starting to the EnvironmentOutput channel Small fixes Mar 5, 2021
@che-bot
Copy link
Contributor

che-bot commented Mar 5, 2021

❌ E2E dashboard-next tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

Code coverage diff between base branch:master and head branch: CHE-19070

File % Stmts % Branch % Funcs % Lines
total 56.13 55.6 41.95 41.3 54.52 54.19 55.92 55.38
src/components/DevfileEditor/index.tsx 22.05 21.83 10.47 10.23 11.76 11.76 22.11 21.88
src/containers/IdeLoader.tsx 68.94 61.38 66.67 59.7 75 65.63 68.75 61.17
src/pages/GetStarted/index.tsx 63.64 64.62 70 70 66.67 66.67 61.9 62.9
src/services/cheWorkspaceClient/index.ts 27.5 26.83 6.67 6.25 18.18 18.18 25.97 25.32
src/services/validate-token/index.ts 33.33 0 0 33.33
src/store/Workspaces/index.ts 6.63 0 0 6.63

@github-actions
Copy link

github-actions bot commented Mar 5, 2021

Docker image build succeeded: docker.io/maxura/che-server:che-dashboard-pull-181

@che-bot
Copy link
Contributor

che-bot commented Mar 8, 2021

❌ E2E dashboard-next tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

@github-actions
Copy link

github-actions bot commented Mar 8, 2021

Code coverage diff between base branch:master and head branch: CHE-19070

File % Stmts % Branch % Funcs % Lines
total 56.13 55.6 41.95 41.3 54.52 54.19 55.92 55.38
src/components/DevfileEditor/index.tsx 22.05 21.83 10.47 10.23 11.76 11.76 22.11 21.88
src/containers/IdeLoader.tsx 68.94 61.38 66.67 59.7 75 65.63 68.75 61.17
src/pages/GetStarted/index.tsx 63.64 64.62 70 70 66.67 66.67 61.9 62.9
src/services/cheWorkspaceClient/index.ts 27.5 26.83 6.67 6.25 18.18 18.18 25.97 25.32
src/services/validate-token/index.ts 33.33 0 0 33.33
src/store/Workspaces/index.ts 6.63 0 0 6.63

@github-actions
Copy link

github-actions bot commented Mar 9, 2021

Docker image build succeeded: docker.io/maxura/che-server:che-dashboard-pull-181

Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with duplicated logs entries is fixed after eclipse-che/che-workspace-client#60

But this PR does a lot of (probably the same in master) redundant subscribe/unSubscribe to JSON RPC which I would like to see dropped in the scope of this PR.

@che-bot
Copy link
Contributor

che-bot commented Mar 9, 2021

❌ E2E dashboard-next tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

public async componentWillUnmount(): Promise<void> {
this.debounce.unsubscribeAll();
window.removeEventListener(
'message',
event => this.handleMessage(event)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it'll work as expected cause the callback in this line is not the same callback object as added here: https://github.com/eclipse/che-dashboard/pull/181/files#diff-9d36030402d9b9e891ad48f6ffe964d9e83fc5962a3b907a5d0d1928f44776eeR178

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I have fixed it.

@@ -408,7 +439,7 @@ const mapMerge = (originMap: Map<string, string[]>, additionalMap: Map<string, s
const res = new Map<string, string[]>();
originMap.forEach((val: string[], key: string) => {
const merge = (val: string[], newVal: string[] | undefined): string[] => {
if (!newVal || (val.length > 0 && newVal.length === 1 && val[val.length - 1] === newVal[0])) {
if (!newVal || (val.length > 0 && newVal.length === 1)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we definitely need a unit test for this function

@che-bot
Copy link
Contributor

che-bot commented Mar 10, 2021

✅ E2E dashboard-next tests succeed 🎉

See Details

  • Jenkins job

  • logs and configs

  • Che dashboard-next image:quay.io/crw_pr/che-dashboard:181

  • Che server image: quay.io/crw_pr/che-server:181

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

@github-actions
Copy link

Code coverage diff between base branch:master and head branch: CHE-19070

File % Stmts % Branch % Funcs % Lines
total 53.12 52.87 39.08 38.62 51.95 52.03 52.88 52.62
src/components/DevfileEditor/index.tsx 22.61 23.86 11.7 11.96 11.76 12.12 22.68 23.71
src/containers/IdeLoader.tsx 68.94 63.08 66.67 59.7 75 71.88 68.75 62.89
src/pages/GetStarted/index.tsx 63.64 64.62 70 70 66.67 66.67 61.9 62.9
src/services/helpers/debounce.ts 76.19 85.71 42.86 57.14 66.67 66.67 73.68 84.21
src/services/helpers/disposable.ts 75 25 75 75
src/services/validate-token/index.ts 25 0 0 25
src/store/Workspaces/index.ts 6.38 0 0 6.47

@github-actions
Copy link

Docker image build succeeded: docker.io/maxura/che-server:che-dashboard-pull-181

@akurinnoy
Copy link
Contributor

@olexii4 I faced a bug, not sure it's introduced by this PR though

steps to reproduce:

  1. start a workspace
  2. ensure the workspace is loading, there are no warnings on the Progress tab and some outputs on the Logs tab
  3. reload page
  4. see the warning alert on the Progress tab
Screen.Recording.2021-03-10.at.11.25.06.mov

@che-bot
Copy link
Contributor

che-bot commented Mar 10, 2021

❌ E2E dashboard-next tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

@akurinnoy
Copy link
Contributor

@olexii4 after the last commit I can't reproduce this issue.

Signed-off-by: Oleksii Orel <[email protected]>
@olexii4 olexii4 merged commit df4b196 into master Mar 10, 2021
@olexii4 olexii4 deleted the CHE-19070 branch March 10, 2021 12:05
@che-bot
Copy link
Contributor

che-bot commented Mar 10, 2021

❌ E2E dashboard-next tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

  • Use comment "[dashboard-next-ci-test]" to rerun the 'dashboard-next' e2e tests

@github-actions
Copy link

No changes to code coverage between the base branch and the head branch

@che-bot che-bot added this to the 7.28 milestone Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment