KAFKA-7855: Kafka Streams Maven Archetype quickstart fails to compile out of the box#6194
Conversation
|
@aurlien thanks for the PR! Can you try build the project just as a normal mvn one and see if it compiles? |
|
Hi @guozhangwang, thanks for reaching out. Trying to compile the quickstart project ( I haven't managed to fix this yet, but guess that has something to do with my local setup? However, making the same change as this PR does, to the output of the following, makes the built example project compile: Please tell me if I'm doing something wrong here - this is my first Kafka PR, and I'm eager to learn :) |
|
@aurlien Thanks for the PR. And welcome to the community! I personally would prefer the solution to specify the type as About the error: yes, it seems you don't have @guozhangwang I am wondering why this was not detected via tests. Seems we don't have a test pipeline for this. I am not sure atm how hard it would be to get test coverage for this? Thoughts? |
It is a bit hard.. note for architype project, it declares the streams jar as external dependency, so to test this we need to have a unit test that takes in the streams jar. Maybe we can have a system test style case, like |
|
@guozhangwang What is the conclusion? We skip adding a test and merge? |
|
Yeah although it is not ideal I felt it is very hard, if possible to add a test covering similar issues as part of AK, since it would involve adding a new procedure as part of unit test that 1) download an artifact, 2) |
|
Thanks for the feedback! And sorry for the late reply, for some reason this conversation ended in my spam folder. If you prefer, I can add the type to the builder - I see your point about the educational value. |
|
cc @mjsax for final reviews. |
|
I just tested this locally. It's does still not compile, because we also need to import I leave it up to you how you fix it -- either add the import or get rid of |
|
@aurlien Any update on this? |
|
@mjsax Sorry for the delay, I will fix it tomorrow! |
|
@mjsax I updated to use your recommended However, I couldn't get the previous solution to fail, when compiling this project. I ran |
|
The command you execute, creates the archetype. It only fails if you use the archetype, ie, you need to do a second step: The creates a new project based on the archetype and you cannot compile this project. |
|
Java8 Passed. Java11 failed with flaky tests. Retest this please. |
mjsax
left a comment
There was a problem hiding this comment.
LGTM.
Will merge after Jenkins passed.
|
Thanks for the fix @aurlien! |
… out of the box (#6194) Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
… out of the box (#6194) Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
… out of the box (#6194) Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
|
Merged to |
… out of the box (#6194) Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
… out of the box (apache#6194) Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
… out of the box (#6194) Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
* apache/trunk: MINOR: Retain public constructors of classes from public API (apache#6455) KAFKA-8118; Ensure ZK clients are closed in tests, fix verification (apache#6456) KAFKA-7813: JmxTool throws NPE when --object-name is omitted KAFKA-8114: Wait for SCRAM credential propagation in DelegationTokenEndToEndAuthorizationTest (apache#6452) KAFKA-8111; Set min and max versions for Metadata requests (apache#6451) KAFKA-7855: Kafka Streams Maven Archetype quickstart fails to compile out of the box (apache#6194) MINOR: Update code to not use deprecated methods (apache#6434) MINOR: Update Trogdor ConnectionStressWorker status at the end of execution (apache#6445) KAFKA-8091; Use commitSync to check connection failure in listener update test (apache#6450) KAFKA-7027: Add an overload build method in scala (apache#6373) MINOR: Fix typos in LogValidator (apache#6449) KAFKA-7502: Cleanup KTable materialization logic in a single place (apache#6174) KAFKA-7730; Limit number of active connections per listener in brokers (KIP-402) KAFKA-8091; Remove unsafe produce from dynamic listener update test (apache#6443) MINOR: Fix JavaDocs warnings (apache#6435) MINOR: Better messaging for invalid fetch response (apache#6427) MINOR: Use Java 8 lambdas in KStreamImplTest (apache#6430)
… out of the box (apache#6194) Reviewers: Guozhang Wang <guozhang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
In the LineSplit.java example, the untyped KStream is resolved to
KStream<Object, Object>.value.split(..)then fails to build, because value is of type Object.Other possible solutions would be to add the type to the builder:
builder.<String, String>stream(...).flatmap(..).to(...), orbuilder.stream(..., Consumed.with(Serdes.String(), Serdes.String())).This change matches the code in the tutorial.
WIP: It should be tested during compile that the Java resource files compiles. However, I haven't found any way to achieve this. Feedback appreciated!
Committer Checklist (excluded from commit message)