github-actions[bot] commented on code in PR #62303:
URL: https://github.com/apache/doris/pull/62303#discussion_r3085071602


##########
be/test/io/client/s3_file_system_test.cpp:
##########
@@ -58,18 +67,25 @@ class S3TestConfig {
 
         access_key = GET_ENV_IF_DEFINED(S3_AK);
         secret_key = GET_ENV_IF_DEFINED(S3_SK);
-        endpoint = GET_ENV_IF_DEFINED(S3_ENDPOINT);
+        role_arn = GET_ENV_IF_DEFINED(AWS_ROLE_ARN);
+        external_id = GET_ENV_IF_DEFINED(AWS_EXTERNAL_ID);
+        endpoint = get_env_with_fallback("S3_ENDPOINT", "AWS_ENDPOINT");

Review Comment:
   Requiring prefix here regresses existing valid test setups. Both the S3 
client code and the dedicated role-based tests already allow an empty prefix 
(bucket root), but this new check skips the whole suite when 
AWS_PREFIX/S3_PREFIX is intentionally omitted. That means a previously valid 
IAM-role environment will stop exercising these tests entirely.



##########
cloud/test/s3_accessor_client_test.cpp:
##########
@@ -72,18 +81,25 @@ class S3TestConfig {
 
         access_key = GET_ENV_IF_DEFINED(S3_AK);
         secret_key = GET_ENV_IF_DEFINED(S3_SK);
-        endpoint = GET_ENV_IF_DEFINED(S3_ENDPOINT);
+        role_arn = GET_ENV_IF_DEFINED(AWS_ROLE_ARN);
+        external_id = GET_ENV_IF_DEFINED(AWS_EXTERNAL_ID);
+        endpoint = get_env_with_fallback("S3_ENDPOINT", "AWS_ENDPOINT");
         provider = GET_ENV_IF_DEFINED(S3_PROVIDER);
-        bucket = GET_ENV_IF_DEFINED(S3_BUCKET);
-        region = GET_ENV_IF_DEFINED(S3_REGION);
-        prefix = GET_ENV_IF_DEFINED(S3_PREFIX);
+        bucket = get_env_with_fallback("S3_BUCKET", "AWS_BUCKET");
+        region = get_env_with_fallback("S3_REGION", "AWS_REGION");

Review Comment:
   This accepts any "no AK/SK" configuration as "IAM role". If S3_AK/S3_SK are 
unset and AWS_ROLE_ARN is also unset, is_valid() still passes and 
create_client() forces CredProviderType::InstanceProfile with an empty 
role_arn. In that scenario the suite is no longer proving the assume-role path 
added by this PR; it is just relying on whatever ambient/default credentials 
resolution happens to do. The validation should require actual role inputs when 
taking the IAM-role branch, or explicitly support and document the no-role 
default-credential case.



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