174-add_slash_clipping_when_search_by_filename_attr_master #205
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-http-gw#205
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "r.loginov/frostfs-http-gw:feature/174-add_slash_clipping_when_search_by_filename_attr_master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
According to the FrostFS API specification,
the FileName attribute cannot contain a slash
at the beginning.
Test scenarios:
Container CID:
3TK3yYFQ9FqK9vGz5wfKpDS6KB81DYz8i3PinQiGLypW
Test scenario 1
Getting an object by the attribute
FileName'. The value of the
FileName` attribute has a "/" at the beginning.Uploading an object:
By default, its attribute is
FileName=cat.jpg
:We are trying to get an object using "/" at the beginning of the value of the attribute
FileName
:Logs of the frostfs-http-gw service:
Test scenario 2
We are retrieving an object using the
FilePath
attribute that does not exist. The value of theFile Path
attribute has a "/" at the beginning. Due to the fact that there is no such attribute, the gate will do a fallback search using theFileName
attribute.We are trying to get an object using the "/" at the beginning of the value of the "FilePath" attribute. (The bucket and the object from the previous test scenario):
Logs of the frostfs-http-gw service:
Signed-off-by: Roman Loginov r.loginov@yadro.com
174-add_slash_clipping_when_search_by_filename_attr_masterto WIP: 174-add_slash_clipping_when_search_by_filename_attr_masterWIP: 174-add_slash_clipping_when_search_by_filename_attr_masterto 174-add_slash_clipping_when_search_by_filename_attr_masterDo we need to port release commit?
Yeah let's change changelog.md this way.
New commits pushed, approval review dismissed automatically according to repository settings
As for me, I would be nice to have opportunity to search by attributes as it is. It can be different endpoint (or trimming slash only for
get/<bucket>/<object>
and not for `get_by_attributes///), config flag or something else.What do you think?
@dkirillov wrote in #205 (comment):
Am I right that you want to do this for backward compatibility? Or in case the user suddenly wants to create objects with
FileName
attribute with leading slash?If I already have such objects (with incorrect attributes) or if I will create such objects in future, I would like to be able to get them via http-gw somehow
6cdff1d1e2
to466f3a9531
New commits pushed, approval review dismissed automatically according to repository settings
@dkirillov #207