Skip to content

Comments

feat: Add Operator Registry#6608

Merged
Xuanwo merged 2 commits intomainfrom
registry
Oct 1, 2025
Merged

feat: Add Operator Registry#6608
Xuanwo merged 2 commits intomainfrom
registry

Conversation

@Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Sep 30, 2025

Which issue does this PR close?

Part of #5445

Rationale for this change

This PR will allow users to load operator from uri.

What changes are included in this PR?

Added an OperatorRegistry in OpenDAL

Are there any user-facing changes?

Users can now calling Operator::from_uri("s3://bucket", [("region", "us-east-1")])


This PR was primarily authored with Codex using GPT-5-Codex and then hand-reviewed by me. I AM responsible for every change made in this PR. I aimed to keep it aligned with our goals, though I may have missed minor issues. Please flag anything that feels off, I'll fix it quickly.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels Sep 30, 2025
@Xuanwo Xuanwo requested review from PsiACE and tisonkun September 30, 2025 17:27
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 30, 2025
Signed-off-by: Xuanwo <[email protected]>
@Xuanwo Xuanwo merged commit 578c1a0 into main Oct 1, 2025
395 of 399 checks passed
@Xuanwo Xuanwo deleted the registry branch October 1, 2025 08:03
@tisonkun
Copy link
Member

tisonkun commented Oct 1, 2025

@Xuanwo I can see that users still need to pass options to populate concrete opts, like for S3, I currently configure:

type = "s3"
bucket = "test-bucket"
region = "us-east-1"
root = "/"
endpoint = "..."
access_key_id = "..."
secret_access_key = "..."
virtual_host_style = false

Seems the current registry supports only:

let op = Operator::from_uri("s3://test-bucket/", [])?;

Then what about other fields?

Especially, how the endpoint should be configured.

@Xuanwo
Copy link
Member Author

Xuanwo commented Oct 1, 2025

Seems the current registry supports only:

People can pass by either in uri or in options:

let op = Operator::from_uri("s3://test-bucket?region=\"us-east-1\"", [("virtual_host_style", "false")])?;

For endpoint, it currently supports:

let endpoint = "https://xxxx.minio.local";
let op = Operator::from_uri("s3://test-bucket", [("endpoint", endpoint)])?;

But I think it can be extended to:

let op = Operator::from_uri("s3://xxxx.minio.local/test-bucket", [])?;

@tisonkun
Copy link
Member

tisonkun commented Oct 1, 2025

let op = Operator::from_uri("s3://test-bucket?region=\"us-east-1\"", [("virtual_host_style", "false")])?;

I don't see the code to read options from URI options.

@Xuanwo
Copy link
Member Author

Xuanwo commented Oct 1, 2025

I don't see the code to read options from URI options.

Working on a refactor, should be supported in the next PR.

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