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

Decide if option is custom or not in a single place #10643

Conversation

scholzj
Copy link
Member

@scholzj scholzj commented Sep 26, 2024

Type of change

  • Refactoring

Description

We have currently two places to decide if a Kafka configuration option is custom or not. One in KafkaBrokerConfigurationDiff and another one in KafkaConfiguration. And they are both used for the same purpose - to determine if the option is custom and requires a rolling of the Kafka broker or whether it is not custom and can be possibly updated dynamically through Kafka API.

So having this done in two places is dangerous because the option should be always either one or the other. And by having it done in two places means that we face a risk that one day someone updates only one part. This PR creates a public method in theKafkaConfiguration class that is used in both places and help to mitigate the risk. (+ it fixes one or two minor IDE warnings in the same class)

Checklist

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

@scholzj scholzj added this to the 0.44.0 milestone Sep 26, 2024
@scholzj scholzj requested a review from ppatierno September 26, 2024 09:30
@scholzj
Copy link
Member Author

scholzj commented Sep 26, 2024

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

@scholzj scholzj merged commit f9986e5 into strimzi:main Sep 27, 2024
21 checks passed
@scholzj scholzj deleted the decide-whether-option-is-custom-or-not-in-one-place branch September 27, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants