You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Loyal-Young (via GitHub)" <gi...@apache.org> on 2026/09/29 20:37:21 UTC
[PR] fix(metrics): isolate query history by account [rocketmq-dashboard]
Loyal-Young opened a new pull request, #5183:
URL: https://github.com/apache/rocketmq-dashboard/pull/5183
## What changed
- Store Metrics Explorer query history under an account-scoped key. Reads, writes, and clearing now target the current user ID (or username when no ID is available).
- Discard the old unowned key so its entries cannot be assigned to the next account that opens the page.
- Keep history state associated with its owner while the component remains mounted. A late query callback writes under the account that started it, while the currently visible drawer uses the current account's history.
- Update component fixtures and add regression tests for account isolation, legacy data, and a mounted account switch.
Fixes #5182.
## Verification
- Reproduced Bob reading Alice's history with a failing test on the previous implementation.
- `npx vitest run src/utils/metricsExplorerDiagnostics.test.ts src/components/__tests__/MetricsExplorer.test.tsx` — 40 passed.
- `npx tsc -b` — passed.
- `npx eslint src/utils/metricsExplorerDiagnostics.ts src/utils/metricsExplorerDiagnostics.test.ts src/components/MetricsExplorer.tsx src/components/__tests__/MetricsExplorer.test.tsx` — passed.
- `git diff --check` — passed.
Unowned history from older versions cannot be safely attributed to an account, so it is intentionally discarded. The touched existing files already fail the repository's Prettier check on unmodified `master`.
## AI assistance
An AI assistant helped trace the history storage and component state paths, draft the owner-scoped change, and write the regression tests. The cross-account read was observed before the fix, and the checks above were run afterward.
--
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(metrics): isolate query history by account [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #5183: fix(metrics): isolate query history by account
URL: https://github.com/apache/rocketmq-dashboard/pull/5183
--
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(metrics): isolate query history by account [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5183:
URL: https://github.com/apache/rocketmq-dashboard/pull/5183#issuecomment-6027994103
This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.
--
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