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

OCM-7990 | fix: allow min_replicas 0 with edit machinepools #2040

Merged
merged 1 commit into from
May 13, 2024

Conversation

davidleerh
Copy link
Contributor

FIXED:

A. min and max replicas set at 3
image

B. edit min replicas only to 0
image

C. result
image

@openshift-ci openshift-ci bot requested review from gdbranco and oriAdler May 13, 2024 21:23
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2024
@@ -36,16 +36,6 @@ var _ = Describe("Machinepool", func() {
asBuilder := cmv1.NewMachinePoolAutoscaling().MaxReplicas(2).MinReplicas(0)
Expect(builder).To(Equal(asBuilder))
})

It("editMachinePoolAutoscaling should allow 0 min and 0 max replicas", func() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a validation done in CS that prevents users assigning 0 for max mp for autoscaling.

Copy link
Contributor

Choose a reason for hiding this comment

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

should rosa reports that error before send request to CS side? And then we still need a test case here to verify that

Copy link
Contributor

Choose a reason for hiding this comment

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

Logic looks good, but I feel you might fail test coverage though as lines were deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your review @marcolan018 @chenz4027
In addition to those, the validations on the interactive mode are missing. I will create a separate card so that we can have a robust number of test cases to make sure we surface input validation errors from the CLI before reaching CS.

Trying to have this land in RC4 as quickly as possible.
If no concerns, would you kindly approve?

Copy link
Contributor

Choose a reason for hiding this comment

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

@davidleerh I am ok with this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you!
Created OCM-8010 for myself to address this.

Copy link
Contributor

openshift-ci bot commented May 13, 2024

@davidleerh: all tests passed!

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-sigs/prow repository. I understand the commands that are listed here.

Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 24.94%. Comparing base (b952e50) to head (04e86a0).
Report is 8 commits behind head on master.

Files Patch % Lines
cmd/edit/machinepool/machinepool.go 14.28% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2040      +/-   ##
==========================================
+ Coverage   24.55%   24.94%   +0.39%     
==========================================
  Files         143      146       +3     
  Lines       21613    21774     +161     
==========================================
+ Hits         5306     5432     +126     
- Misses      15900    15928      +28     
- Partials      407      414       +7     

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

@marcolan018
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 13, 2024
Copy link
Contributor

openshift-ci bot commented May 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidleerh, marcolan018

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

The pull request process is described 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-merge-bot openshift-merge-bot bot merged commit 2f2a5b3 into openshift:master May 13, 2024
11 checks passed
@davidleerh
Copy link
Contributor Author

/cherrypick release_1.2.39

@openshift-cherrypick-robot

@davidleerh: new pull request created: #2041

In response to this:

/cherrypick release_1.2.39

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants