Fix policy encoding to string #104
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#104
Loading…
Reference in a new issue
No description provided.
Delete branch "alexvanin/frostfs-sdk-go:fix/policy-encode-characters"
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?
Open questions:
-
edf5d9e9db
toa4fb25bc72
a4fb25bc72
to92f6bb9736
According to the grammar, special symbols are only allowed in
STRING
, so nowhere besides filter keys and values. https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/branch/master/netmap/parser/Query.g4#L42Again, according to the grammar,
\t
etc is allowed https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/branch/master/netmap/parser/QueryLexer.g4#L32BTW, one of the solutions is to marshal string in JSON instead of custom escaping function.
Linter warning was fixed in #105.
@fyrchik added \t
JSON marshaler returns error which we can't ignore, a bit uncomfortable.
Also with JSON marshaler wraps all keys and values with
"
, so it may look a bit weird.92f6bb9736
to7ad0ce3c34
Let's merge it for now and I'll come back later with new issues / PRs if there will be more characters to escape in policies. Right now white space and dash are used for
UN-LOCODE
filters.