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

Improve min.insync.replicas parsing in warnTooLargeMinIsr #10844

Merged
merged 4 commits into from
Nov 28, 2024

Conversation

fvaleri
Copy link
Contributor

@fvaleri fvaleri commented Nov 18, 2024

Type of change

  • Enhancement / new feature

Description

When reconciling a replicas change, we check the target number of replicas against the configured minISR. In that case, a ClassCastException is raised if the user sets min.insync.replicas: "1" (quoted value). This patch aligns this configuration parsing to the rest of the code, where this is tolerated.

Checklist

  • Make sure all tests pass
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally

When reconciling a replicas change, we check the target number of replicas against the configured minISR.
In that case, a ClassCastException is raised if the user sets min.insync.replicas: "1" (quoted value).
This patch aligns this configuration parsing to the rest of the code, where this is tolerated.

Signed-off-by: Federico Valeri <[email protected]>
@ppatierno ppatierno added this to the 0.45.0 milestone Nov 18, 2024
@fvaleri
Copy link
Contributor Author

fvaleri commented Nov 18, 2024

The failed test TopicControllerIT#shouldUpdateTopicInKafkaWhenConfigRemovedInKube is not related to the change and it seems to work fine locally. Will continue the investigation.

Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

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

I guess there should be some test for it if we want to support both String and Integer formats?

Signed-off-by: Federico Valeri <[email protected]>
Copy link
Member

@see-quick see-quick left a comment

Choose a reason for hiding this comment

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

LGTM

@fvaleri
Copy link
Contributor Author

fvaleri commented Nov 26, 2024

@ppatierno @see-quick is this ready to merged?

@see-quick
Copy link
Member

I guess there should be some test for it if we want to support both String and Integer formats?

@ppatierno @see-quick is this ready to merged?

I assume this test case replicasChangeShouldBeReconciled covers the String format. I don't see any Integer format, but I would expect many tests to cover Integer format (as it was the default). Am I right?

@fvaleri
Copy link
Contributor Author

fvaleri commented Nov 26, 2024

I guess there should be some test for it if we want to support both String and Integer formats?

@ppatierno @see-quick is this ready to merged?

I assume this test case replicasChangeShouldBeReconciled covers the String format. I don't see any Integer format, but I would expect many tests to cover Integer format (as it was the default). Am I right?

Correct. The issue was triggered specifically by a RF change, that's why I added there.

@see-quick see-quick added the ready for merge Label for PRs which are ready for merge label Nov 27, 2024
@see-quick see-quick merged commit f8adda4 into strimzi:main Nov 28, 2024
13 checks passed
@fvaleri fvaleri deleted the fix-to-cce branch November 28, 2024 14:55
OwenCorrigan76 pushed a commit to OwenCorrigan76/strimzi-kafka-operator that referenced this pull request Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for merge Label for PRs which are ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants