netmap: Add LIKE operation for filter #231

Open
acid-ant wants to merge 4 commits from acid-ant/frostfs-sdk-go:feature/policy-like into master
Collaborator

Blocked by: TrueCloudLab/frostfs-api-go#87

Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com

Blocked by: https://git.frostfs.info/TrueCloudLab/frostfs-api-go/pulls/87 Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant added 4 commits 2024-06-24 12:08:29 +00:00
0d0803b72f [#xx] policy: Bump jre version to `17`
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
c105d79c04 [#xx] go.mod: Bump go version to `1.21`
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
0350291b3c [#xx] go.mod: Update version for `frostfs-api-go/v2`
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
DCO / DCO (pull_request) Failing after 1m15s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m23s Details
Tests and linters / Tests (1.22) (pull_request) Successful in 1m21s Details
Tests and linters / Lint (pull_request) Successful in 2m41s Details
604bddb803
[#xx] netmap: Add `LIKE` operation for `filter`
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant changed title from netmap: Add `LIKE` operation for `filter` to WIP: netmap: Add `LIKE` operation for `filter` 2024-06-24 12:08:41 +00:00
acid-ant changed title from WIP: netmap: Add `LIKE` operation for `filter` to netmap: Add `LIKE` operation for `filter` 2024-06-24 12:12:35 +00:00
acid-ant requested review from storage-core-committers 2024-06-24 12:12:43 +00:00
acid-ant requested review from storage-core-developers 2024-06-24 12:12:44 +00:00
acid-ant force-pushed feature/policy-like from 604bddb803 to 5b729e10d5 2024-06-24 13:09:21 +00:00 Compare
fyrchik requested changes 2024-06-24 13:45:19 +00:00
netmap/filter.go Outdated
@ -111,2 +112,4 @@
case netmap.EQ:
return b.Attribute(f.GetKey()) == f.GetValue()
case netmap.LIKE:
if f.GetValue() == netmap.LikeWildcard {

The code below seems to work for this case, why have a separate branch in code?

The code below seems to work for this case, why have a separate branch in code?
Poster
Collaborator

Just to exit faster in this case. Removed.

Just to exit faster in this case. Removed.
@ -253,0 +294,4 @@
n, err := nm.ContainerNodes(pNamed, []byte{1})
require.NoError(t, err)
require.Equal(t, 1, len(n[0]))

Could you also add attributes check for all tests?

Could you also add attributes check for all tests?
Poster
Collaborator

Added.

Added.
@ -253,0 +318,4 @@
n, err := nm.ContainerNodes(pNamed, []byte{1})
require.NoError(t, err)
require.Equal(t, 3, len(n[0]))

This does not differ from the previous test. Is there any reason we have 3 "Russia" in the test data?

This does not differ from the previous test. Is there any reason we have 3 "Russia" in the test data?
Poster
Collaborator

No reason. Like this number. Updated a bit.

No reason. Like this number. Updated a bit.
acid-ant force-pushed feature/policy-like from 5b729e10d5 to 50b2f45960 2024-06-27 07:48:16 +00:00 Compare
acid-ant requested review from fyrchik 2024-06-27 07:50:25 +00:00
dstepanov-yadro reviewed 2024-06-27 09:23:35 +00:00
@ -3,1 +3,3 @@
go 1.20
go 1.21
replace git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240530152826-2f6d3209e1d3 => git.frostfs.info/acid-ant/frostfs-api-go/v2 v2.15.1-0.20240624130238-eed7162e683b

Debugee

Debugee
All checks were successful
DCO / DCO (pull_request) Successful in 1m9s
Tests and linters / Tests (1.21) (pull_request) Successful in 1m25s
Tests and linters / Tests (1.22) (pull_request) Successful in 1m20s
Tests and linters / Lint (pull_request) Successful in 2m19s
This Pull Request doesn't have enough approvals yet. 0 of 2 approvals granted.
You are not authorized to merge this pull request.
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No Milestone
No Assignees
3 Participants
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: TrueCloudLab/frostfs-sdk-go#231
There is no content yet.