ROX-32721: Add deployment_type and enforcement_count columns to alerts#20030
Draft
dashrews78 wants to merge 3 commits intodashrews/list-alert-v2-32721from
Draft
ROX-32721: Add deployment_type and enforcement_count columns to alerts#20030dashrews78 wants to merge 3 commits intodashrews/list-alert-v2-32721from
dashrews78 wants to merge 3 commits intodashrews/list-alert-v2-32721from
Conversation
Add search tags to Alert.Deployment.type and Alert.Enforcement.action, and add a new enforcement_count field (tag 25) to the Alert proto. This promotes deployment_type to a queryable column and caches the computed enforcement count so ListAlert queries can avoid deserializing the full alert blob. Write path (updateAlertNoLock) now computes enforcement_count on every upsert to keep the column and serialized blob consistent. The store INSERT and COPY statements include both new columns. The search tag on Enforcement.action is renamed from "Enforcement" to "Enforcement Action" for clarity. The old "Enforcement" label is retained for backward compatibility. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
Contributor
🚀 Build Images ReadyImages are ready for commit 9287d8c. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-662-g9287d8cb91 |
Add enforcement_count to proto.lock (was missing from initial commit) and update GetJSONSerializedTestAlertWithDefaults fixture to include the new enforcementCount field in the expected JSON output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dashrews/list-alert-v2-32721 #20030 +/- ##
=============================================================
Coverage 49.61% 49.61%
=============================================================
Files 2765 2765
Lines 208686 208707 +21
=============================================================
+ Hits 103535 103548 +13
- Misses 97487 97497 +10
+ Partials 7664 7662 -2
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.
Add search tags to Alert.Deployment.type and Alert.Enforcement.action,
and add a new enforcement_count field (tag 25) to the Alert proto.
This promotes deployment_type to a queryable column and caches the
computed enforcement count so ListAlert queries can avoid deserializing
the full alert blob.
Write path (updateAlertNoLock) now computes enforcement_count on every
upsert to keep the column and serialized blob consistent. The store
INSERT and COPY statements include both new columns.
The search tag on Enforcement.action is renamed from "Enforcement" to
"Enforcement Action" for clarity. The old "Enforcement" label is
retained for backward compatibility.
Partially generated by AI.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Description
change me!
User-facing documentation
Testing and quality
Automated testing
How I validated my change
change me!