Skip to content

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

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

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

Conversation

@joshtrichards

@joshtrichardsjoshtrichards commented Mar 10, 2026

Copy link
Copy Markdown
Member
  • 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>
@joshtrichardsjoshtrichards added this to the Nextcloud 34 milestone Mar 10, 2026
@joshtrichardsjoshtrichards 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 ownerMarch 10, 2026 15:16
@joshtrichards
joshtrichards requested review from Altahrim, ArtificialOwl, come-nc and icewind1991 and removed request for a teamMarch 10, 2026 15:16
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards

Copy link
Copy Markdown
MemberAuthor

@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>

CopilotAI commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

@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 merged commit d32cae3 into masterApr 29, 2026
253 of 265 checks passed
@joshtrichards
joshtrichards deleted the jtr/fix-ObjectStore-S3-doesObjectExistV2 branch April 29, 2026 12:48
This was referenced Apr 30, 2026
This was referenced May 7, 2026
@nextcloud-botnextcloud-bot mentioned this pull request May 15, 2026
@nextcloud-botnextcloud-bot mentioned this pull request May 20, 2026
@nextcloud-botnextcloud-bot mentioned this pull request May 27, 2026
Sign up for freeto 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

@joshtrichards@CarlSchwan@come-nc