8000 Deprecate accessor methods by erikvanoosten · Pull Request #1449 · zio/zio-kafka · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Deprecate accessor methods #1449

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

Merged
merged 1 commit into from
Feb 8, 2025
Merged

Deprecate accessor methods #1449

merged 1 commit into from
Feb 8, 2025

Conversation

erikvanoosten
Copy link
Collaborator
@erikvanoosten erikvanoosten commented Feb 2, 2025

Accessor methods are deprecated by the ZIO community. Therefore, all accessor methods for Consumer, Producer and TransactionalProducer have been deprecated so that they can be removed in zio-kafka 3.0.0.

Accessor methods were heavily used in the zio-kafka unit tests. Therefore, all tests and benchmarks have been rewritten to use services directly. KafkaTestUtils has been extended with several methods to make this easier. To nudge users of the zio-kafka-test-kit, anything that promotes accessor methods is also deprecated.

The unit tests now have less layer trickery and are easier to understand.

The documentation has been extended with a migration guide: https://github.com/zio/zio-kafka/blob/accessors/docs/migrating-to-2.11.md

Hint for the reviewer: enable "hide whitespace" for smaller diffs.

@erikvanoosten erikvanoosten force-pushed the accessors branch 4 times, most recently from f915bb0 to 347d315 Compare February 2, 2025 14:59
@svroonland svroonland modified the milestone: 3.0.0 Feb 2, 2025
erikvanoosten added a commit that referenced this pull request Feb 6, 2025
In preparation of removing the accessor method in zio-kafka 3.0.0, this change already removes them from the user documentation.

File `writing-tests.md` is updated in a separate PR (#1449) as it involves code changes as well.
Accessor methods are deprecated by the ZIO community. Therefore, all accessor methods for `Consumer`, `Producer` and `TransactionalProducer` have been deprecated so that they can be removed in zio-kafka 3.0.0.

Accessor methods were heavily used in the zio-kafka unit tests. Therefore, all tests and benchmarks have been rewritten to use services directly. `KafkaTestUtils` has been extended with several methods to make this easier. To nudge users of the zio-kafka-test-kit, anything that promotes accessor methods is also deprecated.

The unit tests now have less layer trickery and are easier to understand.
erikvanoosten added a commit that referenced this pull request Feb 8, 2025
In preparation of removing the accessor method in zio-kafka 3.0.0, this change already removes them from the user documentation.

File `writing-tests.md` is updated in a separate PR (#1449) as it involves code changes as well.
Copy link
Collaborator
@svroonland svroonland left a comment

Choose a reason for hiding this comment

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

Too many lines changes for me to give it a good review, also in the wording of the docs.. But the principle of the changes and the rationale is fine by me.

@erikvanoosten erikvanoosten merged commit 9c72bff into master Feb 8, 2025
13 checks passed
@erikvanoosten erikvanoosten deleted the accessors branch February 8, 2025 13:15
erikvanoosten added a commit that referenced this pull request Feb 8, 2025
In preparation of removing the accessor method in zio-kafka 3.0.0, this change already removes them from the user documentation.

File `writing-tests.md` is updated in a separate PR (#1449) as it involves code changes as well.
erikvanoosten added a commit that referenced this pull request Feb 8, 2025
In preparation of removing the accessor method in zio-kafka 3.0.0, this
change already removes them from the user documentation.

The diff looks a bit large because how to create a consumer was split to
a different file.

File `writing-tests.md` is updated in a separate PR (#1449) as it
involves code changes as well.
< 66A4 /div>
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.

2 participants
0