-
Notifications
You must be signed in to change notification settings - Fork 50
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
BOM is not defining the OkHttp version #1508
Comments
Good find. It looks like we have the same issue, needing to pull in okhttp bom to address it. The Aws SDK bom should not only align versions between its modules but provide minimum versions for transitive deps. |
Can you provide some examples of other libraries which include transitive dependencies in their published BOMs? I've looked at published BOMs for Ktor, http4k, Exposed, OkHttp, Jackson, and Spring Framework—all of which seem to include only their own modules and not 3P dependencies. |
Spring Boot definitely includes many 3rd-party dependencies, but one could argue that it is a special one. I'll have a look and see if I can find other examples, or think about a different approach. Even if we don't go down this path, it's pretty bad to have the Kotlin AWS SDK not working out-of-the-box on a brand new Spring Boot project. |
It is the stated purpose of a BOM to define the minimum requirements - for
your own modules released at the same time that results in version
alignment; for other deps that results in minimum versions required for
this module to work.
Something like an okhttp dep is a stereotypical case of a bom entry to
specify the minimum version required by this module.
I say “minimum” above as conflict resolution could perhaps bump to a higher
version.
…On Wed, Feb 5, 2025 at 3:04 PM Bruno Medeiros ***@***.***> wrote:
Spring Boot definitely includes many 3rd-party dependencies, but one could
argue that it is a special one. I'll have a look and see if I can find
other examples, or think about a different approach.
Even if we don't go down this path, it's pretty bad to have the Kotlin AWS
SDK not working out-of-the-box on a brand new Spring Boot project.
—
Reply to this email directly, view it on GitHub
<#1508 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AR5RI7ZGMZ3WDUSRR6RX6XT2OKKGDAVCNFSM6AAAAABVSBIX5GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZYGIZDSMZXGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@cloudshiftchris you wrote:
That's Jackson's internal BOM used for building its various components. It's not the published BOM for use by consumers. There's a note in the description about this:
Jackson's published BOM only lists Jackson components and not 3P dependencies. Can you provide any other examples of published BOMs intended for use by consumers which include transitive dependencies? |
@bcmedeiros, I agree with you on both of these points:
Yes, Spring Boot is a special case because it defines a platform from which to build your application. It's not a "regular" library-style dependency and so its POM isn't prototypical of library-style published BOMs (e.g., the SDK's BOM). Also yes, it's not great that the SDK doesn't work out of the box with Spring Boot. I'd really like to close that gap without misusing the BOM mechanism. If you have ideas for another approach, please let us know! |
It looks like this issue has not been active for more than 5 days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it. |
I have had no good idea on how to tackle this. @ianbotsf should we at least reopen this as a documentation issue, so the docs could mention something around "make sure you don't have any other dependencies in your project interfering with this SDK's dependencies such as OkHttp etc? |
Our Troubleshooting FAQs already discuss how to resolve dependency conflicts and specifically mention OkHttp. If there are additional docs we can add which will clarify how to consume the SDK and its transitive dependencies then of course we'd love to do so. That said, "make sure you don't have any other dependencies in your project interfering with this SDK's dependencies such as OkHttp" sounds like general advice for any dependency—not just the AWS SDK and OkHttp. Is there anything unique about the SDK and/or OkHttp which would warrant a special mention? |
Yes, I think there is. AWS Kotlin SDK has a bit of a sophisticated dependency tree with the SDK depending on Smithy which depends on whatever HTTP library that is using, and I think most dependencies you add to a project are more "self-contained", and you expect them to "just work", especially if you have added its BOM. Again, the SDK just fails in a brand new Spring Boot project today. And it's not just Spring, anyone using maven is likely to have some issues because maven prioritise dependencies closer to the root pom being resolved when there are version conflicts, and OkHttp is 2 levels deep IIRC. Anyone using libraries declaring a OkHttp earlier in the list of dependencies, or as a direct dependency instead of an indirect one, is subject to having issues. In summary, @ianbotsf, IMV the http library being used is such a critical dependency to be left "unmanaged" like this. I agree that adding it to the BOM is not ideal, but overall I think we should to send a stronger message to the user that they need to pay attention to their HTTP library setup as it's not strongly managed by the SDK. |
Had the same problem with SpringBoot, which obviously includes some earlier version of OkHttp, forcing a downgrade of the required version `+--- com.squareup.okhttp3:okhttp:5.0.0-alpha.14 -> 4.10.0 Had to out comment stuff in my gradle file until realising it was that was the rootcause.
Hopefully this does not have any side effects. I am not the only one using SpringBoot so I would have been nice if this issue was mentioned in the trouble shooting guide mentioned by @ianbotsf |
This might be enough to address this issue, since it's hard to pinpoint one particular component that is responsible for this issue. |
Agreed, we should improve the troubleshooting guide to reduce confusion and speed up dependency conflict resolution. We'll evaluate some updates and get them published. |
Describe the bug
I'm currently using a few AWS Kotlin SDK modules with the current setup:
The issue is, even though I'm importing the

aws.sdk.kotlin:bom
BOM, I end up with OkHttp 4.12 in my classpath as defined by another BOM I'm inheriting from (Spring Boot), rather than the required 5.0.0-alpha-4, which is the required one.This causes all sorts of issues in my app, the simplest one to reproduce being the one below:
If I include the OkHttp BOM as follows directly in my file, then the problem is fixed:
Regression Issue
Expected behavior
Declaring the
aws.sdk.kotlin:bom
with the correct precedence over other BOMs being imported should be enough to have all the dependencies AWS Kotlin SDK needs to run.Current behavior
SDK fails when making any HTTP calls because the OkHttp version needed is not declared in the BOM.
Steps to Reproduce
3.3.7
Possible Solution
I think the
aws.sdk.kotlin:bom
artifact should declare adependencyManagement
entry with the following import, so people are more likely to get the correct version or at least see a conflict showing up when analyzing the issue.Context
No response
AWS SDK for Kotlin version
1.3.112
Platform (JVM/JS/Native)
JVM
Operating system and version
MacOS 15.2
The text was updated successfully, but these errors were encountered: