You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "devinrsmith (via GitHub)" <gi...@apache.org> on 2024/06/18 20:24:00 UTC
[I] iceberg-aws-bundle jar includes org.slf4j.LoggerFactory [iceberg]
devinrsmith opened a new issue, #10534:
URL: https://github.com/apache/iceberg/issues/10534
### Apache Iceberg version
1.5.2 (latest release)
### Query engine
None
### Please describe the bug 🐞
I noticed some strange logging issues after depending on `iceberg-aws-bundle`. After a bit of debugging, I found that `iceberg-aws-bundle` includes an unshadowed `org.slf4j.LoggerFactory` (and other `org.slf4j` classes) in the jar:
```
$ jar tf iceberg-gcp-bundle-1.5.2.jar | grep "org/slf4j/LoggerFactory"
org/slf4j/LoggerFactory.class
```
I understand the "shading" part of the story, but it does seem a bit odd to also bring in slf4j. Typically, I'd expect `iceberg-aws-bundle` to declare a dependency on `slf4j-api`.
Our application depends on, and is bootstrapped assuming slf4j 2.x (for example, we depend on the `ServiceLoader` mechanism for configuration, https://www.slf4j.org/faq.html#changesInVersion200).
Normally, if a library we depend on declares a dependency on slf4j-api 1.x this isn't an issue since the public APIs are compatible https://www.slf4j.org/faq.html#compatibility. But, when both 1.x and 2.x are on the same classpath and 1.x "wins", our logging isn't able to initialize properly.
Was including `org.slf4j` internal to the bundled jar done on purpose?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] iceberg-aws-bundle jar includes org.slf4j.LoggerFactory [iceberg]
Posted by "bryanck (via GitHub)" <gi...@apache.org>.
bryanck closed issue #10534: iceberg-aws-bundle jar includes org.slf4j.LoggerFactory
URL: https://github.com/apache/iceberg/issues/10534
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] iceberg-aws-bundle jar includes org.slf4j.LoggerFactory [iceberg]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on issue #10534:
URL: https://github.com/apache/iceberg/issues/10534#issuecomment-2222268080
> Typically, I'd expect iceberg-aws-bundle to declare a dependency on slf4j-api
The general idea of `iceberg-aws-bundle` is to be a fat jar that bundles everything related to AWS dependencies, meaning that such a jar wouldn't declare any other dependencies. Have you tried excluding slf4j when you consume `iceberg-aws-bundle` as a dependency via `exclude group: 'org.slf4j'`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] iceberg-aws-bundle jar includes org.slf4j.LoggerFactory [iceberg]
Posted by "devinrsmith (via GitHub)" <gi...@apache.org>.
devinrsmith commented on issue #10534:
URL: https://github.com/apache/iceberg/issues/10534#issuecomment-2217932463
@nastra Just submitted a PR, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] iceberg-aws-bundle jar includes org.slf4j.LoggerFactory [iceberg]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on issue #10534:
URL: https://github.com/apache/iceberg/issues/10534#issuecomment-2216936935
@devinrsmith thanks for reporting this. Would you be interested in contributing a fix for this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] iceberg-aws-bundle jar includes org.slf4j.LoggerFactory [iceberg]
Posted by "devinrsmith (via GitHub)" <gi...@apache.org>.
devinrsmith commented on issue #10534:
URL: https://github.com/apache/iceberg/issues/10534#issuecomment-2222919800
Exclusions only work for [transitively declared dependencies](https://docs.gradle.org/current/userguide/dependency_downgrade_and_exclude.html#sec:excluding-transitive-deps); in the case of the current `iceberg-aws-bundle`, `org.slf4j` is baked into the fat jar so an `exclude` won't work from the consumers point of view.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] iceberg-aws-bundle jar includes org.slf4j.LoggerFactory [iceberg]
Posted by "bryanck (via GitHub)" <gi...@apache.org>.
bryanck closed issue #10534: iceberg-aws-bundle jar includes org.slf4j.LoggerFactory
URL: https://github.com/apache/iceberg/issues/10534
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org