-
Notifications
You must be signed in to change notification settings - Fork 171
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
[SNOW-859796] Get rid of SFL4J logging messages #1474
Conversation
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.
slf4j-api as a regular dependency LGTM
216f12a
to
3ecbc1d
Compare
Yes we need to change FIPS XML. Make sure we can test in all known cases:
|
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
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!
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.
Oh right, while Srikanth and I were going over this I realized we want to exclude slf4j-api from shading completely and not shade it with an exclusion for it's unrelocated shading in check_content.sh.
Srikanth is going to test this approach and report back any issues.
Marking this as request changes so we don't accidentally merge it as-is.
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.
PR LGTM
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. Thanks for making this change.
SonarQube Quality Gate |
d69093f
to
327b1e9
Compare
Overview
SNOW-859796
Even though this change looks simple - this introduces a behavior change on how developers are going to use snowflake-jdbc package and sl4j logging library.
Users using build tools such as Maven/Gradle etc.
This change makes the
Sl4J-api
as a compile-time dependency and removes the SL4J-API from the snowflake-jdbc jar. However, when the user uses any build tools such as maven, gradle etc., sl4j-api will be shown as depedency for snowflake jar as below:Building the Java application will download the slf4j-api jar as it is the dependency for the snowflake-jdbc and places it in the classpath.
This resolves issues: https://github.com/snowflakedb/snowflake-sdks-drivers-issues-teamwork/issues/497
With this fix users will start to see the following warning message if sl4j implementation is not found in the classpath:
Users using the downloaded jar:
If user apps directly reference
snowflake-jdbc.jar
, then slf4j-api won't be downloaded or available in the classpath. Applications will start to fail with class not found exceptions:The only way to resolve this would be to place the
sl4j-api.jar
in the classpath.Resolving SLF4J: No SLF4J providers were found
To resolve this, Users need to provide any slf4j implementation in the classpath.
SFSQL Tests:
Without slf4j jars in the classpath:
With slf4j jars:
External contributors - please answer these questions before submitting a pull request. Thanks!
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes #NNNN
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.
Pre-review checklist