Xuanwo opened a new pull request, #9094: URL: https://github.com/apache/opendal/pull/9094
# Which issue does this PR close? Refs #8158 (OSS and TOS). # Rationale for this change Callers using versioned OSS or TOS buckets can recover a deleted object or promote a historical version through the existing restore API. Both services previously returned `Unsupported`. # What changes are included in this PR? `restore(path)` leaves a live object untouched. For a deleted object, OSS removes the current delete marker by version ID. TOS first checks that a data version survives, following the version list only while it still refers to the exact key. If only markers remain, TOS returns `NotFound` and leaves them intact. Each call removes at most one marker. Callers need permission to list versions and delete the marker by ID. `restore_with(path).version(id)` uses the provider's same-key `CopyObject` to make the selected version current. The caller needs read access to that version and write access to the destination. Single-request copy limits apply. We verified the six shared restore cases separately on real version-enabled OSS and TOS buckets using small objects. The OSS probe also passed on a local merge with #9090. The TOS regression covered adjacent markers and permanent deletion of all data versions. Both fixtures ended with zero versions and markers under their test prefixes. A test transport withheld successful mutation responses from each provider. The adapter returned an error without replaying the mutation, leaving the next marker intact after delete and creating one new version after copy. An outer timeout can still cancel a restore before the adapter sees the response. Callers should check the object's state before retrying an unconfirmed mutation. The combined commit preserves the OSS and TOS implementations from those live runs. On that commit, regeneration reproduced the capability catalog, and 36 unit tests and five doc tests passed locally. # Are there any user-facing changes? The OSS and TOS services advertise `restore` and `restore_with_version`. Object recovery requires bucket versioning. Passing `if_not_exists(true)` without selecting a version returns `ConfigInvalid`; passing it with a version returns `Unsupported`. The service guides document these requirements. # Breaking changes # AI Usage Statement - pi, Sol (xhigh) implemented both services, added regression coverage, and ran the real-service probes. - pi, Astra (high) coordinated verification and review, integrated the candidates, and checked the combined tree. - pi, SWE-2 (high) independently reviewed the OSS and TOS candidates, including their error and retry behavior. - pi, Gemini (high) independently reviewed the integrated commit and drafted the PR description. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
