Skip to content

[feature](cloud) Add Alibaba Cloud OSS C++ SDK stack - Part 2#65794

Open
nsivarajan wants to merge 2 commits into
apache:masterfrom
nsivarajan:native-oss-sdk-pr2
Open

[feature](cloud) Add Alibaba Cloud OSS C++ SDK stack - Part 2#65794
nsivarajan wants to merge 2 commits into
apache:masterfrom
nsivarajan:native-oss-sdk-pr2

Conversation

@nsivarajan

@nsivarajan nsivarajan commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #65793

Related PR: Related PR: part 2 of 4 — PR-1 #61329 | PR-3 #xxx | PR-4 #xxx

Problem Summary:

Doris BE currently accesses OSS through the AWS S3-compatible SDK path. This works for basic AK/SK operations but cannot use ECS instance profile credentials, STS AssumeRole, RRSA, or environment variable providers — all of which require the native Alibaba Cloud OSS C++ SDK.

PR-3 (BE native OSS filesystem) requires the Alibaba Cloud OSS C++ SDK and its dependency chain. This PR adds all 7 libraries to the Doris thirdparty build system, following the same pattern as the existing Azure SDK integration.

The entire OSS SDK stack is opt-out (DISABLE_BUILD_OSS=ON) and defaults to enabled, mirroring the DISABLE_BUILD_AZURE pattern already in the codebase.

Libraries added (build order):

Library Purpose
apr Apache Portable Runtime — HTTP transport base for OSS SDK
apr-util APR utilities — XML, crypto helpers
tea-cpp (darabonba_core) Alibaba API gateway core — request signing
credentials-cpp Alibaba Cloud credential provider chain
openapi-v2 Alibaba OpenAPI v2 client
sts-20150401 Alibaba STS SDK v2 — AssumeRole calls
alibabacloud-oss-cpp-sdk OSS object storage operations

A patch (tea-cpp-doris-oss-fix.patch) is included to add CA cert support (CURLOPT_CAINFO) and CURL async error propagation to the tea-cpp library.


Changes

  • thirdparty/vars.sh — download URLs, checksums, source names for all 7 libs
  • thirdparty/download-thirdparty.sh — tea-cpp patch application
  • thirdparty/build-thirdparty.shbuild_apr(), build_apr_util(),
    build_tea_cpp(), build_credentials_cpp(), build_openapi_v2(),
    build_sts_20150401(), build_oss_cpp(); build order respects dependency chain
  • thirdparty/patches/tea-cpp-doris-oss-fix.patch (new) — CA cert + CURL fix
  • be/cmake/thirdparty.cmake — OSS libs added under if(NOT BUILD_OSS STREQUAL "OFF")
  • cloud/cmake/thirdparty.cmake — same, for cloud recycler
  • be/CMakeLists.txtoption(BUILD_OSS ... OFF) + -DUSE_OSS definition
  • cloud/CMakeLists.txt — same
  • build.shBUILD_OSS='ON' default, DISABLE_BUILD_OSS handler

Build

Default — builds OSS SDK stack
./build.sh --be --cloud

Opt-out — skip OSS SDK entirely
DISABLE_BUILD_OSS=ON ./build.sh --be --cloud

Thirdparty only
cd thirdparty && ./build-thirdparty.sh


Release note

[build] Add Alibaba Cloud OSS C++ SDK and dependency stack (apr, apr-util,tea-cpp, credentials-cpp, openapi-v2, sts-20150401) as optional thirdparty libraries. Disabled via DISABLE_BUILD_OSS=ON. No effect on existing builds when disabled.

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

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

@nsivarajan

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@nsivarajan
nsivarajan force-pushed the native-oss-sdk-pr2 branch from 7205542 to d945d2a Compare July 19, 2026 18:16
@nsivarajan

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 57.45% (23950/41688)
Line Coverage 41.20% (235693/572019)
Region Coverage 37.00% (186077/502947)
Branch Coverage 38.21% (83595/218784)

@nsivarajan
nsivarajan force-pushed the native-oss-sdk-pr2 branch from d945d2a to c3ad4f0 Compare July 20, 2026 04:48
@nsivarajan

Copy link
Copy Markdown
Contributor Author

run buildall

@nsivarajan

Copy link
Copy Markdown
Contributor Author

run cloud_p0

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.07% (30553/40697)
Line Coverage 59.19% (336766/569002)
Region Coverage 55.86% (282328/505379)
Branch Coverage 57.19% (125377/219245)

@nsivarajan
nsivarajan marked this pull request as ready for review July 20, 2026 14:38
@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.07% (30553/40697)
Line Coverage 59.19% (336766/569002)
Region Coverage 55.86% (282328/505379)
Branch Coverage 57.19% (125377/219245)

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.

[Feature] Add Alibaba Cloud OSS C++ SDK stack

2 participants