-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Amazon S3 build failure on v1.12.0.CR1 using url-connection-client #15014
Comments
The Could you also paste your config (credentials excluded)? Thanks! |
They are marked as
Anyway, I don't have set up the |
Any chance you could prepare me a small Maven reproducer? I don't need it to really connect to S3, I would just like to experiment properly with your setup and see how things are initialized. Thanks! |
Ok, here you have it: https://github.com/jorsol/quarkus-bug-15014 You can try to remove the exclusions too. |
Thanks, I will have a look later today. |
I had a look. I think it was working before because the Apache classes were leaking in the deployment phase and it's not the case anymore. So it looks like a side effect of an unrelated bugfix. Fixing it will require some reorganization of the code. I'll try to come up with a fix before the Final. |
Thanks, BTW have you noticed the leak of So one possible "fix" is to exclude them: #15046 |
Yeah, I have already committed a change to exclude them in my tree. They should have been optional all along. Now I need to figure out how to get the recorder working properly. |
Great, so closing my PR then. |
@jorsol could you have a look at #15087 and give it a try? https://github.com/quarkusio/quarkus/blob/master/CONTRIBUTING.md#checking-an-issue-is-fixed-in-master might be useful, just check my branch instead of master. I'm building the artifacts of 1.12.0.Final on Wednesday so, if we could iterate tomorrow, that would be perfect. |
@jorsol any feedback? Clock is ticking :) |
@gsmet sorry, I haven't had time to test it yet, will start testing it right now, give me a couple of hours, although I'm confident it will work :) |
@gsmet It works for my use case, the reproducer works as expected. Thanks! Just a small note, <dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>url-connection-client</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>apache-client</artifactId>
</dependency> Right now this fails at runtime with: So it would be nice to detect this at build time too, possibly by checking the implementation of |
So sure... feel free to open an enhancement request. Probably a good issue for a new contributor. |
Fixes quarkusio#15014 (cherry picked from commit 04bab61)
Describe the bug
I'm using the
url-connection-client
with S3, declaring the dependencies as:When I try to update the version from Quarkus 1.11.2.Final to 1.12.0.CR1 the build fails with the following stack trace:
If I don't exclude the
apache-client
dependency, and I have tests that create anS3Client
mock , the tests fails with:Multiple HTTP implementations were found on the classpath. To avoid non-deterministic loading implementations, please explicitly provide an HTTP client via the client builders, set the software.amazon.awssdk.http.service.impl system property with the FQCN of the HTTP service to use as the default, or remove all but one HTTP implementation from the classpath
Now if I set the system property on surefire configuration like:
<software.amazon.awssdk.http.service.impl>software.amazon.awssdk.http.urlconnection.UrlConnectionSdkHttpService</software.amazon.awssdk.http.service.impl>
the test works and builds successfully, but I end up with theapache-client
also in the lib, and is incorrect for the Multiple HTTP implementation found on classpath, so the problem is from the build part of Quarkus.Expected behavior
Run normally as before (this release doesn't seem to have any breaking change in the S3 extension).
Actual behavior
For some reason, it looks like the method
configureSyncApacheHttpClient
is called, when it should call theconfigureSyncUrlConnectionHttpClient
instead.quarkus/extensions/amazon-services/common/runtime/src/main/java/io/quarkus/amazon/common/runtime/AmazonClientTransportRecorder.java
Line 94 in 16326d6
To Reproduce
I don't have a small reproducer but happy to provide more feedback as needed.
Environment (please complete the following information):
uname -a
orver
: Linux 5.8.0-43-generic x86_64java -version
: openjdk version "15.0.2" 2021-01-19mvnw --version
orgradlew --version
): 3.6.3The text was updated successfully, but these errors were encountered: