cryostatio / cryostat

Other
7 stars 8 forks source link

fix(rules): rule archiving and re-activation bugfixes #518

Closed andrewazores closed 2 weeks ago

andrewazores commented 2 weeks ago

Welcome to Cryostat3! 👋

Before contributing, make sure you have:

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Fixes: #517

Description of the change:

Fixes up some issues that arose due to previous refactorings, where collections were improperly modified during traversal, or methods went from blocking operations to returning Unis which went ignored, or active recordings were improperly left running, or duplicate target definitions were not de-duplicated by JVM ID and thus were acted on multiple times.

How to manually test:

  1. Check out and build PR
  2. ./smoketest.bash -Ot
  3. Create an automated rule using the JSON below
  4. Verify that targets have the active recording created and started
  5. Verify that rule archives copies, then prunes extras later
  6. Disable rule with clean option checked and ensure recordings are stopped
  7. Re-enable rule and ensure recordings are restarted
{
  "id": 1,
  "name": "test",
  "description": "",
  "matchExpression": "target.connectUrl.startsWith('service') && target.jvmId != null",
  "eventSpecifier": "template=Continuous,type=TARGET",
  "archivalPeriodSeconds": 20,
  "initialDelaySeconds": 0,
  "preservedArchives": 2,
  "maxAgeSeconds": 0,
  "maxSizeBytes": 26214400,
  "enabled": true
}
andrewazores commented 2 weeks ago

/build_test

github-actions[bot] commented 2 weeks ago

Workflow started at 6/13/2024, 11:06:57 AM. View Actions Run.

github-actions[bot] commented 2 weeks ago

CI build and push: All tests pass ✅ (JDK17) https://github.com/cryostatio/cryostat3/actions/runs/9502125197

andrewazores commented 2 weeks ago

/build_test

github-actions[bot] commented 2 weeks ago

Workflow started at 6/13/2024, 11:20:08 AM. View Actions Run.

github-actions[bot] commented 2 weeks ago

No OpenAPI schema changes detected.

github-actions[bot] commented 2 weeks ago

No GraphQL schema changes detected.

github-actions[bot] commented 2 weeks ago

CI build and push: All tests pass ✅ (JDK17) https://github.com/cryostatio/cryostat3/actions/runs/9502341883

andrewazores commented 2 weeks ago

/build_test

github-actions[bot] commented 2 weeks ago

Workflow started at 6/13/2024, 2:57:40 PM. View Actions Run.

github-actions[bot] commented 2 weeks ago

No GraphQL schema changes detected.

github-actions[bot] commented 2 weeks ago

No OpenAPI schema changes detected.

github-actions[bot] commented 2 weeks ago

CI build and push: All tests pass ✅ (JDK17) https://github.com/cryostatio/cryostat3/actions/runs/9505241368

andrewazores commented 2 weeks ago

@Mergifyio backport cryostat-v3.0

mergify[bot] commented 2 weeks ago

backport cryostat-v3.0

✅ Backports have been created

* [#519 fix(rules): rule archiving and re-activation bugfixes (backport #518)](https://github.com/cryostatio/cryostat/pull/519) has been created for branch `cryostat-v3.0`