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

[PR] fix(mock): reject exports of missing alert rule assets [rocketmq-dashboard]

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

   ### Which Issue(s) This PR Fixes
   
   - Resubmission of #1924 (closed during the August branch-rebase sweep, with an invitation to resubmit against the current branch). Original report: #1917, closed as not planned — the defect is still present on the current `rocketmq-studio` tip.
   
   ### Brief Description
   
   In mock mode, `exportAlertRuleAsset()` converted a failed lookup into an **empty** YAML `Blob`, so exporting a stale/unknown asset silently downloaded an empty file. The preview path (`getAlertRuleAsset`) and the real server contract (`GET /alert-rule-assets/{name}/export`, which answers 404 for unknown names) both surface not-found.
   
   Consolidate both mock paths on one fail-fast lookup that throws for unknown assets, and cover the export case with a regression test.
   
   ### How Did You Test This Change?
   
   ```text
   $ cd web && npx vitest run src/services/alertRuleAssetService.test.ts
    Test Files  1 passed (1)
         Tests  9 passed (9)
   $ npx eslint src/services/alertRuleAssetService.ts src/services/alertRuleAssetService.test.ts   # clean
   ```
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits
   - [x] Tests added or updated for non-trivial changes
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` (no new UI text)
   - [x] Architecture constraints stay green (frontend mock layer only)
   - [x] New source files carry the ASF license header (no new files)
   - [x] Documentation touched where behaviour changed (mock now matches the documented 404 contract)
   


-- 
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(mock): reject exports of missing alert rule assets [rocketmq-dashboard]

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

   Thanks — this is merged, as part of [`f4c3f04c1`](https://github.com/apache/rocketmq-dashboard/commit/f4c3f04c1f53ada7829824867850fce21b4efaa2) on `rocketmq-studio`.
   
   Your change went in together with #6044 and #6043 — all yours, all in the same area — so we folded them into a single commit instead of landing several near-identical entries for the same subsystem. Nothing was dropped.
   
   The commit message calls this one out explicitly:
   
   > #6042 `web/src/services/alertRuleAssetService.ts:35` resolves an empty YAML Blob from the mock
   
   Closing as folded, not rejected.
   


-- 
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(mock): reject exports of missing alert rule assets [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #6042: fix(mock): reject exports of missing alert rule assets
URL: https://github.com/apache/rocketmq-dashboard/pull/6042


-- 
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