fix: Correct multiple labels filtering for get commadn #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Our backend only interprets the first query parameter value it receives.
Since we've been setting
url.Values
labels query parameter key to a list of parsed values, this caused our backend to only interpret the first value.With example Projects:
When running:
We got:
azure-agent
What should've happened?
Both commands should only return
azure-agent
, as this should've been interpreted as AND condition between labels. As a side effect, OR conditions have been broken too (same key, multiple labels), so these should work now too.Testing
Release Notes
Fixed labels filtering for
sloctl get
command which was causing incorrect results to be returned by our backend.Issue affects every sloctl version starting from and including v0.0.95.