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

Allow creating multiple workspaces from the single sample #622

Merged
merged 11 commits into from
Sep 14, 2022
Merged

Conversation

akurinnoy
Copy link
Contributor

@akurinnoy akurinnoy commented Sep 6, 2022

What does this PR do?

This PR main goal is to allow users to create multiple workspaces from the same sample. To get this I added a new step to the Factory flow that handles workspace names conflict and prompts the user whether to switch to an existing workspace or to proceed to create a new workspace (appending a suffix to its name):

Screenshot 2022-09-06 at 14 38 00

Opening the existing workspace:

Screen.Recording.2022-09-12.at.11.32.37.mov

Creating a new workspace:

Screen.Recording.2022-09-12.at.11.34.14.mov

Additionally, this PR changes a bit the workspace loading flow: it adds a new step to check if the number of simultaneously running workspaces is within the limit:

Screen.Recording.2022-09-12.at.11.36.05.mov

What issues does this PR fix or reference?

fixes eclipse-che/che#21561

Is it tested? How?

  1. Try to create multiple workspaces from a single sample (or devfile)
  2. You should be prompted to switch to an existing workspace or to continue creating a new one

You can test this PR here: https://eclipse-che.apps.cluster-8rnq4.8rnq4.sandbox506.opentlc.com/, or use your Eclipse Che installation with this Dashboard image quay.io/eclipse/che-dashboard:pr-622.

@openshift-ci
Copy link

openshift-ci bot commented Sep 6, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #622 (43506e7) into main (8e2a95e) will increase coverage by 0.69%.
The diff coverage is 92.22%.

@@            Coverage Diff             @@
##             main     #622      +/-   ##
==========================================
+ Coverage   58.33%   59.02%   +0.69%     
==========================================
  Files         247      247              
  Lines        8071     8262     +191     
  Branches     1326     1348      +22     
==========================================
+ Hits         4708     4877     +169     
- Misses       3172     3194      +22     
  Partials      191      191              
Flag Coverage Δ
unittests 59.02% <92.22%> (+0.69%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...dashboard-frontend/src/components/Header/index.tsx 81.81% <0.00%> (-18.19%) ⬇️
...rd-frontend/src/containers/Loader/AbstractStep.tsx 100.00% <ø> (ø)
...ader/Factory/Steps/Fetch/Devfile/buildStepTitle.ts 100.00% <ø> (ø)
...ntend/src/containers/Loader/findTargetWorkspace.ts 100.00% <ø> (ø)
...hboard-frontend/src/pages/Loader/Factory/index.tsx 92.30% <ø> (-1.45%) ⬇️
...s/dashboard-frontend/src/services/helpers/types.ts 100.00% <ø> (ø)
...hboard-frontend/src/store/FactoryResolver/index.ts 73.56% <0.00%> (ø)
...ard-frontend/src/components/Loader/Alert/index.tsx 95.23% <50.00%> (-4.77%) ⬇️
...er/Factory/Steps/CheckExistingWorkspaces/index.tsx 87.35% <87.35%> (ø)
.../Factory/Steps/Apply/Resources/prepareResources.ts 88.23% <88.23%> (ø)
... and 28 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

github-actions bot commented Sep 9, 2022

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-622

@che-bot
Copy link
Contributor

che-bot commented Sep 12, 2022

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-622

@eclipse-che eclipse-che deleted a comment from che-bot Sep 12, 2022
@eclipse-che eclipse-che deleted a comment from github-actions bot Sep 12, 2022
@eclipse-che eclipse-che deleted a comment from che-bot Sep 12, 2022
@eclipse-che eclipse-che deleted a comment from github-actions bot Sep 12, 2022
@eclipse-che eclipse-che deleted a comment from che-bot Sep 12, 2022
@eclipse-che eclipse-che deleted a comment from openshift-ci bot Sep 12, 2022
@eclipse-che eclipse-che deleted a comment from github-actions bot Sep 12, 2022
@eclipse-che eclipse-che deleted a comment from che-bot Sep 12, 2022
@akurinnoy akurinnoy marked this pull request as ready for review September 12, 2022 09:42
@akurinnoy akurinnoy requested a review from olexii4 as a code owner September 12, 2022 09:42
@akurinnoy akurinnoy self-assigned this Sep 12, 2022
@akurinnoy
Copy link
Contributor Author

/retest

Copy link
Contributor

@olexii4 olexii4 left a comment

Choose a reason for hiding this comment

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

I tested it with https://eclipse-che.apps.cluster-8rnq4.8rnq4.sandbox506.opentlc.com. All works as expected.
Good job.

@ibuziuk ibuziuk mentioned this pull request Sep 13, 2022
82 tasks
Copy link
Member

@ibuziuk ibuziuk left a comment

Choose a reason for hiding this comment

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

LGTM, +1 to promote to the dogfooding

@openshift-ci
Copy link

openshift-ci bot commented Sep 13, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, ibuziuk, olexii4

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot removed the lgtm label Sep 13, 2022
@openshift-ci
Copy link

openshift-ci bot commented Sep 13, 2022

New changes are detected. LGTM label has been removed.

@che-bot
Copy link
Contributor

che-bot commented Sep 13, 2022

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-622

- Changed `AlertItem` to contain list of an action callbacks
- Added a new step to the Workspace loading flow to handle limit of running workspaces
- Updated loaders steps so they provide alert items with action callbacks
containers/Loader/Factory/Steps/ApplyDevfile -> containers/Loader/Factory/Steps/Apply/Devfile
containers/Loader/Factory/Steps/ApplyResources -> containers/Loader/Factory/Steps/Apply/Resources

containers/Loader/Factory/Steps/FetchDevfile -> containers/Loader/Factory/Steps/Fetch/Devfile
containers/Loader/Factory/Steps/FetchResources -> containers/Loader/Factory/Steps/Fetch/Resources
to handle creating workspaces from either a devfile or pre-built
resources
when switching in same tab between workspaces or to the workspaces list
@che-bot
Copy link
Contributor

che-bot commented Sep 13, 2022

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-622

@openshift-ci
Copy link

openshift-ci bot commented Sep 13, 2022

@akurinnoy: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v8-dashboard-happy-path e23f77c link true /test v8-dashboard-happy-path

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants