iloveeyjafjalla opened a new issue, #6731: URL: https://github.com/apache/rocketmq-dashboard/issues/6731
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `master` branch, or I have stated the exact version I am running below. ### Studio Version branch: rocketmq-studio git commit id: 7d8f1936 fix(metrics): prevent pending queries from restoring cleared history (#6394) deployed as: built from source (web/ with npm run build) ### Runtime Environment OS: Windows 11 24H2 Node.js 20.19.5, running npm from the repo's web/ directory browser: not applicable (build-time issue) ### Connected RocketMQ Cluster not applicable - the failure is in the frontend type check, no cluster involved ### Build Toolchain Node.js 20.19.5 plus the TypeScript version from web/package.json; no Maven or JDK needed for this check ### Describe the Bug The frontend build no longer type-checks on rocketmq-studio. web/package.json builds with "tsc -b && vite build", and since #6367 (0e73d289) the test web/src/pages/ops/__tests__/auditRiskInsights.test.ts passes operator: null for its "keeps a missing operator distinct from one literally named system" case, while AuditRecord.operator in web/src/api/ops.ts is typed as a non-null string. tsc reports two errors, so npm run build stops before it can run vite build. The column is nullable in the schema (rmq_operation_audit.operator varchar(128) NULL) and every renderer already falls back on a missing operator, so the type is what went stale, not the test: - web/src/pages/ops/AuditRiskInsights.tsx: operator: issue.operator ?? '-' - web/src/pages/ops/ResourceOperationTimelineModal.tsx: record.operator || '-' - web/src/pages/ops/audit.tsx: sorter: (a, b) => (a.operator ?? '').localeCompare(b.operator ?? '') ### Steps to Reproduce 1. Fetch apache/rocketmq-dashboard and check out rocketmq-studio. 2. cd web && npm install 3. npx tsc -b (npm run build runs the same step first) ### What Did You Expect to See? tsc -b to pass so the build can continue with vite build. ### What Did You See Instead? tsc -b exits 1 with: src/pages/ops/__tests__/auditRiskInsights.test.ts(193,23): error TS2322: Type 'null' is not assignable to type 'string | undefined'. src/pages/ops/__tests__/auditRiskInsights.test.ts(195,23): error TS2322: Type 'null' is not assignable to type 'string | undefined'. ### Additional Context Reproduced on 7d8f1936 with Node 20.19.5 on Windows 11: "cd web && npx tsc -b" prints those two TS2322 errors and exits 1, so "npm run build" (= tsc -b && vite build && npm run license:check) never reaches vite build. git log -1 --format='%h %ad %an %s' --date=iso -- web/src/pages/ops/__tests__/auditRiskInsights.test.ts 0e73d289 2026-10-15 02:53:20 -0700 zmuxuny fix(web): keep failed loads and stale scope from corrupting page state (#6367) The type has read "operator: string" since the initial frontend commit 0c95da2a, so the regression is the freshly merged test meeting the older type. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
