Skip to content

KAFKA-16339: [2/4 KStream#flatTransform] Remove Deprecated "transformer" methods and classes#17245

Merged
mjsax merged 7 commits intoapache:trunkfrom
fonsdant:kstream-flat-transform-remove-deprecated-transformer-methods-and-classes
Nov 8, 2024
Merged

KAFKA-16339: [2/4 KStream#flatTransform] Remove Deprecated "transformer" methods and classes#17245
mjsax merged 7 commits intoapache:trunkfrom
fonsdant:kstream-flat-transform-remove-deprecated-transformer-methods-and-classes

Conversation

@fonsdant
Copy link
Copy Markdown
Contributor

This PR has as base the PR: #17198.

@fonsdant fonsdant changed the title KAFKA-16339: [1/4 KStream#flatTransform] Remove Deprecated "transformer" methods and classes KAFKA-16339: [2/4 KStream#flatTransform] Remove Deprecated "transformer" methods and classes Sep 20, 2024
@fonsdant fonsdant marked this pull request as draft October 27, 2024 16:48
Signed-off-by: Joao Pedro Fonseca Dantas <fonsdant@gmail.com>
Signed-off-by: Joao Pedro Fonseca Dantas <fonsdant@gmail.com>
Signed-off-by: Joao Pedro Fonseca Dantas <fonsdant@gmail.com>
Signed-off-by: Joao Pedro Fonseca Dantas <fonsdant@gmail.com>
Signed-off-by: Joao Pedro Fonseca Dantas <fonsdant@gmail.com>
@fonsdant fonsdant force-pushed the kstream-flat-transform-remove-deprecated-transformer-methods-and-classes branch from 7ea8ea0 to cb37065 Compare November 7, 2024 01:50
Signed-off-by: Joao Pedro Fonseca Dantas <fonsdant@gmail.com>
Signed-off-by: Joao Pedro Fonseca Dantas <fonsdant@gmail.com>
@fonsdant fonsdant marked this pull request as ready for review November 7, 2024 02:05
@fonsdant
Copy link
Copy Markdown
Contributor Author

fonsdant commented Nov 7, 2024

Hi, @mjsax! I have rebased this branch, removed flatTransform, and refactored where needed.

Copy link
Copy Markdown
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

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

Thanks for update the PR. Overall LGTM. Just one question about rewriting vs removing some tests.

@SuppressWarnings("deprecation")
public void shouldNotAllowBadTransformerSupplierOnFlatTransform() {
final org.apache.kafka.streams.kstream.Transformer<String, String, Iterable<KeyValue<String, String>>> transformer = flatTransformerSupplier.get();
public void shouldNotAllowBadProcessSupplierOnProcess() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there no existing test for ProcessSupplier to test test case? Just wondering if this rewrite makes sense (and closes a test gap), or if this rewrite would duplicate an existing test (and thus, we could just remove this test instead of rewriting it)?

@SuppressWarnings("deprecation")
public void shouldNotAllowBadTransformerSupplierOnFlatTransformWithNamed() {
final org.apache.kafka.streams.kstream.Transformer<String, String, Iterable<KeyValue<String, String>>> transformer = flatTransformerSupplier.get();
public void shouldNotAllowBadProcessSupplierOnProcessWithNamed() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same question

@SuppressWarnings("deprecation")
public void shouldNotAllowBadTransformerSupplierOnFlatTransformWithNamedAndStores() {
final org.apache.kafka.streams.kstream.Transformer<String, String, Iterable<KeyValue<String, String>>> transformer = flatTransformerSupplier.get();
public void shouldNotAllowBadProcessSupplierOnProcessWithNamedAndStores() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

as above

@fonsdant
Copy link
Copy Markdown
Contributor Author

fonsdant commented Nov 8, 2024

@mjsax, I have refactored only those which seemed not covered yet. To discover them, I have compared all tests referencing process and flatTransform in KStreamImplTest and removed equivalent ones.

@mjsax mjsax merged commit 9565043 into apache:trunk Nov 8, 2024
@mjsax
Copy link
Copy Markdown
Member

mjsax commented Nov 8, 2024

Thanks for double checking the tests!

Merged to trunk.

@fonsdant
Copy link
Copy Markdown
Contributor Author

fonsdant commented Nov 8, 2024

Thanks, Matthias!

Two down, two to go 😃

@fonsdant fonsdant deleted the kstream-flat-transform-remove-deprecated-transformer-methods-and-classes branch November 20, 2024 18:32
chiacyu pushed a commit to chiacyu/kafka that referenced this pull request Nov 30, 2024
…er" methods and classes (apache#17245)

Reviewers: Matthias J. Sax <matthias@confluent.io>
tedyu pushed a commit to tedyu/kafka that referenced this pull request Jan 6, 2025
…er" methods and classes (apache#17245)

Reviewers: Matthias J. Sax <matthias@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants