[refactor](fe) Add typed filesystem properties for S3#63252
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Add provider-owned typed filesystem properties and bind S3 runtime paths through S3FileSystemProperties, preparing for S3Properties removal from fe-core.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- mvn -Dmaven.build.cache.enabled=false -f fe/pom.xml -pl fe-filesystem/fe-filesystem-s3 -am -DfailIfNoTests=false test
- mvn -Dmaven.build.cache.enabled=false -f fe/pom.xml -pl fe-filesystem/fe-filesystem-oss,fe-filesystem/fe-filesystem-cos,fe-filesystem/fe-filesystem-obs -am -DfailIfNoTests=false test
- mvn -Dmaven.build.cache.enabled=false -f fe/pom.xml -pl fe-filesystem/fe-filesystem-s3,fe-filesystem/fe-filesystem-oss,fe-filesystem/fe-filesystem-cos,fe-filesystem/fe-filesystem-obs -am -DfailIfNoTests=false test
- mvn -Dmaven.build.cache.enabled=false -f fe/pom.xml -pl fe-filesystem/fe-filesystem-s3 -am -DskipTests validate
- env MAVEN_OPTS=-Xmx5g MVN_OPT=-Dmaven.build.cache.enabled=false FE_MAVEN_THREADS=1 FE_MAVEN_RETRY_THREADS=1 CUSTOM_UI_DIST=/mnt/disk1/gq/idea/incubator-doris/ui/dist ./build.sh --fe
- Behavior changed: No
- Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 29180 ms |
TPC-DS: Total hot run time: 172570 ms |
FE Regression Coverage ReportIncrement line coverage |
|
/review |
There was a problem hiding this comment.
Review result: request changes.
Critical checkpoints:
- Goal/test: The PR adds provider-owned typed S3 filesystem properties and routes S3 runtime paths through them. The added tests cover the new typed binding path, but they also encode behavior changes that conflict with existing S3 runtime compatibility.
- Focus/scope: The implementation is mostly focused on the S3 filesystem migration, but two runtime behaviors regress.
- Concurrency/lifecycle: No new shared mutable concurrency or special lifecycle risk found in the reviewed S3 property/provider changes.
- Configuration/compatibility: Blocking issues found. DEFAULT credentials no longer uses the full AWS SDK default chain, and endpoint-only custom S3 configurations now fail where the old runtime path fell back to us-east-1.
- Parallel paths: FE-core S3Properties has similar typed validation, but this PR specifically changes fe-filesystem S3ObjStorage runtime behavior, so existing map-based callers are affected.
- Tests: Unit tests were added, but they do not cover AWS profile/default-chain compatibility and they explicitly remove the endpoint-only fallback coverage.
- Observability/transactions/persistence/data writes: No transaction or persistence changes in this PR; no additional observability issue identified for the reviewed paths.
- Performance: No obvious hot-path performance regression found.
User focus: No additional user-provided focus points were present.
| return StaticCredentialsProvider.create(AwsBasicCredentials.create(accessKey, secretKey)); | ||
| } | ||
|
|
||
| private static AwsCredentialsProvider createDefault(boolean includeAnonymous) { |
There was a problem hiding this comment.
This changes the meaning of the default credentials mode. The old S3ObjStorage fallback used DefaultCredentialsProvider.create() before anonymous fallback, so AWS profile credentials, process credentials, and any other providers in the SDK's default chain worked. This hand-built chain omits those providers, so an existing deployment that relies on ~/.aws/credentials / AWS_PROFILE and does not set AK/SK will now fail to resolve credentials. Please keep the SDK default provider in the DEFAULT path (and only append anonymous when requested) instead of replacing it with a partial chain.
| "Unsupported s3.credentials_provider_type: " + credentialsProviderType) | ||
| .check(() -> StringUtils.isBlank(endpoint) && StringUtils.isBlank(region), | ||
| "Either s3.endpoint or s3.region must be set") | ||
| .check(() -> StringUtils.isBlank(region), |
There was a problem hiding this comment.
This validation rejects existing custom S3-compatible configurations that set only an endpoint. Before this migration, S3ObjStorage.buildClient() explicitly allowed a missing region, logged a warning, and used us-east-1 as the SigV4 placeholder when an endpoint override was present; the removed buildClient_missingRegionLogsWarnAndFallsBack test covered that compatibility path. Now new S3ObjStorage(Map.of("AWS_ENDPOINT", "https://minio.local")) fails during binding before the client can be built. Since the PR says there is no behavior change, please preserve the previous endpoint-only fallback for the runtime filesystem path or document and gate this as an intentional incompatible change.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Add provider-owned typed filesystem properties and bind S3 runtime paths through S3FileSystemProperties, preparing for S3Properties removal from fe-core.
Release note
None
Check List (For Author)
Test: Unit Test
mvn -Dmaven.build.cache.enabled=false -f fe/pom.xml -pl fe-filesystem/fe-filesystem-s3 -am -DfailIfNoTests=false test
mvn -Dmaven.build.cache.enabled=false -f fe/pom.xml -pl fe-filesystem/fe-filesystem-oss,fe-filesystem/fe-filesystem-cos,fe-filesystem/fe-filesystem-obs -am -DfailIfNoTests=false test
mvn -Dmaven.build.cache.enabled=false -f fe/pom.xml -pl fe-filesystem/fe-filesystem-s3,fe-filesystem/fe-filesystem-oss,fe-filesystem/fe-filesystem-cos,fe-filesystem/fe-filesystem-obs -am -DfailIfNoTests=false test
mvn -Dmaven.build.cache.enabled=false -f fe/pom.xml -pl fe-filesystem/fe-filesystem-s3 -am -DskipTests validate
env MAVEN_OPTS=-Xmx5g MVN_OPT=-Dmaven.build.cache.enabled=false FE_MAVEN_THREADS=1 FE_MAVEN_RETRY_THREADS=1 CUSTOM_UI_DIST=/mnt/disk1/gq/idea/incubator-doris/ui/dist ./build.sh --fe
Behavior changed: No
Does this need documentation: No
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)