Slicer overrides object version #277

Open
opened 2025-12-28 18:07:39 +00:00 by sami · 0 comments
Owner

Originally created by @roman-khimov on GitHub (Jul 23, 2025).

Current Behavior

User can put any version into object header, slicer will ignore it and set whatever is the latest for it.
nspcc-dev/neofs-sdk-go@c7038b4506/object/slicer/slicer.go (L276-L277)

Expected Behavior

Keep the original one, it's a part of the supplied header.

Possible Solution

Keep the version.

Steps to Reproduce

Lock S3 object with gateway 0.39.0 using NeoFS node 0.48.0. Lock object is specifically made to be compatible with 2.17, but NeoFS node overrides version and breaks object semantics.
nspcc-dev/neofs-s3-gw@f80abb1353/internal/neofs/neofs.go (L362-L363)

Context

It's impossible to keep backwards compatibility this way. Old code creating objects the way that was correct previously stops working.

Regression

Doesn't look like, it was always this way.

Your Environment

  • Version of the product used: RC13+
Originally created by @roman-khimov on GitHub (Jul 23, 2025). ## Current Behavior User can put any version into object header, slicer will ignore it and set whatever is the latest for it. https://github.com/nspcc-dev/neofs-sdk-go/blob/c7038b450691ddce7278702814bd10adf0a1ba41/object/slicer/slicer.go#L276-L277 ## Expected Behavior Keep the original one, it's a part of the supplied header. ## Possible Solution Keep the version. ## Steps to Reproduce Lock S3 object with gateway 0.39.0 using NeoFS node 0.48.0. Lock object is specifically made to be compatible with 2.17, but NeoFS node overrides version and breaks object semantics. https://github.com/nspcc-dev/neofs-s3-gw/blob/f80abb1353c38ebaaa4ca71fe7650385dbb0baa0/internal/neofs/neofs.go#L362-L363 ## Context It's impossible to keep backwards compatibility this way. Old code creating objects the way that was correct previously stops working. ## Regression Doesn't look like, it was always this way. ## Your Environment * Version of the product used: RC13+
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-sdk-go#277
No description provided.