You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "iloveeyjafjalla (via GitHub)" <gi...@apache.org> on 2026/10/11 22:40:09 UTC

[PR] fix(alert): invalidate test results when criteria change [rocketmq-dashboard]

iloveeyjafjalla opened a new pull request, #6297:
URL: https://github.com/apache/rocketmq-dashboard/pull/6297

   ### Which Issue(s) This PR Fixes
   
   The accompanying bug report will be linked immediately after PR creation.
   
   ### Brief Description
   
   In the same rule editor, run a consumer-lag rule with threshold 1000, then change it to 2000. The old result can still show value 1200 as Matched, although it was evaluated against the previous threshold. A pending old test can also restore that result after the edit.
   
   Invalidate completed/in-flight test results when evaluation criteria change. Guard validation, response, error feedback and loading completion with the current test generation, so an obsolete request cannot overwrite a new run. Keep results when only metadata such as the rule name changes. Also invalidate when metric-capability loading programmatically clears the metric or converts a legacy ratio threshold, since those updates do not trigger Form's change callback.
   
   This addresses criteria changes inside one editor; existing separate editor/domain lifecycle work in #4583/#4584 and #6185/#6190 is not reimplemented here.
   
   ### How Did You Test This Change?
   
   Baseline: `rocketmq-studio@5e4c39b053c35a5598cc79ff331b8a54e649d7b1`; final commit `5e29bc56012bd40d021cff3a087b40503a704377`. Windows 11, Node 24.15.0, npm 11.12.1; isolated LF worktrees sharing existing npm-ci dependencies by junction.
   
   - Same final test on unchanged production: real BUSINESS editor, ordinary `consumer.lag.total` rule `>1000 messages`, valid available group sample 1200/Matched, actual threshold input changed to 2000. Completed and pending-result regressions fail at the still-visible old result table. Unchanged-criteria and rule-name-edit controls pass: 2 failed, 2 passed, 3 unrelated skipped.
   - Complete related suites: AlertsTestResultResidue, AlertsPage, alerts helpers, alertRulePayload, opsService and ops API — 6 files, 85/85 pass. Covers changed/completed and changed/pending results, metadata preservation, and old success/failure settling while the new test remains loading and later displays its own Not matched result.
   - `npm run lint`: exit 0, zero errors and ten pre-existing warnings in unchanged code sections. Changed-file Prettier and `git diff --check` pass.
   - `npm run build`: exit 0, including the license gate (133 components / 140 legal files).
   
   No full frontend suite, Java/Go tests, real broker/database collection, alert delivery or deployment was run for this change; no remote CI pass is claimed. Samples and API completion are controlled at the ordinary frontend service boundary; conditions are not recalculated by the frontend.
   
   AI assistance: OpenAI Codex investigated, implemented and tested the change. Independent automated agents read the actual source/diff, real red/green evidence and current related public head patches/comments. No human/maintainer approval is claimed.
   
   ### Checklist
   
   - [x] One coherent fix and meaningful real-component regressions/controls
   - [x] Conventional Commit subject and new `Test` names
   - [x] Existing ASF headers retained; no new source files
   - [x] New UI wording / documentation: N/A
   - [ ] Java architecture/integration checks: not run, no backend change
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(alert): invalidate test results when criteria change [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #6297: fix(alert): invalidate test results when criteria change
URL: https://github.com/apache/rocketmq-dashboard/pull/6297


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(alert): invalidate test results when criteria change [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #6297:
URL: https://github.com/apache/rocketmq-dashboard/pull/6297#issuecomment-6441468300

   Merged as part of #6851 - squashed into `rocketmq-studio` as `da2513c9f`.
   
   Your change here (invalidating a dry-run result when any of the 13 criteria fields change, plus a generation guard on `handleTest`. While landing it we routed the five remaining `setTestResult(null)` clears through `invalidateTestResult()` as well, so an in-flight response from an older edit cannot repopulate the panel, and dropped the ratio block that #6920 had already moved into `legacyRatioThresholdForEditor` - keeping it would have converted the threshold twice.) is included.
   
   We grouped 11 of your related fixes into a single commit so the trunk history stays reviewable; the other PRs in the group are closed with the same note. Everything was cherry-picked onto the current baseline with you kept as the author, and your tests came along with the change - the combined branch runs 4143 backend tests and 2009 frontend tests green, with the catalog, license and lint gates clean.
   
   Where the note above says "we", that part was added while landing the batch; the rest is yours unchanged. Thanks for the consistently well-tested patches.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org