-
Notifications
You must be signed in to change notification settings - Fork 0
ROX-32852: Add filtering by cluster name #39
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
+ Coverage 77.36% 78.22% +0.86%
==========================================
Files 26 27 +1
Lines 1162 1208 +46
==========================================
+ Hits 899 945 +46
Misses 223 223
Partials 40 40 ☔ View full report in Codecov by Sentry. |
4ff363f to
3074da2
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
+ Coverage 77.36% 78.22% +0.86%
==========================================
Files 26 27 +1
Lines 1162 1208 +46
==========================================
+ Hits 899 945 +46
Misses 223 223
Partials 40 40 ☔ View full report in Codecov by Sentry. |
3074da2 to
75abe25
Compare
75abe25 to
f4bf6dd
Compare
| client := v1.NewClustersServiceClient(conn) | ||
|
|
||
| // Use query to filter by cluster name server-side | ||
| query := fmt.Sprintf("Cluster:%q", clusterName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it full or partial match? Should we do a check before returning the [0] element if name really matches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is full match. When query value is in quote, then it is "exact match". (as I remember)
Not sure about lower/upper cases.
EDIT:
- also added comment here about that:
// We will quote values to have strict match. Without quote: CVE-2025-10, would match CVE-2025-101.
Description
This PR is adding filtering by cluster name.
It first fetches the cluster to verify that the name exists and then uses the actual cluster ID in the query for a backend call. In that way, we can properly return an error if the cluster name does not exist.
Validation