Skip to content

refactor(services/cos): complete capability override migration#7554

Merged
Xuanwo merged 2 commits into
mainfrom
xuanwo/cos-capability-override-cleanup
May 19, 2026
Merged

refactor(services/cos): complete capability override migration#7554
Xuanwo merged 2 commits into
mainfrom
xuanwo/cos-capability-override-cleanup

Conversation

@Xuanwo

@Xuanwo Xuanwo commented May 19, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Refs #6708.

Rationale for this change

COS still had a service config value that only changed declared capabilities. After #7520, those test/setup differences should be expressed through capability overrides instead of COS-specific config.

What changes are included in this PR?

This PR deprecates enable_versioning as a no-op compatibility shim, declares COS versioning capabilities directly, and migrates the COS behavior setup to OPENDAL_TEST_CAPABILITY_OVERRIDES. The COS test setup also disables write_with_if_not_exists and copy_with_if_not_exists because x-cos-forbid-overwrite only works for buckets that have never enabled versioning.

It also aligns the Go binding's capability FFI layout with the C opendal_capability struct. Go kept a stale extra blocking field, which made Info().GetFullCapability() decode a different struct shape than the C ABI returns and could crash behavior tests.

Are there any user-facing changes?

enable_versioning is now deprecated for COS and no longer changes COS's native capability declaration. COS setups with narrower capability support should override the operator capability instead.

AI Usage Statement

N/A.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" labels May 19, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 19, 2026
@Xuanwo Xuanwo merged commit 91eecd9 into main May 19, 2026
456 of 458 checks passed
@Xuanwo Xuanwo deleted the xuanwo/cos-capability-override-cleanup branch May 19, 2026 01:27
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/refactor The PR does a refactor on code or has a title that begins with "refactor" size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants