-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Don't fail reconciliation when Manual Rolling Update fails #10005
Conversation
Signed-off-by: Lixin Yao <lixin_yao@apple.com>
Signed-off-by: Lixin Yao <lixin_yao@apple.com>
Signed-off-by: Lixin Yao <lixin_yao@apple.com>
Signed-off-by: Lixin Yao <lixin_yao@apple.com>
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Thanks for the PR. The code looks good. I left only some smaller comments. Would it be worth to also add some unit tests for Connect / Mirror Maker 2? They have already some maunal rolling update tests in KafkaMirrorMaker2AssemblyOperatorPodSetTest.java
and KafkaConnectAssemblyOperatorPodSetTest.java
...tor/src/main/java/io/strimzi/operator/cluster/operator/assembly/AbstractConnectOperator.java
Outdated
Show resolved
Hide resolved
...tor/src/main/java/io/strimzi/operator/cluster/operator/assembly/AbstractConnectOperator.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/main/java/io/strimzi/operator/cluster/FeatureGates.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/test/java/io/strimzi/operator/cluster/FeatureGatesTest.java
Outdated
Show resolved
Hide resolved
...trimzi/operator/cluster/operator/assembly/KafkaAssemblyOperatorManualRollingUpdatesTest.java
Show resolved
Hide resolved
One more thing ... could you also enable the feature gate in these two files:
in the |
Signed-off-by: Lixin Yao <lixin_yao@apple.com>
Signed-off-by: Lixin Yao <lixin_yao@apple.com>
I looked at it but didn't find an easy way to simulate a manual roll failure, since it was not using mock operator. Any suggestion? |
Maybe you have to write one. You could also try to trigger the error through some mocked method. Maybe if you throw here an error instead of success it would cause an error you can use?
Let's look sta it next week. Otherwise it looks good. |
/azp run feature-gates-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
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, just had one comment about the tests.
@@ -429,6 +430,157 @@ vertx, new PlatformFeaturesAvailability(false, KUBERNETES_VERSION), | |||
}))); | |||
} | |||
|
|||
@Test | |||
public void testManualPodRollingUpdateWithPodSetsWithError1(VertxTestContext context) { |
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.
These are effectively parametrized tests, so it might be worth using the actual annotation, it would save having lots of tests with the same name but different numbers at the end. https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests-sources-MethodSource
Signed-off-by: Jakub Scholz <www@scholzj.com>
@Staniel I added the unit tests so that we can move forward with this and unblock some other work that would conflict with this. @ppatierno Could you please review this? |
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run feature-gates-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
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. Thanks!
Type of change
Select the type of your PR
Description
Implements https://github.com/strimzi/proposals/blob/main/070-dont-fail-reconciliation-in-manual-rolling-update.md
Checklist
Please go through this checklist and make sure all applicable tasks have been done