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

KAFKA-18658: add import control for examples module #18812

Merged
merged 4 commits into from
Feb 10, 2025

Conversation

gongxuanzhang
Copy link
Contributor

@github-actions github-actions bot added triage PRs from the community build Gradle build or GitHub Actions labels Feb 6, 2025
@gongxuanzhang
Copy link
Contributor Author

@chia7712 PTAL

Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gongxuanzhang thanks for this patch. maybe we can just add "used" public packages for now? that can streamline this PR. WDYT

<allow pkg="org.apache.kafka.common.serialization" />
<allow pkg="org.apache.kafka.common.network" />
<allow pkg="org.apache.kafka.common.annotation" />
<allow pkg="org.apache.kafka.common.utils" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not public APIs

Copy link
Contributor Author

@gongxuanzhang gongxuanzhang Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that these apis are open, there is no guarantee that future examples modules will not call them. I think we should add exposed apis to the "allow list".it just means it's allowed.
@chia7712

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.apache.kafka.common.utils is not public package, and example module should use public APIs only. Otherwise, users may get encouraged by the example to use "internal" APIs

Copy link
Contributor Author

@gongxuanzhang gongxuanzhang Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right! I'm sorry for my carelessness. I changed the code,removed all markup unsupported apis . PTAL

@github-actions github-actions bot added the small Small PRs label Feb 6, 2025
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gongxuanzhang maybe we can add the packages used by current examples? that can streamline this PR

<allow pkg="org.apache.kafka.streams.errors" />
<allow pkg="org.apache.kafka.streams.query" />
<allow pkg="org.apache.kafka.streams" />
<allow pkg="org.apache.kafka.server" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not public too

<allow pkg="org.apache.kafka.server" />
<allow pkg="org.apache.kafka.server.log.remote.storage" />
<allow pkg="org.apache.kafka.connect.tools" />
<allow pkg="org.apache.kafka.connect.util" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@gongxuanzhang
Copy link
Contributor Author

@gongxuanzhang maybe we can add the packages used by current examples? that can streamline this PR

New update were made in accordance with this suggestion.
Thinks. @chia7712

@github-actions github-actions bot removed the triage PRs from the community label Feb 7, 2025
@gongxuanzhang
Copy link
Contributor Author

@chia7712 PTAL

@chia7712 chia7712 merged commit a6972db into apache:trunk Feb 10, 2025
7 of 9 checks passed
ijuma added a commit to ijuma/kafka that referenced this pull request Feb 11, 2025
…ssume-baseline-3.3-for-server

* apache-github/trunk:
  KAFKA-18366 Remove KafkaConfig.interBrokerProtocolVersion (apache#18820)
  KAFKA-18658 add import control for examples module (apache#18812)
  MINOR: Java version and TLS documentation improvements (apache#18822)
  KAFKA-18743 Remove leader.imbalance.per.broker.percentage as it is not supported by Kraft (apache#18821)
  KAFKA-18225 ClientQuotaCallback#updateClusterMetadata is unsupported by kraft (apache#18196)
  KAFKA-18441: Remove flaky tag on KafkaAdminClientTest#testAdminClientApisAuthenticationFailure (apache#18847)
  MINOR: fix KStream#to incorrect javadoc (apache#18838)
  KAFKA-18763: changed the assertion statement for acknowledgements to include only successful acks (apache#18846)
  MINOR: Accept specifying consumer group assignors by their short names (apache#18832)
pdruley pushed a commit to pdruley/kafka that referenced this pull request Feb 12, 2025
manoj-mathivanan pushed a commit to manoj-mathivanan/kafka that referenced this pull request Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Gradle build or GitHub Actions ci-approved small Small PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants