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 typo in import control #9500

Merged
merged 2 commits into from
Jan 4, 2024
Merged

Conversation

fvaleri
Copy link
Contributor

@fvaleri fvaleri commented Jan 3, 2024

This change fixes a typo in the import-control configuration file.

@fvaleri fvaleri added this to the 0.40.0 milestone Jan 3, 2024
@fvaleri fvaleri requested review from scholzj and ppatierno January 3, 2024 14:12
@fvaleri fvaleri changed the title Fux typo in import control Fx typo in import control Jan 3, 2024
@fvaleri fvaleri changed the title Fx typo in import control Fix typo in import control Jan 3, 2024
Signed-off-by: Federico Valeri <[email protected]>
@fvaleri fvaleri force-pushed the fix-import-control branch from 927759b to a365c30 Compare January 3, 2024 14:13
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 the rule is not needed if everything worked despite the typo?

@fvaleri
Copy link
Contributor Author

fvaleri commented Jan 3, 2024

Unlike Labels that is in operator-common/io/strimzi/operator/common/model, Annotations is in operator-common/io/strimzi/operator/common. Is this correct, or we want to move Annotations inside model and keep the rule?

@scholzj
Copy link
Member

scholzj commented Jan 3, 2024

Unlike Labels that is in operator-common/io/strimzi/operator/common/model, Annotations is in operator-common/io/strimzi/operator/common. Is this correct, or we want to move Annotations inside model and keep the rule?

Sorry, I don't follow what you mean by this.

If the rule refers to a wrong class and nothing is failing, it seems that either the import control does not work properly or the rule is not needed at all.

@fvaleri
Copy link
Contributor Author

fvaleri commented Jan 3, 2024

We have two similar rules for operator-common:

<import-control pkg="io.strimzi" strategyOnMismatch="allowed">
    <subpackage name="operator.common.model" strategyOnMismatch="disallowed">
        ...
        <allow class="io.strimzi.api.ResourceLabels" />        <!-- rule 1 -->
        <allow class="io.strimzi.api.ResourceAnnotations" />   <!-- rule 2 -->

These rules are supposed to be used by the following classes:

io.strimzi.operator.common.model.Labels // extends io.strimzi.api.ResourceLabels 
io.strimzi.operator.common.Annotations // extends io.strimzi.api.ResourceAnnotations

Nothing is failing because Annotations is NOT in the io.strimzi.operator.common.model package.

Now, there are two paths here:

  1. Simply get rid of rule 2
  2. Move the Annotations class from io.strimzi.operator.common to io.strimzi.operator.common.model and keep the current change.

@scholzj
Copy link
Member

scholzj commented Jan 3, 2024

I would probably remove the rule.

Signed-off-by: Federico Valeri <[email protected]>
@scholzj scholzj merged commit 328d604 into strimzi:main Jan 4, 2024
13 checks passed
@fvaleri fvaleri deleted the fix-import-control branch January 4, 2024 11:39
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.

4 participants