Skip to content

Comments

feat(services/oss): allow users to specify endpoint addressing style#6504

Merged
Xuanwo merged 3 commits intoapache:mainfrom
howardlau1999:ossaddress
Sep 11, 2025
Merged

feat(services/oss): allow users to specify endpoint addressing style#6504
Xuanwo merged 3 commits intoapache:mainfrom
howardlau1999:ossaddress

Conversation

@howardlau1999
Copy link
Contributor

@howardlau1999 howardlau1999 commented Aug 12, 2025

Which issue does this PR close?

Closes #.

Rationale for this change

Allow users to access OSS using custom CNAME endpoints or self-hosted reverse proxies.

There are three styles for addressing a bucket:

  1. Virtual-host: the bucket name will be prepended to the host. This is the common case when a user accesses OSS using official oss-*.aliyuncs.com endpoints.
  2. Path: the bucket name will be the first segment of the path. This is the case when a user sets up a reverse proxy and a custom domain to access OSS but does not bind the domain to a specific bucket, or using PrivateLink.
  3. Cname: the domain name itself is bound to a specific bucket, both host and path should not be changed. This is the case when a user accesses OSS using a custom domain which is bound to a specific bucket. The path itself is the object name.

This is also supported in official ossutil tool: https://www.alibabacloud.com/help/en/oss/developer-reference/ossutil-2-0-new-features

What changes are included in this PR?

Change the endpoint parsing function accordingly.

Are there any user-facing changes?

Two config options are added.

@howardlau1999 howardlau1999 requested a review from Xuanwo as a code owner August 12, 2025 09:39
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels Aug 12, 2025
@howardlau1999 howardlau1999 changed the title WIP: feat(services/oss): allow users to specify endpoint addressing style feat(services/oss): allow users to specify endpoint addressing style Aug 12, 2025
@howardlau1999 howardlau1999 changed the title feat(services/oss): allow users to specify endpoint addressing style WIP: feat(services/oss): allow users to specify endpoint addressing style Aug 12, 2025
@howardlau1999 howardlau1999 force-pushed the ossaddress branch 2 times, most recently from 2f5f088 to 2f064df Compare August 12, 2025 10:03
@howardlau1999 howardlau1999 changed the title WIP: feat(services/oss): allow users to specify endpoint addressing style feat(services/oss): allow users to specify endpoint addressing style Aug 12, 2025
@Xuanwo
Copy link
Member

Xuanwo commented Sep 2, 2025

Thank you for the explanation. The PR looks good to me. The only thing we need is to add a private enum, parse it, return meaningful errors to users, and then use it in the OSS.

Hi, @howardlau1999 the only thing left for this PR to get merged.

@howardlau1999
Copy link
Contributor Author

howardlau1999 commented Sep 2, 2025 via email

@Xuanwo
Copy link
Member

Xuanwo commented Sep 2, 2025

I am quite occupied these days. I will address your comments this weekend.

获取Outlook for Androidhttps://aka.ms/AAb9ysg


From: Xuanwo @.***>

Sent: Tuesday, September 2, 2025 5:46:28 PM

To: apache/opendal @.***>

Cc: Howard Lau @.>; Mention @.>

Subject: Re: [apache/opendal] feat(services/oss): allow users to specify endpoint addressing style (PR #6504)

[https://avatars.githubusercontent.com/u/5351546?s=20&v=4]Xuanwo left a comment (#6504)#6504 (comment)

Thank you for the explanation. The PR looks good to me. The only thing we need is to add a private enum, parse it, return meaningful errors to users, and then use it in the OSS.

Hi, @howardlau1999https://github.com/howardlau1999 the only thing left for this PR to get merged.

Reply to this email directly, view it on GitHub#6504 (comment), or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABIB3ORV7X2BE4TC4QUPPDT3QVRPJAVCNFSM6AAAAACDV44TO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENBUGU4TIMJWHE.

You are receiving this because you were mentioned.Message ID: @.***>

Really appreciated!

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Sep 6, 2025
@howardlau1999
Copy link
Contributor Author

@Xuanwo I have addressed your comments. PTAL

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you @howardlau1999 for working on this!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 11, 2025
@Xuanwo Xuanwo merged commit 0e5fa5e into apache:main Sep 11, 2025
88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants