[test](regression) drop unsupported use_path_style=true in test_s3_tvf#64562
Conversation
The TVF attributes set both
uri = "s3://${bucket}.${endpoint}/..." (virtual-host form)
and
use_path_style = "true" (path-style request)
which contradict each other. Aliyun OSS S3-compatible API rejects
path-style addressing with HTTP 403 SecondLevelDomainForbidden /
"Please use virtual hosted style to access". The combination only
worked accidentally on the historical aliyun (HK) endpoint and broke
once the regression switched to aliyun-internal (BJ) where OSS
enforces the rule strictly.
Drop the six active addProperty("use_path_style", "true") lines so
the SDK uses virtual-host addressing that matches the URI form.
Reproduced end-to-end with curl against the public OSS endpoint and
with a Doris S3 TVF: same SQL passes when the property is absent
and fails with SecondLevelDomainForbidden when it is set.
Also surface the underlying error in the catch block so future
failures show the real exception instead of a bare assertTrue line
number. Move logger.info("error: ", ex) before assertTrue, since
assertTrue(false) throws AssertionFailedError and skipped the log
line entirely.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
run buildall |
|
/review |
There was a problem hiding this comment.
Automated review completed. I am requesting changes for one regression-test correctness issue: the touched catch block improves the message for unexpected exceptions, but still does not fail when an expected-error TVF insert unexpectedly succeeds.
Critical checkpoint conclusions: the PR scope is narrow and test-only; no product concurrency, lifecycle, transaction, persistence, or FE/BE protocol compatibility change is involved. The S3/OSS addressing change follows the existing OSS property path: Aliyun endpoints select OSSProperties and the bucket.endpoint URI form is normalized before listing/scanning. The remaining issue is test coverage semantics for negative cases, covered inline. No additional user focus was provided.
Subagent conclusions: optimizer-rewrite reported no candidates. tests-session-config proposed TSC-001, accepted as MAIN-001 and submitted inline. The suspected bucket-authority issue and assertion-overload issue were dismissed with code evidence in the ledger. Convergence round 1 ended with both live subagents replying NO_NEW_VALUABLE_FINDINGS for the same ledger/comment set.
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
regression-test/suites/load_p2/tvf/test_s3_tvf.groovyconfigured several S3 TVF attributes with both a virtual-host style URI anduse_path_style=true:These two settings conflict. Aliyun OSS rejects path-style access for this bucket with
HTTP 403 SecondLevelDomainForbiddenand the messagePlease use virtual hosted style to access. The regression case could pass on the previous endpoint, but failed after the P2 environment switched to the Aliyun internal Beijing endpoint where OSS enforces virtual-host style access.This PR fixes the regression case by removing the six active
addProperty("use_path_style", "true")settings whose URI is already in virtual-host form, so the SDK sends requests in the addressing style required by OSS. The remaining S3 TVF attributes in this file do not setuse_path_styleand keep their previous behavior.This PR also improves the failure path in the test. Previously,
assertTrue(attribute.expectFiled)threw immediately and the laterlogger.info("error: ", ex)line was skipped, so the failure only showed a bare assertion line. The exception is now logged before the assertion, and the assertion message includes the loop index, table name, property map, and original error message.Manual verification used the same OSS bucket, key prefix, and endpoint while only changing the addressing style:
The same behavior was reproduced through Doris S3 TVF: the query fails with
use_path_style=trueand succeeds after the property is removed.Release note
None
Check List (For Author)
Test
HTTP 403 SecondLevelDomainForbiddenand accepts the virtual-host URL withHTTP 200 OK.use_path_style=trueand succeeds after removing the property.Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)