-
Notifications
You must be signed in to change notification settings - Fork 10
fix(rules): archiver job uses metadata labels, not filename pattern, to match recordings #1179
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(rules): archiver job uses metadata labels, not filename pattern, to match recordings #1179
Conversation
|
/build_test |
|
Workflow started at 11/21/2025, 11:08:31 PM. View Actions Run. |
|
No GraphQL schema changes detected. |
|
No OpenAPI schema changes detected. |
|
CI build and push: All tests pass ✅ |
|
/build_test |
|
Workflow started at 11/22/2025, 5:30:33 PM. View Actions Run. |
|
No GraphQL schema changes detected. |
|
No OpenAPI schema changes detected. |
|
CI build and push: At least one test failed ❌ |
c046859 to
e2196ee
Compare
|
/build_test |
|
Workflow started at 11/24/2025, 8:59:36 AM. View Actions Run. |
|
No GraphQL schema changes detected. |
|
No OpenAPI schema changes detected. |
|
CI build and push: All tests pass ✅ |
|
/build_test |
|
Workflow started at 11/24/2025, 9:28:50 AM. View Actions Run. |
|
No OpenAPI schema changes detected. |
|
No GraphQL schema changes detected. |
|
CI build and push: At least one test failed ❌ |
eb58b8d to
2cd64c8
Compare
|
/build_test |
|
Workflow started at 11/24/2025, 9:51:30 AM. View Actions Run. |
|
No GraphQL schema changes detected. |
|
/build_test |
|
Workflow started at 11/24/2025, 12:17:27 PM. View Actions Run. |
|
No GraphQL schema changes detected. |
|
No OpenAPI schema changes detected. |
|
CI build and push: All tests pass ✅ |
bb9d4f2 to
b6e7a63
Compare
…to match recordings
This reverts commit fb289c4.
b6e7a63 to
51333fa
Compare
|
/build_test |
|
Workflow started at 11/28/2025, 10:30:39 AM. View Actions Run. |
|
No OpenAPI schema changes detected. |
|
No GraphQL schema changes detected. |
|
CI build and push: All tests pass ✅ |
Josh-Matsuoka
left a comment
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.
Pruning works as expected when following instructions, localhost:0 behaves correctly
…to match recordings (backport #1179) (#1203) * fix(rules): archiver job uses metadata labels, not filename pattern, to match recordings (#1179) (cherry picked from commit b9730cd) * chore(schema): automatic update --------- Co-authored-by: Andrew Azores <me@andrewazor.es> Co-authored-by: Cryostat CI <rhjavamonitoring@gmail.com>
Welcome to Cryostat! 👋
Before contributing, make sure you have:
mainbranch[chore, ci, docs, feat, fix, test]To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/mainFixes: #1178
Related to #1061
Description of the change:
Removes the old regex from the Job which runs to handle automated rule archiving and pruning. This regex would try to match against archived recording filenames found in storage and use capture groups to compare a portion of the filename to the expected recording name produced by the associated automated rule. However, the regex either made bad assumptions or fell out of sync with other changes to target names/aliases and recording names, and it is now possible for archived recording filenames to not match the regex because of characters outside of the expected character set.
Since this was originally written we now also have metadata labels for active recordings, and when a recording is started by automated rule the recording gains a
rule: $namelabel. These labels are also automatically copied to archive recordings' labels. So, the Job can simply use this metadata label to locate recordings which originate from the associated automated rule, without needing to examine the actual filename.Motivation for the change:
See #1178
How to manually test:
cryostat.ymlas described in [Bug] Automated Rule periodic archiving may not always cap the number of preserved copies #1178CRYOSTAT_DISCOVERY_JDP_ENABLED=false ./smoketest.bash -O quarkus-cryostat-agentlocalhost:custom target and create automated rule as in [Bug] Automated Rule periodic archiving may not always cap the number of preserved copies #1178