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-12417: streams copyDependentLibs
should not copy testRuntime configuration jars
#10466
Conversation
I filed a JIRA for this issue, the build failed with this change before. Did it work for you? |
The change I had attempted was slightly different: https://issues.apache.org/jira/browse/KAFKA-12417 |
I just pushed And yes, I do receive same circular dependency error with Gradle 7 (as you mentioned in a JIRA ticket above):
This Gradle issue seems to be related : gradle/gradle#16604 (see step 4. under Steps to Reproduce). @ijuma I can take that JIRA ticket and hopefully provide some solution. Is that ok with you ? |
@dejan2609 yes, please take the ticket. It would be great to solve this so that we can build with Java 16. |
Gradle 7.0 has been released. Any luck figuring out the issue? |
@ijuma I narrowed the gap and will post my findings here in a few days.... some more digging will be required in order to solve this (I will try to squeeze it asap). |
I am going to split my findings to a separate comments... here it goes. I decided to work with Gradle 6.8.3 for the moment (that is, until circular dependency issue is resolved). After that we can try with Gradle 7.0. So, I am going to change title and align it with a corresponding JIRA ticket that was mentioned above: https://issues.apache.org/jira/browse/KAFKA-12417 |
testRuntime
-->> testRuntimeClasspath
)
Also, after some digging I stumbled upon these GitHub resources (I will intentionally leave them formatted as code):
I tested this quick and dirty solution (experimented with changing Also, I played around with dependencies and tasks:
So, after some time, I moved to a phase two. |
Digging through project history I managed to find some commits that are seems to be related (see the comment):
@vvcephei contributed two PRs (#4821 and #4812) 3 years ago and these are related commits: Out of curiosity I tried to consolidate these dependency into one
|
Could we reintroduce a configuration that behaves the same as |
Ok, I finished my writings above (I just had to be as detailed as possible, these comments serve me a lot).
Well, I can try to revert to a previous solution, see how that goes and build it from there. |
@ijuma Can you please expand on this ? Are you referring to a https://github.com/apache/kafka/blob/2.8.0-rc2/build.gradle#L1472
Thing is that this code was introduced back in the year 2015. (as a fresh/newly added code). I see that I will try to compare other 14 (that work as expected) with this one (that fails). |
@ijuma quick update: I did made some progress developing a |
testRuntime
-->> testRuntimeClasspath
)testRuntime
@ijuma So, now I have something to show: I managed perform some reverse-engineering and received exactly the same content in Also: Gradle version is bumped (from 6.8.3 to 7.0). Pitfall:
|
@dejan2609 can you please rebase on trunk? |
93c71c6
to
0030d44
Compare
@ijuma branch is rebased onto trunk (I can also squash all commits into one). |
@ijuma previous commits are rebased/squashed and PR branch is force-pushed. Overall: Gradle build looks ok (on my loptop, that is). Some warnings do appear (related to spotless plugin / scala compilation) but I guess those things can be solved elsewhere (I volunteer to create JIRA tickets and see what can be done). I opted to change commit message in order to emphasize Gradle version upgrade (if that is ok with you we can also change summaries for JIRA ticket and this PR). One more note: Gradle patch 7.0.1 is around the corner (with lots of issues being solved: https://github.com/gradle/gradle/milestone/173). |
Can you remove the Gradle version bump from this PR then? We can merge the other change and see if there's any impact. We can then go straight to Gradle 7.0.1 once it's released. It may take 1-3 weeks from the link you shared. |
Sure, let go step-by-step then. |
note: this was a prerequisite for an upgrade to Gradle 7
Done, changes are trimmed down. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @vvcephei @guozhangwang @mjsax Any of you would like to review this too?
Unrelated failures, merging to trunk. |
testRuntime
copyDependentLibs
should not copy testRuntime configuration jars
This also fixes a Gradle deprecation that unblocks the upgrade to Gradle 7.0.