Skip to content
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(db): correct use of Transactional annotation #415

Merged
merged 34 commits into from
May 8, 2024

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Apr 25, 2024

Welcome to Cryostat3! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

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
Copy link
Member

tthvo commented Apr 25, 2024

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

@andrewazores
Copy link
Member Author

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 andrewazores force-pushed the gh412 branch 2 times, most recently from 9f8ceed to 2ef8be7 Compare April 26, 2024 18:42
@andrewazores andrewazores marked this pull request as ready for review April 29, 2024 14:16
@andrewazores
Copy link
Member Author

/build_test

Copy link

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

Copy link

No GraphQL schema changes detected.

Copy link

No OpenAPI schema changes detected.

Copy link

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

Copy link
Contributor

@aali309 aali309 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented May 8, 2024

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

Copy link

github-actions bot commented May 8, 2024

No GraphQL schema changes detected.

Copy link

github-actions bot commented May 8, 2024

No OpenAPI schema changes detected.

Copy link

github-actions bot commented May 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
3 participants