cryostatio / cryostat

Secure JDK Flight Recorder management for containerized JVMs
https://cryostat.io
Other
8 stars 8 forks source link

fix(db): correct use of Transactional annotation #415

Closed andrewazores closed 2 months ago

andrewazores commented 2 months 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: #405 Fixes: #440

Description of the change:

Removes useless instances of Transactional annotation and replaces them with QuarkusTransaction.joiningExisting() invocations where applicable.

Motivation for the change:

Ensures operations actually occur in a transactional context as expected

How to manually test:

  1. Run CRYOSTAT_IMAGE=quay.io... bash smoketest.bash...
  2. Click around UI performing actions and ensure general functionality works as expected. Pay particular attention to Topology view/actions, Archives > All Targets, and Automated Rules, since these exercise things the most.
  3. Create an automated rule like the one below and ensure that it correctly creates a new recording when enabled, that the recording gets archived every 10 seconds, and after there are 3 archived copies that the oldest one gets pruned when a new one is created. Disabling a rule should stop new archives from being saved.
{
  "id": 1,
  "name": "test",
  "description": "",
  "matchExpression": "target.connectUrl.contains('localhost:0')",
  "eventSpecifier": "template=Profiling,type=TARGET",
  "archivalPeriodSeconds": 10,
  "initialDelaySeconds": 0,
  "preservedArchives": 3,
  "maxAgeSeconds": 300,
  "maxSizeBytes": 0,
  "enabled": true
}
tthvo commented 2 months ago

This is a fix for #405 right? I can help with a quick fix for #412.

andrewazores commented 2 months ago

This is a fix for #405 right? I can help with a quick fix for #412.

Yes, I meant to tag both of those issues for this PR. I got started on it and then got sidetracked - please go ahead and add your fix for 412 :-)

andrewazores commented 2 months ago

/build_test

github-actions[bot] commented 2 months ago

Workflow started at 4/29/2024, 10:17:20 AM. View Actions Run.

github-actions[bot] commented 2 months ago

No GraphQL schema changes detected.

github-actions[bot] commented 2 months ago

No OpenAPI schema changes detected.

github-actions[bot] commented 2 months ago

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

andrewazores commented 2 months ago

/build_test

github-actions[bot] commented 2 months ago

Workflow started at 5/8/2024, 11:38:18 AM. View Actions Run.

github-actions[bot] commented 2 months ago

No GraphQL schema changes detected.

github-actions[bot] commented 2 months ago

No OpenAPI schema changes detected.

github-actions[bot] commented 2 months ago

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