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

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

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