Skip to content

branch-4.0: [fix](fe) Select S3 storage for cloud plugin downloads - #66694

Open
CalvinKirs wants to merge 1 commit into
apache:branch-4.0from
CalvinKirs:fix-cloud-plugin-download-branch-4.0
Open

branch-4.0: [fix](fe) Select S3 storage for cloud plugin downloads#66694
CalvinKirs wants to merge 1 commit into
apache:branch-4.0from
CalvinKirs:fix-cloud-plugin-download-branch-4.0

Conversation

@CalvinKirs

@CalvinKirs CalvinKirs commented Aug 12, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: None

Problem Summary: In Cloud SaaS mode, a JDBC catalog or Java UDF using a bare jar name downloads the file from the instance object store. StorageProperties.createAll() now prepends a default HDFS entry, while CloudPluginDownloader selected the first entry and cast it to AbstractS3CompatibleProperties. The cast therefore failed with ClassCastException before the download. This change selects the first explicitly S3-compatible property by type and fails clearly if none exists. Tests cover default-HDFS ordering, all current S3-compatible property implementations, and the missing-compatible-storage path.

Release note

Fix automatic JDBC driver and Java UDF jar downloads from Cloud SaaS object storage when the plugin is referenced by a bare file name.

Check List (For Author)

  • Test: Unit Test (environment blocked)
    • MAVEN_OPTS="-Xmx4g -XX:MaxMetaspaceSize=1g" FE_UT_PARALLEL=1 ./run-fe-ut.sh --run org.apache.doris.common.plugin.CloudPluginDownloaderTest completed Checkstyle, FE main compilation, and test compilation. All 9 tests were blocked in the existing Mockito setup because Byte Buddy cannot self-attach in the execution sandbox; there were no assertion failures.
  • Behavior changed: Yes (Cloud SaaS plugin downloads select S3-compatible storage instead of the prepended default HDFS entry)
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: In Cloud SaaS mode, a JDBC catalog with a bare driver jar name downloads the driver from the instance object store. StorageProperties.createAll now prepends a default HDFS entry, so CloudPluginDownloader selected that first entry and cast it to AbstractS3CompatibleProperties, causing a ClassCastException before the download. Select the first explicitly S3-compatible property by type and pass the typed result to S3ObjStorage. Add coverage for the default-HDFS ordering, every current S3-compatible implementation, and the missing-compatible-storage failure.

### Release note

Fix automatic JDBC driver and Java UDF jar downloads from Cloud SaaS object storage when the plugin is referenced by a bare file name.

### Check List (For Author)

- Test: Unit Test (environment blocked)
    - `MAVEN_OPTS="-Xmx4g -XX:MaxMetaspaceSize=1g" FE_UT_PARALLEL=1 ./run-fe-ut.sh --run org.apache.doris.common.plugin.CloudPluginDownloaderTest` completed Checkstyle, FE main compilation, and test compilation; all 9 tests were blocked in the existing Mockito setup because Byte Buddy cannot self-attach in the execution sandbox
- Behavior changed: Yes (Cloud SaaS plugin downloads select S3-compatible storage instead of the prepended default HDFS entry)
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@CalvinKirs CalvinKirs changed the title [fix](fe) Select S3 storage for cloud plugin downloads branch-4.0: [fix](fe) Select S3 storage for cloud plugin downloads Aug 12, 2026
@CalvinKirs

Copy link
Copy Markdown
Member Author

run buildall

@CalvinKirs
CalvinKirs marked this pull request as ready for review August 12, 2026 10:18
@CalvinKirs
CalvinKirs requested a review from morningman as a code owner August 12, 2026 10:18
@CalvinKirs

Copy link
Copy Markdown
Member Author

run feut

@CalvinKirs

Copy link
Copy Markdown
Member Author

run p0

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/7) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants