Skip to content

fix(ObjectStore/S3): switch to more reliable doesObjectExistV2#58840

Merged
joshtrichards merged 4 commits intomasterfrom
jtr/fix-ObjectStore-S3-doesObjectExistV2
Apr 29, 2026
Merged

fix(ObjectStore/S3): switch to more reliable doesObjectExistV2#58840
joshtrichards merged 4 commits intomasterfrom
jtr/fix-ObjectStore-S3-doesObjectExistV2

Conversation

@joshtrichards
Copy link
Copy Markdown
Member

@joshtrichards joshtrichards commented Mar 10, 2026

  • Resolves: #

Summary

The non-v2 version is deprecated, but more importantly the V2 implementation makes fewer assumptions about ambiguous or unexpected status codes. For example, a 403 would result in a false (object does not exist) in V1, but that's not necessarily what that means. V2 returns true/false on a much more narrow set of scenarios. And it throws for all others so they can be diagnosed properly.

Refs:

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

The non-v2 version is deprecated, but more importantly the V2 implementation makes fewer assumptions about ambiguous or unexpected status codes. For example, a 403 would result in a false (object does not exist) in V1, but that's not necessarily what that means. V2 returns true/false on a much more narrow set of scenarios. And it throws for all others so they can be diagnosed properly.

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 34 milestone Mar 10, 2026
@joshtrichards joshtrichards added the 3. to review Waiting for reviews label Mar 10, 2026
@joshtrichards joshtrichards marked this pull request as ready for review March 10, 2026 15:16
@joshtrichards joshtrichards requested a review from a team as a code owner March 10, 2026 15:16
@joshtrichards joshtrichards requested review from Altahrim, ArtificialOwl, come-nc and icewind1991 and removed request for a team March 10, 2026 15:16
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards
Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

…-S3-doesObjectExistV2

# Conflicts:
#	lib/private/Files/ObjectStore/S3ObjectTrait.php

Co-authored-by: joshtrichards <1731941+joshtrichards@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit 617803fc. The conflict was in objectExists() — kept our doesObjectExistV2 with getSSECParameters(), while accepting master's getServerSideEncryptionParameters() changes in the other methods.

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards enabled auto-merge April 25, 2026 16:03
@joshtrichards joshtrichards merged commit d32cae3 into master Apr 29, 2026
253 of 265 checks passed
@joshtrichards joshtrichards deleted the jtr/fix-ObjectStore-S3-doesObjectExistV2 branch April 29, 2026 12:48
@nextcloud-bot nextcloud-bot mentioned this pull request Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants