Skip to content

Search check fix#3934

Open
roman-khimov wants to merge 2 commits intomasterfrom
search-fixes
Open

Search check fix#3934
roman-khimov wants to merge 2 commits intomasterfrom
search-fixes

Conversation

@roman-khimov
Copy link
Copy Markdown
Member

Follow-up to #3931.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 16.66667% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.81%. Comparing base (943599a) to head (d242cab).

Files with missing lines Patch % Lines
pkg/core/object/metadata.go 21.42% 6 Missing and 5 partials ⚠️
pkg/services/object/server.go 0.00% 3 Missing ⚠️
pkg/util/meta/test/metatest.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3934      +/-   ##
==========================================
- Coverage   26.82%   26.81%   -0.01%     
==========================================
  Files         670      670              
  Lines       44294    44296       +2     
==========================================
- Hits        11881    11880       -1     
- Misses      31309    31311       +2     
- Partials     1104     1105       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

}
}
//nolint:exhaustive
switch f.MatchType {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is correct and match previous behavior. But i also see that we do this in

ofs, ok := parseIntFilters(fs)
if !ok {
return nil, nil, ErrUnreachableQuery
}

i'd either apply proposed change there or deduplicate these checks in the future (not a critical point, but still)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh

ofs, cursor, err := objectcore.PreprocessSearchQuery(fs, attrs, body.Cursor)
if err != nil {
if errors.Is(err, objectcore.ErrUnreachableQuery) {
return nil, nil, nil
}
return nil, nil, err
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we test the same for searchv2?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked a bit, should be better now.

Turns out, V1 search (deleted in e4a034c)
had this check and we have some tests for it. V2 also has some of it internally,
but this was hidden by unreachable query error (returning nothing instead of
an error).

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Unused since e4a034c.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants