Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: query specification - always treat 'in','not-in' filter values as an array #439

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

jharley
Copy link
Collaborator

@jharley jharley commented Feb 21, 2024

in, and not-in filter values should always be treated as an array. This allows for the possibility of filters like app.mything.id not-in 38374

@jharley jharley added the bug label Feb 21, 2024
@jharley jharley requested a review from a team as a code owner February 21, 2024 20:16
@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (90d8741) 83.20% compared to head (07a49b2) 83.21%.

Files Patch % Lines
honeycombio/data_source_query_specification.go 80.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #439   +/-   ##
=======================================
  Coverage   83.20%   83.21%           
=======================================
  Files          62       62           
  Lines        4168     4170    +2     
=======================================
+ Hits         3468     3470    +2     
  Misses        547      547           
  Partials      153      153           

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

@jharley jharley changed the title fix: query specification - always treat 'in','not-in' filter values as strings fix: query specification - always treat 'in','not-in' filter values as an array Feb 21, 2024
if valueSet {
return filter, fmt.Errorf(multipleValuesError)
}
filter.Value = vb
filter.Value = v
}

if filter.Op == honeycombio.FilterOpIn || filter.Op == honeycombio.FilterOpNotIn {
Copy link
Collaborator Author

@jharley jharley Feb 21, 2024

Choose a reason for hiding this comment

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

I understand we're doing "it's an in,not-in filter" things in two places at the moment, but this second check is a function of the deprecated value_* options. Once they're removed we can do this all in one place above

Copy link
Contributor

@cewkrupa cewkrupa left a comment

Choose a reason for hiding this comment

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

🎉 looks great!

@jharley jharley merged commit 9c84dba into main Feb 21, 2024
2 checks passed
@jharley jharley deleted the jharley.fix-qs-notin-string branch February 21, 2024 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants