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
#7988-added labels and annotation keys into api module #9103
Conversation
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 for the PR. The new classes look good. But we do not want to keep these annotations / labels twice. So you would also need to remove the original ones and in the places they were used use these instead.
package io.strimzi.api; | ||
|
||
/** | ||
* Class for holding some annotation keys and utility methods for handling |
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.
There are no utility methods in this class, or?
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.
@ppatierno - You are right no utility methods, I will remove that from comment lines.
@scholzj - I have a suggestion instead of using the labels/annotations from new class in all the places. Can't we extend the |
I think that would work, yes. It would also cause less confusion in the imports in places where both can be used. Does that sound reasonable to you as well @ppatierno? |
Yea I am fine with it, thanks @pratikkolkar ! |
d641ea4
to
7420c8d
Compare
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 think the code changes look good. But the build failed because of some unused imports:
[ERROR] /home/vsts/work/1/s/cluster-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/ManualPodCleaner.java:18:8: Unused import - io.strimzi.operator.common.operator.resource.AbstractScalableNamespacedResourceOperator. [UnusedImports]
[ERROR] /home/vsts/work/1/s/cluster-operator/src/test/java/io/strimzi/operator/cluster/operator/assembly/ManualPodCleanerTest.java:19:8: Unused import - io.strimzi.operator.common.operator.resource.AbstractScalableNamespacedResourceOperator. [UnusedImports]
So you will need to remove those.
7420c8d
to
bbee0c2
Compare
Hmm, looks like Spotbugs does not like this:
I'm sure we can suppress it. But I wonder if it has a point. Should we name the classes in the |
In general I don't like having classes linked by an inheritance relationship with same name (even if living in different packages). I would do what you are suggesting. |
I would specifically add the two classes:
|
Signed-off-by: Pratikkumar Kolkar <pratikkolkar@gmail.com>
…api module Signed-off-by: Pratikkumar Kolkar <pratikkolkar@gmail.com>
Signed-off-by: Pratikkumar Kolkar <pratikkolkar@gmail.com>
Signed-off-by: Pratikkumar Kolkar <pratikkolkar@gmail.com>
bbee0c2
to
c5f5be4
Compare
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. This LGTM now.
/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
Thanks for the PR @pratikkolkar ... Nice work! |
Type of change
Select the type of your PR
Description
As per issue #7988. Made label and annotation keys available in api module by adding
Labels
andAnnotations
class underio.strimzi.api
package.Checklist
Please go through this checklist and make sure all applicable tasks have been done