Skip to content
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

GH-550: master to 2.2; fix tangles #641

Closed
wants to merge 4 commits into from

Conversation

garyrussell
Copy link
Contributor

@garyrussell garyrussell commented Apr 3, 2018

Fixes #550

  • package tangle ....listener and ....listener.config - remove config package
  • class tangles between ContainerProperties and the listener containers
    • AckMode moved to properties
    • Error handler setters moved from properties to containers
  • class tangle between listener adapter and handler adapter due to ResultHolder

@garyrussell
Copy link
Contributor Author

Do not squash commits.

@garyrussell garyrussell changed the title GH-550: master to 2.2; fix tangles [DO NOT MERGE UNTIL 2.1.5] GH-550: master to 2.2; fix tangles Apr 4, 2018
@garyrussell
Copy link
Contributor Author

I have created the 2.1.x branch.

Fixes spring-projects#550

- package tangle `....listener` and `....listener.config` - remove config package
- class tangles between `ContainerProperties` and the listener containers
  - AckMode moved to properties
  - Error handler setters moved from properties to containers
Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

Also, please, add @DisabledOnOs(WINDOWS) for the StreamsBuilderFactoryBeanTests.

I'm not sure what's wrong with resources, but there is a collision during removal directory.

// clientVersion = AppInfoParser.getVersion();
// if (clientVersion.startsWith("1.1.")) {
// try {
// testUtilsCreateBrokerConfigMethod = TestUtils.class.getDeclaredMethod("createBrokerConfig",
Copy link
Member

Choose a reason for hiding this comment

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

I think we don't consider to support older version on this branch. Do we ?
I mean no need to comment out, but just remove such a code.
Although I still see how we have if...else in the createBrokerProperties().
Shound't that be fixed respectively ?

Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to just comment it out to make it easier to reinstate if we have a similar problem with 1.2.0. I can remove it entirely if you insist.

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough. Let it live as is!

build.gradle Outdated
@@ -78,7 +78,8 @@ subprojects { subproject ->
junitJupiterVersion = '5.1.0'
junitPlatformVersion = '1.1.0'
junitVintageVersion = '5.1.0'
kafkaVersion = '1.0.1'
kafkaVersion = '1.1.0'
log4jVersion = '2.10.0'
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to support log4J2 dependency if it comes transitively from Kafka now?

Also this is not visible in the change set, but we don't need to have exclude group: 'org.slf4j', module: 'slf4j-log4j12' anymore. At least that is how I understand it from your code change.

BTW, do you cover here a fix for the #278 ?

Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't come from kafka - they use slf4j now. https://kafka.apache.org/documentation/#upgrade_110_notable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes; I switched to log4j2.

Copy link
Member

Choose a reason for hiding this comment

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

Ah! Cool!

Then we don't need to support slf dependency. We should use log4j-slf4j-impl instead: https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html

Also pay attention how there is already Log4j-2.11.0

However I still think we don't need those slf excludes anymore.

build.gradle Outdated
@@ -78,7 +78,8 @@ subprojects { subproject ->
junitJupiterVersion = '5.1.0'
junitPlatformVersion = '1.1.0'
junitVintageVersion = '5.1.0'
kafkaVersion = '1.0.1'
kafkaVersion = '1.1.0'
log4jVersion = '2.10.0'
Copy link
Member

Choose a reason for hiding this comment

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

Ah! Cool!

Then we don't need to support slf dependency. We should use log4j-slf4j-impl instead: https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html

Also pay attention how there is already Log4j-2.11.0

However I still think we don't need those slf excludes anymore.

// clientVersion = AppInfoParser.getVersion();
// if (clientVersion.startsWith("1.1.")) {
// try {
// testUtilsCreateBrokerConfigMethod = TestUtils.class.getDeclaredMethod("createBrokerConfig",
Copy link
Member

Choose a reason for hiding this comment

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

Fair enough. Let it live as is!

- remove unnecessary excludes
- add slf4j over log4j2
- add logging to -test module tests
- suppress some noise from embedded kafka
build.gradle Outdated
@@ -184,7 +188,6 @@ project ('spring-kafka') {
compile ("org.apache.kafka:kafka-streams:$kafkaVersion") {
optional it
exclude group: 'org.slf4j', module: 'slf4j-api'
Copy link
Member

Choose a reason for hiding this comment

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

May I know why should we still exclude this and manage our own Slf4J version?
Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that we need to add the log4j-slf4j-impl to the classpath (to bridge from slf4j to log4j2), I think we need the api to be the same version.

Copy link
Member

Choose a reason for hiding this comment

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

The same version of what?
The log4j-slf4j-impl is a Log4J asset, not Slf4J.
What am I missing?
Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doh... pushing

@artembilan
Copy link
Member

Do we still don't squash commits for this PR?
Should I include a Resolve #278 to the commit message as well?

I'll also fix StreamsBuilderFactoryBeanTests for Windows compatibility.

@garyrussell
Copy link
Contributor Author

garyrussell commented Apr 10, 2018

Sorry - forgot about the Windows problem. You should squash the last 3 commits; retaining 2 commits.

Yes, please add the #278 comment (to the squashed second commit).

Thanks.

@artembilan
Copy link
Member

I also noticed that we have several not closed KafkaConsumers in some tests.
Fixing...
Thanks for confirmation!

@artembilan
Copy link
Member

Merged as b048aaa and 9f724ea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants