didip commented on a change in pull request #12339:
URL: https://github.com/apache/druid/pull/12339#discussion_r841251176



##########
File path: 
extensions-core/s3-extensions/src/main/java/org/apache/druid/data/input/s3/S3InputSource.java
##########
@@ -166,15 +175,21 @@ private void applyAssumeRole(
       AWSCredentialsProvider awsCredentialsProvider
   )
   {
-    String assumeRoleArn = s3InputSourceConfig.getAssumeRoleArn();
-    if (assumeRoleArn != null) {
+    // Do not run if WebIdentityToken file and assumeRole ARN are detected 
from the environment variable,
+    // we want the default s3ClientBuilder behavior for ServiceAccount + 
eks.amazonaws.com/role-arn annotation to work.
+    if (s3InputSourceConfig.isWebIdentityTokenEnvConfigured() && 
s3InputSourceConfig.isAssumeRoleArnEnvConfigured()) {

Review comment:
       @cryptoe To be honest, the previous nested if statements makes it really 
difficult to understand what-goes-where. If in the future someone needs to add 
another custom function, it will be hard to do so (with the nested if 
statements).




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to