-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 model warnings #10226
Fix model warnings #10226
Conversation
The additional properties is made consistent with lazy initialization across all model classes. There also few similar changes. Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
api/src/main/java/io/strimzi/api/kafka/model/bridge/KafkaBridge.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/bridge/KafkaBridgeAdminClientSpec.java
Outdated
Show resolved
Hide resolved
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 left a couple of comments but I was wondering if we should do something like we already have with the abstract Spec
class which is already defining the additional properties this way and then it's inherited by all the XXXXSpec
classes.
Here, we are duplicating the same code across the model classes to do the same thing, maybe a similar abstract class would simplify the code avoiding duplication.
api/src/main/java/io/strimzi/api/kafka/model/bridge/KafkaBridge.java
Outdated
Show resolved
Hide resolved
Good idea. We already have |
Some of the ways in the API are weird in how the various tools handle it. I'm not sure you can use default methods for it and for additional properties it is hard to test. |
Yeah, let me double check this. Thanks. |
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
@ppatierno I tried with both default methods and abstract class. The former approach compiles but then you have hundreds of test failures, the latter doesn't work in our case as you can only extend one class. |
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.
Few more nits. But LGTM otherwise. Let's see if all the changed configs really work - I will run the STs.
api/src/main/java/io/strimzi/api/kafka/model/kafka/KafkaResources.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/rebalance/KafkaRebalanceStatus.java
Outdated
Show resolved
Hide resolved
/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. Nothing more from me. Let's see if tests pass.
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
The additional properties is made consistent with lazy initialization across all model classes. There also few similar changes.