-
Notifications
You must be signed in to change notification settings - Fork 10
feat(reports): implement report request filtering, config default filter #880
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
Conversation
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
038aa35
to
4991550
Compare
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.
Tested via API calls and environment variable + web client, filtering works as expected and results are N/A as expected.
Do you think it's worth adding a notification so that web client users are aware that filtering is being done at least until a proper frontend is made for this?
I wasn't thinking of building any frontend for this - it's a server deployment-time configuration property for instance admins, at least how it's currently defined, so I'm not even sure what the frontend would be. There can/should be configuration properties on the Helm chart and Operator CR to control these things, but that would be the closest thing. What kind of notification would you expect to see? |
4991550
to
dd0494c
Compare
/build_test |
Workflow started at 6/24/2025, 5:15:31 PM. View Actions Run. |
No GraphQL schema changes detected. |
OpenAPI schema change detected: diff --git a/schema/openapi.yaml b/schema/openapi.yaml
index 3fdc85b..2b061f0 100644
--- a/schema/openapi.yaml
+++ b/schema/openapi.yaml
@@ -949,21 +949,23 @@ paths:
schema:
items:
$ref: '#/components/schemas/ReportRule'
type: array
description: OK
"401":
description: Not Authorized
"403":
description: Not Allowed
security:
- - SecurityScheme: []
+ - SecurityScheme:
+ - read
+ summary: List Report Rules
tags:
- Reports
/api/v4.1/targets/{targetId}/reports:
get:
description: |
Get the current cached automated analysis report for the specified target, if any. If no such
report currently exists for the specified target then the response will be an HTTP 404 Not Found,
and automated analysis report generation will not be triggered.
parameters:
- in: path
|
Schema changes committed by the CI. |
CI build and push: All tests pass ✅ |
7ac2d4d
to
25b5993
Compare
This PR/issue depends on: |
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Related to cryostatio/cryostat-core#527
Related to #859
Depends on cryostatio/cryostat-core#538
Depends on cryostatio/cryostat-reports#339
Description of the change:
How to manually test:
./smoketest.bash -O -t quarkus-cryostat-agent -r
https --auth=user:pass :8443/api/v4/targets/{targetId}/reports/{recordingId}?filter=some_id
, wheretargetId
is some ID from/api/v4/targets
,recordingId
is aremoteId
from/api/v4/targets/{targetId}/recordings
, andsome_id
is a rule ID from/api/v4.1/reports_rules
.some_id
can also be a comma-separated list, and can actually be rule IDs or topics, and can be negated by prefixing with!
. The parser is not very sophisticated, so any negations should only follow after using the*
wildcard - so to ignore a particular ID, use*,!id
as the filter text. To process only particular IDs, useid1,id2
as the filter text.https --auth=user:pass :8443/api/v4/recordings
and use areportUrl
from one of the results to issue a follow-up request, appending?filter=some_id
as above, ex.$ https --auth=user:pass ':8443/api/v4/reports/ZEVfcE5vazJDak5Sc1hzV0FHTWpoT0k4VUtTcTlUb3pzb3Z1cmZ1UlotUT0vLWRlcGxveW1lbnRzLXF1YXJrdXMtcnVuLWphcl9vbnN0YXJ0XzIwMjUwNDE2VDE5MzAwNVouamZy?filter=*,!PID1Rule,!PasswordsInEnvironment'
ctrl-c
to tear down the smoketest. Edit thecompose/cryostat.yml
and add underenvironment:
an entry likeCRYOSTAT_SERVICES_REPORTS_FILTER=*,!PID1Rule,!PasswordsInEnvironment
, then bring the smoketest back up.