<fix>[zwatch]: allow alarm labels sharing a key#4409
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 23 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (9)
📒 Files selected for processing (2)
Warning
|
|
Comment from yaohua.wu: Review: MR !10369 — ZSTAC-86538Background
Findings
Coverage
Test
Verdict: APPROVEDNo blocking findings in the reviewed diff. |
1. Why? Alarm labels were unique by alarm UUID and key, which blocked valid filters using the same field with different operators or values. 2. How? Relax the database constraint to a non-unique lookup index and keep error-code parameter mappings aligned with the full label tuple. 3. Side effects? Exact duplicate protection is handled in the zwatch API layer. # Summary of changes (by module): - conf/db: replace unique alarm label key index with lookup index - conf/i18n: align duplicate label error-code placeholders Related: ZSTAC-86538 Change-Id: I89c866ef6e763e1eac956f9573dd40ce0d81cb06
1b5c2fa to
5a14563
Compare
ZSTAC-86538
Root Cause
Alarm labels were constrained by alarm UUID and key in the database,
while the API error code already describes duplicates by key,
operator, and value. This blocked valid alarm filters that reuse the
same field with a different operator or value.
Changes
Test
mvn -o -P premium -pl premium/zwatch -am -DskipTests compilepassed.git diff --checkpassed in zstack and premium worktrees.jq emptypassed for modified i18n JSON files.mvn -o -P premium -pl premium/test-premium -am -Dtest=AlarmApiCase -Dclean ... testwas blocked before test execution by local MN startup:TransactionRequiredExceptioninGlobalConfigFacadeImpl;Tests run: 0.Related MRs
Related: ZSTAC-86538
sync from gitlab !10369