-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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-1880: Add support for checking binary/source compatibility #5620
base: trunk
Are you sure you want to change the base?
Conversation
@asasvari @andrasbeni @smurakozi @akatona84 would you please review this? |
Thanks for picking this up. Does this fail PRs if there is a compatibility break? And does it only check public APIs? |
@ijuma at this point it is only a report that can be run manually, it's not part of the build task. The reason for this is that the compare tool (japicmp) requires two sets compiled jars (old and new) and it is quite lengthy to compile both: it takes about 3-4 minutes and I think it should be enough if only Jenkins bounces the commit back. Improvement idea 1. should reduce it to the half of this time. Let me know if you think we should add this to the local build as well. Adding it to the Jenkins jobs however can absolutely be done with some extra steps. For instance in case of trunk: since the previous release was 2.0.0 we need to specify that to the Jenkins build as well (unfortunately "specifying the previous release" can't be automated, we need to figure it out manually for each job).
So if you're on the 2.1.x development branch, you need to set 2.0 as the base branch Some possible ways to improve this:
|
0fe0d36
to
57230c2
Compare
Added WIP to the PR title as I'm actually pretty close on implementing idea |
Some answers: Public packages are specified in the gradle build in the following way (confusing, I know):
Generally, the goal is to compare the APIs with a released version. Can we not simply rely on the released artifacts instead of compiling manually? |
@ijuma yea I was thinking about adding that feature. Basically I would need to create dependencies out of the provided versions and resolve them. I think it can be done but last time I looked it didn't seem trivial. Let me look into it and come back with what I'll find. Thanks for the public packages. |
@ijuma A couple of questions to clarify the use-case. So I was presuming that generally there are 5 use-cases.
I'm curious if you think we'd aim for these changes or do we need something else? Also I managed to figure out a way for downloading dependencies (it doesn't seem to be too complex afterall), but it requires a bit more time to implement a well-working solution. Also I'll limit the minimum version to be 0.11.0.0 for version downloads. The reason is that certain projects are added during the life of Kafka and going back too much would overcomplicate the whole checker (as I need to add exceptions for certain projects etc.) and I don't see the value in those situations. I think it is not often a use-case when such an old version is asked. And if it is, we can fall back to "compile then compare" instead of "download and compare". If needed I can do it after more important things are ready. |
Yes.
Yes.
Nice to have, but could be done separately.
Is this different from the Jenkins PR point?
Helpful, but one would hope that the dependencies do this on their own.
I'd say we could even just do 2.0 and trunk. |
57230c2
to
320f3fe
Compare
@ijuma answeing your question: yes it is a subclass of the PR point technically not different. I've reworked this pretty much and accomodated for most of these use cases (except the dependency checking).
|
@TolerableCoder would you please also review it? |
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.
Looks good in general, just some minor stuff
@ijuma is this still needed? What can I do to make this eligible for merging? (Besides rebasing it :) ) |
Yes! Maybe @omkreddy can help review. |
Thanks :) |
b09a590
to
6227813
Compare
@omkreddy @ijuma updated this PR, please check it if it's good from a usability perspective and otherwise. |
In fact I pushed it so it can be compared if needed. |
restest this please |
retest this please |
@omkreddy would you please review this once you get some time? |
retest this please |
5fdb2f6
to
e5566d6
Compare
639f5c2
to
b58d89c
Compare
@cmccabe thanks a lot for reviewing this PR. I've updated it considering your suggestions. Now I use the S3 bucket to download the released artefacts instead of resolving them from maven repositories. The user can use |
783d70f
to
9581241
Compare
retest this please |
Sorry, I'm really overloaded right now, but I do think this is important. Can I check back in a week? Mention me on the PR then? |
9581241
to
fe0cae1
Compare
@cmccabe just checking back, would you please let me know if you have time ro review this or shall we postpone it? |
fe0cae1
to
3b4faad
Compare
@cmccabe just checking back, please let me know if you can set aside some time to review this. |
@cmccabe just checking back if you have some bandwidth for a review? |
This PR aims to extend the gradle build with a task that can generate a report for API/ABI compatibility.
Committer Checklist (excluded from commit message)