Skip to content

fix(db): de-nest transactions, handle Target loss during tasks, improve error handling#1486

Merged
andrewazores merged 16 commits intocryostatio:mainfrom
andrewazores:deleted-target-concurrently
Apr 28, 2026
Merged

fix(db): de-nest transactions, handle Target loss during tasks, improve error handling#1486
andrewazores merged 16 commits intocryostatio:mainfrom
andrewazores:deleted-target-concurrently

Conversation

@andrewazores
Copy link
Copy Markdown
Member

@andrewazores andrewazores commented Apr 23, 2026

Welcome to Cryostat! 👋

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


See #1482
Based on #1482
See #1214
See #1122
See #1074

Description of the change:

  1. Further enhances KubeEndpointSlicesDiscovery to be smarter about in-memory vs database access to ensure it's operating on up-to-date data, and to ensure that nodes with duplicate names across different Realms are not accidentally merged/reused.
  2. Further improves transaction handling in discovery, as well as in Automated Rules activation and cleanup to ensure that Rules are able to partially apply or partially clean even if some Target in the middle causes a failure. Rule cleanups are also handled by kicking off async jobs with retry and backoff, same as activations.
  3. Ensure that when match expressions evaluate targets, the targets' annotations/labels are properly loaded into the expression context
  4. Remove unnecessary database transaction wrapping from automated analysis report aggregator

@mergify mergify Bot requested a review from a team April 23, 2026 18:46
@andrewazores andrewazores force-pushed the deleted-target-concurrently branch 4 times, most recently from 2d29adb to bd0c417 Compare April 24, 2026 20:11
@andrewazores andrewazores requested review from a team and removed request for a team April 24, 2026 20:17
@andrewazores
Copy link
Copy Markdown
Member Author

/build_test

@github-actions
Copy link
Copy Markdown

Workflow started at 4/24/2026, 4:18:12 PM. View Actions Run.

@github-actions
Copy link
Copy Markdown

No GraphQL schema changes detected.

@github-actions
Copy link
Copy Markdown

No OpenAPI schema changes detected.

@github-actions
Copy link
Copy Markdown

No WebSocket notifications schema changes detected.

@github-actions
Copy link
Copy Markdown

CI build:
Integration tests pass ✅
Tests run: 46, Failures: 0, Errors: 0, Skipped: 1

https://github.com/cryostatio/cryostat/actions/runs/24909935985

@andrewazores andrewazores marked this pull request as ready for review April 24, 2026 21:02
@andrewazores
Copy link
Copy Markdown
Member Author

/build_test

@github-actions
Copy link
Copy Markdown

Workflow started at 4/27/2026, 10:38:01 AM. View Actions Run.

@github-actions
Copy link
Copy Markdown

No GraphQL schema changes detected.

@github-actions
Copy link
Copy Markdown

No OpenAPI schema changes detected.

@github-actions
Copy link
Copy Markdown

No WebSocket notifications schema changes detected.

@github-actions
Copy link
Copy Markdown

CI build:
Integration tests pass ✅
Tests run: 46, Failures: 0, Errors: 0, Skipped: 1

https://github.com/cryostatio/cryostat/actions/runs/25001439607

Josh-Matsuoka
Josh-Matsuoka previously approved these changes Apr 27, 2026
@andrewazores andrewazores dismissed Josh-Matsuoka’s stale review April 27, 2026 18:16

The merge-base changed after approval.

@andrewazores andrewazores force-pushed the deleted-target-concurrently branch from 68c09d9 to c076f51 Compare April 27, 2026 18:16
@github-actions
Copy link
Copy Markdown

@andrewazores
Copy link
Copy Markdown
Member Author

/build_test

@andrewazores
Copy link
Copy Markdown
Member Author

/build_test

@andrewazores andrewazores force-pushed the deleted-target-concurrently branch from 10e0502 to 6ecdd8f Compare April 28, 2026 18:54
@github-actions
Copy link
Copy Markdown

Workflow started at 4/28/2026, 2:54:28 PM. View Actions Run.

@github-actions
Copy link
Copy Markdown

No GraphQL schema changes detected.

@github-actions
Copy link
Copy Markdown

WebSocket notifications schema change detected:

diff --git a/schema/notifications.yaml b/schema/notifications.yaml
index ba7259c..f62a77c 100644
--- a/schema/notifications.yaml
+++ b/schema/notifications.yaml
@@ -1019,39 +1019,43 @@ components:
             properties:
               event:
                 type: object
                 properties:
                   kind:
                     type: object
                     description: Payload of type EventKind
                   serviceRef:
                     type: object
                     properties:
+                      id:
+                        type: integer
                       connectUrl:
                         type: object
                         description: Payload of type URI
                       alias:
                         type: string
                       jvmId:
                         type: string
                       labels:
                         type: object
                         additionalProperties: true
                       annotations:
                         type: object
                         properties:
                           platform:
                             type: object
                             additionalProperties: true
                           cryostat:
                             type: object
                             additionalProperties: true
+                      agent:
+                        type: boolean
                   jvmId:
                     type: string
         required:
         - meta
         - message
     TemplateDeleted:
       name: TemplateDeleted
       title: Template Deleted
       summary: 'Notification: TemplateDeleted'
       description: WebSocket notification for Template Deleted events

@github-actions
Copy link
Copy Markdown

No OpenAPI schema changes detected.

@github-actions
Copy link
Copy Markdown

Schema changes committed by the CI.

@andrewazores
Copy link
Copy Markdown
Member Author

/build_test

@github-actions
Copy link
Copy Markdown

Workflow started at 4/28/2026, 2:58:18 PM. View Actions Run.

@github-actions
Copy link
Copy Markdown

No WebSocket notifications schema changes detected.

@github-actions
Copy link
Copy Markdown

No GraphQL schema changes detected.

@github-actions
Copy link
Copy Markdown

No OpenAPI schema changes detected.

@github-actions
Copy link
Copy Markdown

CI build:
Integration tests pass ✅
Tests run: 46, Failures: 0, Errors: 0, Skipped: 1

https://github.com/cryostatio/cryostat/actions/runs/25071750931

@github-actions
Copy link
Copy Markdown

CI build:
Integration tests pass ✅
Tests run: 46, Failures: 0, Errors: 0, Skipped: 1

https://github.com/cryostatio/cryostat/actions/runs/25071921114

@andrewazores andrewazores reopened this Apr 28, 2026
@andrewazores andrewazores added needs-triage Needs thorough attention from code reviewers and removed needs-triage Needs thorough attention from code reviewers labels Apr 28, 2026
@andrewazores
Copy link
Copy Markdown
Member Author

@jtolentino1 re-approve please after the CI updater job

@andrewazores andrewazores merged commit cc94dac into cryostatio:main Apr 28, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants