ROX-33596: Use view for failingDeployments#19420
Open
dashrews78 wants to merge 2 commits intomasterfrom
Open
Conversation
…ents failingDeployments called SearchListAlerts to get full Alert blobs (~40KB each) only to extract deployment IDs. Replace with a SQL column projection that reads only the deployment_id inline column, avoiding TOAST I/O. - Add DeploymentIDResult view struct with nullable pointer and getter - Add SearchAlertDeploymentIDs to DataStore interface and implementation - Update failingDeployments resolver to use the new projection method - Remove unnecessary violation time sort and manual ID extraction loop - Add integration tests: basic flow, deduplication, multiple deployments, and NULL handling for resource alerts Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
Use Distinct() on the query select so Postgres handles deduplication instead of maintaining a seen-map in Go. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Images are ready for the commit at c55c085. To use with deploy scripts, first |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19420 +/- ##
==========================================
+ Coverage 49.70% 49.72% +0.01%
==========================================
Files 2701 2701
Lines 203453 203471 +18
==========================================
+ Hits 101134 101170 +36
+ Misses 94790 94776 -14
+ Partials 7529 7525 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
failingDeployments called SearchListAlerts to get full Alert blobs (~40KB
each) only to extract deployment IDs. Replace with a SQL column projection
that reads only the deployment_id inline column, avoiding TOAST I/O.
and NULL handling for resource alerts
Partially generated by AI.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
User-facing documentation
Testing and quality
Automated testing
How I validated my change
CI and UT should be good for this one.