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

feat: Restrict the total number of 'Running' workspaces on a cluster #1173

Merged
merged 8 commits into from
Sep 3, 2024

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Aug 21, 2024

What does this PR do?

feat: Restrict the total number of 'Running' workspaces on a cluster

Screenshot/screencast of this PR

screenshot-192_168_59_253_nip_io-2024_08_29-15_47_45

What issues does this PR fix or reference?

eclipse-che/che#23081

Is it tested? How?

  1. Deploy Che on Minikube
  2. kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1173", name: che-dashboard}]}}]"
  3. kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/devEnvironments/maxNumberOfRunningWorkspacesPerCluster", "value": 1}]"
  4. Login as user1, start a workspace
  5. Login as user2, start a workspace and got error message

Release Notes

```Introduced a new configuration option, maxNumberOfRunningWorkspacesPerCluster, to limit the total number of 'Running' workspaces on a cluster. When the limit is reached, users attempting to start additional workspaces will receive an error message.

Docs PR

TODO

@che-bot
Copy link
Contributor

che-bot commented Aug 21, 2024

Click here to review and test in web IDE: Contribute

Copy link

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

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1173", name: che-dashboard}]}}]"

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 94.94163% with 26 lines in your changes missing coverage. Please review.

Project coverage is 90.02%. Comparing base (115e48a) to head (da07a2b).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../services/backend-client/devWorkspaceClusterApi.ts 65.62% 11 Missing ⚠️
...ceClient/services/devWorkspaceClusterApiService.ts 96.85% 4 Missing ⚠️
...nd/src/routes/api/helpers/getDevWorkspaceClient.ts 42.85% 4 Missing ⚠️
packages/dashboard-frontend/src/store/index.ts 0.00% 3 Missing ⚠️
...oard-backend/src/devworkspaceClient/types/index.ts 92.00% 2 Missing ⚠️
...d-frontend/src/store/DevWorkspacesCluster/index.ts 98.56% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1173      +/-   ##
==========================================
- Coverage   90.04%   90.02%   -0.03%     
==========================================
  Files         432      438       +6     
  Lines       44763    45269     +506     
  Branches     3095     3102       +7     
==========================================
+ Hits        40309    40752     +443     
- Misses       4416     4481      +65     
+ Partials       38       36       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

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

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1173", name: che-dashboard}]}}]"

1 similar comment
Copy link

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

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1173", name: che-dashboard}]}}]"

Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Copy link

github-actions bot commented Sep 2, 2024

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

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1173", name: che-dashboard}]}}]"

Signed-off-by: Anatolii Bazko <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm label Sep 2, 2024
Copy link

github-actions bot commented Sep 2, 2024

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

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1173", name: che-dashboard}]}}]"

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.

LGTM

Copy link

openshift-ci bot commented Sep 2, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@tolusha tolusha merged commit 96c0e10 into main Sep 3, 2024
17 of 20 checks passed
@tolusha tolusha deleted the 23081 branch September 3, 2024 09:12
@devstudio-release
Copy link

Build 3.17 :: dashboard_3.x/534: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

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

Successfully merging this pull request may close these issues.

6 participants