Skip to content

Spring 5 support for spring-kafka-test #719

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

Closed
fabienmifsud opened this issue Jun 29, 2018 · 6 comments
Closed

Spring 5 support for spring-kafka-test #719

fabienmifsud opened this issue Jun 29, 2018 · 6 comments

Comments

@fabienmifsud
Copy link
Contributor

Hi all,

Can spring-kafka-test support spring 5 in the next release ?

I can help on that subject if needed.

Thx !

@artembilan
Copy link
Member

Would you mind being more precise?
Spring Kafka project is based on Spring 5 since version 2.0: https://docs.spring.io/spring-kafka/docs/2.0.0.RELEASE/reference/html/_introduction.html#compatibility

@fabienmifsud
Copy link
Contributor Author

spring-kafka-test has spring-retry dependency wich refeers to a spring 4.x version and that leads my tests to have some class not found..

I did make a PR on it spring-projects/spring-retry#117 to upgrade it.

@artembilan
Copy link
Member

Well, that's not so easy to move Spring Retry to Spring 5, because the last one requires Java 8 minimum and for that reason we would need to start a version 2.0.
That even might be a bad idea, but we don't have themes for 2.0 version yet.
On the other hand we haven't done that yet just because the current Spring Retry version is fully compatible with Spring 5 - we just only need to have proper dependencies in the classpath!

To fix the problem in your project you need to exclude Spring 4 transitive dependencies from the spring-retry dependency:

compile ("org.springframework.retry:spring-retry:1.2.2.RELEASE") {
    exclude group: 'org.springframework'
}

I would say that exactly this fix has to be done here in this Spring Kafka project.

@fabienmifsud
Copy link
Contributor Author

fabienmifsud commented Jun 29, 2018 via email

@artembilan
Copy link
Member

Just bumping version is not enough to start a new major version.
We can't do what you suggest in your PR in the current minor version: it is going to be a big breaking change for our users and we are very reluctant to make breaking change.
Another argument do not start a new major version I've explained before: Spring Retry works well with the latest Spring 5.0 - just need to adjust dependencies in your project a bit!
Otherwise we would need to support two major versions in parallel.

Nevertheless, there is no reason to start a new major version because everything is compatible in the current state.

I didn't tell you to exclude spring-retry. Its Spring transitive dependencies must be excluded.
We do that explicitly in other Spring 5 based projects, but have missed somehow here in Spring Kafka. That's what I suggest to do here in borders of this ticket.

Your PR to Spring Retry is a different story and I already explained my vision for that: I'm afraid it is going to be reject as non-valuable and fully breaking changes fix.

@fabienmifsud
Copy link
Contributor Author

The PR is now opened about this issue : #721

artembilan pushed a commit that referenced this issue Jul 2, 2018
Fixes #719

Exclusion of Spring 4.X transitive dependencies from Spring-Retry

**Cherry-pick to 2.1.x and 2.0.x**
# Conflicts:
#	build.gradle
artembilan pushed a commit that referenced this issue Jul 2, 2018
Fixes #719

Exclusion of Spring 4.X transitive dependencies from Spring-Retry

**Cherry-pick to 2.1.x and 2.0.x**
# Conflicts:
#	build.gradle
denis554 added a commit to denis554/spring-kafka that referenced this issue Mar 27, 2019
Fixes spring-projects/spring-kafka#719

Exclusion of Spring 4.X transitive dependencies from Spring-Retry

**Cherry-pick to 2.1.x and 2.0.x**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants