sollhui opened a new pull request, #71255: URL: https://github.com/apache/doris/pull/71255
### Background The FE checks S3 endpoint connectivity before listing files for an S3 table-valued function or submitting an S3 Load job. S3 clients use `s3_client_http_scheme` when the endpoint omits the scheme. The setting defaults to HTTPS. ### What problem does this PR solve? Issue Number: None Related PR: #65379 (sets the default scheme for S3 clients) PR Type: Bugfix Problem Summary: A query against a TLS-only S3 service can fail before the FE lists any files. For example, with `s3.endpoint = s3.example.com` and the default configuration, the FE tries port 80. This change sends that probe to `https://s3.example.com` on port 443. ### Details - **Frequency:** Always when the probe receives a bare endpoint and the configured scheme is HTTPS. - **Root cause:** `validateAndTestEndpoint` prepends a literal HTTP scheme. - **Why existing tests missed it:** `S3UtilTest` exercises URL construction and S3 client creation. The TVF unit tests mock the probe, and the endpoint case in `test_s3_tvf.groovy` checks query results. None of those checks asserts the URL passed to the probe. - **Fix:** Resolve the probe URL with the existing `buildEndpointUrl` helper before passing it to the security checker and opening the connection. The helper honors explicit endpoint schemes and the HTTP compatibility setting. - **Other paths and branches:** Both the S3 TVF and S3 Load call this method. This PR targets master. Release branches were not tested. - **Behavior change:** The FE now uses its configured default scheme when probing a bare endpoint. ### Testing Ran all 56 tests in `S3UtilTest` locally with JUnit Platform after compiling the changed sources against a cached FE test classpath. On the baseline the new test observed HTTP instead of the expected HTTPS (55 passed, 1 failed). With the fix all 56 passed. The test intercepts the probe before network I/O. FE core Checkstyle passed with zero violations. The repository FE test script stopped during JDK 17 setup, so the full reactor was not exercised. ### Release note S3 TVF and S3 Load connectivity checks now use HTTPS by default for endpoints without a scheme. To probe a plain HTTP service, specify `http://` or set the FE's `s3_client_http_scheme` to `http`. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Partially verified: focused unit tests passed locally; full FE reactor and SQL integration not run. ### AI Disclosure - Tool: OpenAI Codex (GPT-6) - Generated: Code, unit test, and PR description. - Human review: Pending. -- 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]
