-
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
Fix paused connector status when Connect is scaled to zero #9926
Conversation
The common strategy across operators is that a paused resource should overwrite any error in terms of status update. This is currently not happening when a connector is paused after Connect is scaled to zero. The connector is first updated to `NotReady` by `connectorEventHandler`, and then `ReconciliationPaused` by `reconcileConnectors`. The `testConnectorResourceMetricsScaledToZero` fails randmonly because of this double status update. Besides, the test is wrong, as it does not expect the connector to be paused. Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
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.
One nit ... it seems to look good otherwise.
...rc/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaConnectAssemblyOperator.java
Show resolved
Hide resolved
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
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 @fvaleri. Good job! 👍
/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. I found more issues related to scale-to-zero while testing this, but they are not related to the changes from this PR (this Pr fixes what it promises to fix) and should be addressed separately.
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!
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!
The common strategy across operators is that a paused resource should overwrite any error in terms of status update. This is currently not happening when a connector is paused after Connect is scaled to zero.
The connector is first updated to
NotReady
byconnectorEventHandler
, and thenReconciliationPaused
byreconcileConnectors
. ThetestConnectorResourceMetricsScaledToZero
fails randmonly because of this double status update. Besides, the test is wrong, as it does not expect the connector to be paused.This should fix #9843.