pvillard31 commented on PR #10887:
URL: https://github.com/apache/nifi/pull/10887#issuecomment-3891068087

   @turcsanyip - yeah so in the initial PR for adding `DefaultsMode.STANDARD` 
(#10870), I was not careful and it did break the client when using encryption 
(failing integration tests) so I fixed it as part of #10873 where integration 
tests are running as part of the checks.
   
   It is the same in this PR basically. We cannot easily apply the same fix 
when we use encryption (we would get the same unsupported operation exception)
   
   `S3EncryptionClient.Builder.build()`, when no `wrappedClient` is provided 
(which is NiFi's case), it creates its own internal `S3Client`. So the 
encryption builder's internally-created `S3Client` has the same issue AND 
doesn't even set `DefaultsMode.STANDARD`. However, the encryption builder also 
has `wrappedClient(S3Client)`. If we provide a pre-built `S3Client`, it skips 
the internal creation entirely. We could leverage this by having 
`S3ClientBuilderWrapper` maintain a parallel `S3ClientBuilder` for the 
encryption case that mirrors all configuration calls and has our endpoint 
provider. But that means duplicating every delegation method to also configure 
the parallel builder. It feels fragile and complex. I'd rather submit an issue 
on the repo on the AWS side to expose options for us. But if you see a better 
approach, I'm definitely happy to discuss an alternative.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to