-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
pkg/test/e2eutil: wait for a deployment to have >= n replicas #2248
pkg/test/e2eutil: wait for a deployment to have >= n replicas #2248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to me. Good catch. 🥇
It is just missing an entry in the CHANGELOG. Could you please add?
6b028cf
to
30714a9
Compare
Sorry about that - I've added it now. |
CHANGELOG.md
Outdated
@@ -11,6 +11,7 @@ | |||
### Removed | |||
|
|||
### Bug Fixes | |||
- WaitForDeployment and WaitForOperatorDeployment from pkg/test/e2eutil successfully complete waiting when the available replica count is greater than the minimum replica count required. ([#2248](https://github.com/operator-framework/operator-sdk/pull/2248)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- WaitForDeployment and WaitForOperatorDeployment from pkg/test/e2eutil successfully complete waiting when the available replica count is greater than the minimum replica count required. ([#2248](https://github.com/operator-framework/operator-sdk/pull/2248)) | |
- Fix `WaitForDeployment` and `WaitForOperatorDeployment` from`pkg/test/e2eutil` successfully complete waiting when the available replica count is equals or greater than the minimum replica count required. ([#2248](https://github.com/operator-framework/operator-sdk/pull/2248)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is a bug fix. Seems more like a change/improvement to me.
Also to build on @camilamacedo86's suggestion, WDYT of this for the CHANGELOG line:
- WaitForDeployment and WaitForOperatorDeployment from pkg/test/e2eutil successfully complete waiting when the available replica count is greater than the minimum replica count required. ([#2248](https://github.com/operator-framework/operator-sdk/pull/2248)) | |
- Updated `pkg/test/e2eutil.WaitForDeployment()` and `pkg/test/e2eutil.WaitForOperatorDeployment()` to successfully complete waiting when the available replica count is _at least_ (rather then exactly) the minimum replica count required. ([#2248](https://github.com/operator-framework/operator-sdk/pull/2248)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good to me. I've updated the changelog. Thank you both for the help!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They may have a better suggestion for the CHANGELOG. So, please feel free to wait for others input as well.
30714a9
to
77e897e
Compare
Shows that after this change the asserts are not working well for ansible. See skipping: [localhost] => {"changed": false, "skip_reason": "Conditional result was False"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm /approved
It is passing in the CI now
and it is a very small change which shows 100% ok for me.
Before waitForDeployment was waiting until the exact number of replicas were available. Now, wait for at least that number of replicas to be available. scenario: I'm using an operator with 3 replicas, but only 1 is needed for tests to work. If all 3 replicas were available before waitForDeployment started then it would wait until it timed out because 3 does not equal 1. Now, since 3 replicas is greater than the 1 needed for tests waitForDeployment successfully waits.
77e897e
to
c5597bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm /approved
@joelanford are you ok with merge this one now? WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joelanford no reason not to merge this.
/lgtm
Before waitForDeployment was waiting until the exact number of replicas
were available. Now, wait for at least that number of replicas to be
available.
scenario:
I'm using an operator with 3 replicas, but only 1 is needed for tests to
work. If all 3 replicas were available before waitForDeployment started
then it would wait until it timed out because 3 does not equal 1. Now,
since 3 replicas is greater than the 1 needed for tests waitForDeployment
successfully waits.