[docs-only] fix: add ResourceID field to UploadReady event with file's node ID#12060
Conversation
bfd138d to
f4fb364
Compare
|
|
@paul43210 Thank you for your PR. |
|
Thanks for the review @2403905! You're right that the built-in oCIS consumers (activitylog, clientlog, search) all use The consumer that needs the actual file node ID is an external NATS event consumer — a face detection service that subscribes to Currently The That said, if an external consumer use case isn't compelling enough for this change, I understand. Happy to discuss alternative approaches. |
|
Hi @paul43210. Sorry for the delay. |
2403905
left a comment
There was a problem hiding this comment.
The reva changes should go first
|
Related PR owncloud/reva#547 |
|
@paul43210 I merged the reva #12087 to ocis. It includes the related pr #547
|
f4fb364 to
d754c5b
Compare
c843e17 to
1ee038e
Compare
1ee038e to
39a4c07
Compare
|
@2403905 Thanks for the guidance! I've rebased onto master, squashed into a single commit, and added the reva PR #547 link to the changelog. Re: removing the vendor directory — I checked and the reva bump in PR #12087 only added the new The PR now contains just:
|
|
Hello @paul43210 I see the |
The UploadReady event's FileRef.ResourceId.OpaqueId is set to the space root ID (required for CS3 gateway path resolution via WalkPath). This means consumers that need the file's actual node ID for Graph API URLs get the space root instead. Add a separate ResourceID field (following the BytesReceived pattern) that carries the file's actual resource identifier with the correct OpaqueId set to session.NodeID(). Upstream: https://github.com/owncloud/reva/pull/XXXXX Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
da743c4 to
4a20047
Compare
[docs-only] fix: add ResourceID field to UploadReady event with file's node ID



Summary
The
UploadReadyevent'sFileRef.ResourceId.OpaqueIdis set to the space root ID (required for CS3 gateway path resolution). NATS consumers that need the file's actual node ID for Graph API URLs or metadata writes get the space root instead.Problem
FileRefusesOpaqueId = session.SpaceID()becauseNodeFromResource()usesOpaqueIdas the anchor forWalkPath(Path). This is correct for CS3 gateway resolution, but meansFileRef.ResourceIdcannot be used as a file identifier.A previous fix attempt (PR #12057, closed) changed
OpaqueIdtosession.NodeID(), which broke:WalkPathfrom a file node fails withCODE_NOT_FOUND)Pathto work around that broke external consumers that need the file pathFix
Add a separate
ResourceIDfield to theUploadReadyevent, following the same pattern already used byBytesReceived:FileRefis unchanged — CS3 gateway resolution andPathcontinue to work. JSON deserialization silently ignores unknown fields, so existing consumers are unaffected.Changes
vendor/.../events/postprocessing.goResourceID *provider.ResourceIdtoUploadReadystructvendor/.../decomposedfs/decomposedfs.goResourceIDwithsession.NodeID()vendor/.../posix/tree/assimilation.goResourceIDfrom existingref.ResourceIdchangelog/unreleased/fix-uploadready-resource-id.mdTest plan
UploadReadyNATS event contains bothFileRef(with Path) andResourceID(with correct OpaqueId)FileRef)ResourceID.OpaqueIdas the file's node IDUpstream reva PR: owncloud/reva#547
Related: #12056
🤖 Generated with Claude Code