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

Fix model warnings #10226

Merged
merged 5 commits into from
Jun 14, 2024
Merged

Fix model warnings #10226

merged 5 commits into from
Jun 14, 2024

Conversation

fvaleri
Copy link
Contributor

@fvaleri fvaleri commented Jun 13, 2024

The additional properties is made consistent with lazy initialization across all model classes. There also few similar changes.

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>
@fvaleri fvaleri added this to the 0.42.0 milestone Jun 13, 2024
Copy link
Member

@ppatierno ppatierno left a 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.

@fvaleri
Copy link
Contributor Author

fvaleri commented Jun 14, 2024

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.

Good idea. We already have UnknownPropertyPreserving interface, so we could add default implementations there. Would that work?

@scholzj
Copy link
Member

scholzj commented Jun 14, 2024

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.

Good idea. We already have UnknownPropertyPreserving interface, so we could add default implementations there. Would that work?

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.

@fvaleri
Copy link
Contributor Author

fvaleri commented Jun 14, 2024

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>
@fvaleri
Copy link
Contributor Author

fvaleri commented Jun 14, 2024

@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.

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.

Few more nits. But LGTM otherwise. Let's see if all the changed configs really work - I will run the STs.

@scholzj
Copy link
Member

scholzj commented Jun 14, 2024

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@ppatierno ppatierno left a 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>
@scholzj scholzj merged commit 491cecd into strimzi:main Jun 14, 2024
13 checks passed
@fvaleri fvaleri deleted the fix-model-warn branch June 15, 2024 07:53
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.

None yet

3 participants