-
Notifications
You must be signed in to change notification settings - Fork 3.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
[improve][misc] Upgrade slf4j to 2.0.13 #22391
Conversation
7aef84a
to
de9c7ad
Compare
@nodece license check fails |
88da8ca
to
a942ff1
Compare
I downloaded the test image and then tried to test the CLI test, when proxy is start,
@lhotari Do you have any suggestions? |
@nodece To debug, locally with java-test-image in addition what you provided, you'd have to do pulsar/.github/workflows/pulsar-ci.yaml Line 539 in d61f758
pulsar-test-latest-version image (ref: Lines 54 to 55 in 8957e35
|
Sorry, in my test, |
@nodece What doesn't work? |
In the GHA, the CLI test always print the “Failed to load class "org.slf4j.impl.StaticLoggerBinder"”, but in my local, never print. This info means we are using the slf4j 1.x, not slf4j 2.x. GHA:
Local:
My script
|
|
1214d8c
to
9448298
Compare
/pulsarbot rerun-failure-checks |
9448298
to
7eab976
Compare
/pulsarbot rerun-failure-checks |
1 similar comment
/pulsarbot rerun-failure-checks |
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
7eab976
to
bfebe26
Compare
It's a breaking change that affects the downstream. In our KSN project (the private version of KoP), after upgrading to include this commit, logs cannot be printed anymore. |
I tried adding the
|
Could you provide the log4j/log4j2 and slf4j versions?
In your project, some libraries are using the slf4j 1.x, so you saw this log. |
@nodece |
We should document explicitly that users should exclude In addition, for existing users, we should note this breaking change in 3.3.0's release note. |
I mean we should discuss what strong reason pushed us to introduce this breaking change. :) |
See my thread here: https://lists.apache.org/thread/4omvl62k4jhntj3rsywp14zzgh1l3l9q For example, assuming users import the dependencies like: <dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-client-all</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
</dependency> After upgrading the |
I don't think that excluding is needed. Both maven and gradle use a dependency resolution strategy where the closest dependency wins when there are conflicts. The user would need to add slf4j-api dependency or use dependency management. Excluding isn't a recommended solution. One could argue that the user already has a problem in the dependency management if they are relying on transitive dependencies for their slf4j-api dependency. |
3.3.0 is for breaking changes like this. I explained in #22391 (comment) why the user already has a problem in dependency management if this breaks their application. The world is moving forward and also other projects are moving towards slf4j-api 2.0.x . That will happen sooner or later for all projects. It's better to make this change in 3.3.0 than in the 4.0.0 LTS version so that we have time to adjust things if needed for 4.0.0 . Introducing major changes in 4.0.0 isn't the best possible solution. |
<!-- For the BDB JE dependency --> | ||
<repository> | ||
<id>oracle.releases</id> | ||
<url>https://download.oracle.com/maven</url> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
</repository> |
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.
It seems that this repository was accidentially added in this PR. It's being removed in #23132.
Motivation
Keep up-to-date, and this version supports fluent logging api.
Modifications
Documentation
doc
doc-required
doc-not-needed
doc-complete