refactor(services/cos): complete capability override migration#7554
Merged
Conversation
28 tasks
tisonkun
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_versioningas a no-op compatibility shim, declares COS versioning capabilities directly, and migrates the COS behavior setup toOPENDAL_TEST_CAPABILITY_OVERRIDES. The COS test setup also disableswrite_with_if_not_existsandcopy_with_if_not_existsbecausex-cos-forbid-overwriteonly works for buckets that have never enabled versioning.It also aligns the Go binding's capability FFI layout with the C
opendal_capabilitystruct. Go kept a stale extrablockingfield, which madeInfo().GetFullCapability()decode a different struct shape than the C ABI returns and could crash behavior tests.Are there any user-facing changes?
enable_versioningis 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.