ai-yang opened a new issue, #754:
URL: https://github.com/apache/rocketmq-dashboard/issues/754

   ## Affected branch
   
   `rocketmq-studio` at `bbf1b7e0cf25a5065ba049b5450cc8155569f710`.
   
   ## Current behavior
   
   The repository's only GitHub Actions workflow installs the Studio frontend 
dependencies and runs `npm run build`. The frontend Docker image also runs only 
`npm ci` and `npm run build`.
   
   However, `web/package.json` defines three independent commands:
   
   - `build`: `tsc -b && vite build`
   - `test`: `vitest run`
   - `lint`: `eslint .`
   
   Neither TypeScript/Vite compilation nor the Docker build executes the Vitest 
suite or ESLint, so a pull request can have failing behavior assertions or lint 
errors while every configured frontend check remains green.
   
   ## Confirmed impact
   
   This has already allowed broken tests to reach `rocketmq-studio`:
   
   - PR #479 added a BrokerCluster page that rendered `Broker 集群` / `创建集群`, 
while its tests asserted `RocketMQ 集群` / `新建集群`. Its `Frontend Build (Node 20)` 
check succeeded and the PR was merged.
   - PR #474 added an audit-log mock using `data.list` while asserting 
`result.items`; its frontend build check also succeeded and the PR was merged.
   - PR #498 later corrected both sets of baseline assertions. Although that PR 
reports manual `npm test`, `npm run lint`, and `npm run build` verification, 
its required check rollup contained only backend and frontend build jobs.
   
   The current Node 20 baseline is healthy (63 Vitest files / 265 tests; ESLint 
0 errors with 4 existing warnings; production build succeeds), so test and lint 
error gates can be enabled without first repairing a red baseline. The existing 
warnings mean this issue should not implicitly require `--max-warnings=0`; 
warning policy can be decided separately.
   
   ## Controlled reproduction
   
   On the latest unmodified `rocketmq-studio` baseline, I added two 
research-only sentinels that are not part of any proposed commit:
   
   - a Vitest assertion that deliberately fails whenever Vitest executes; and
   - a TypeScript file containing `debugger`, which the current ESLint 
configuration reports as a `no-debugger` error.
   
   Under Node 20:
   
   - the sentinel Vitest failed in 5/5 isolated processes at the intended 
assertion;
   - `npm run lint` failed with exactly 1 error (plus the 4 existing warnings); 
but
   - the workflow's current `npm run build` command still succeeded and 
transformed 7,979 modules while both sentinels were present.
   
   This directly demonstrates that the configured frontend build check does not 
execute either existing quality gate. The research-only files remain untracked 
and must never be committed.
   
   ## Expected behavior
   
   Pull requests targeting `rocketmq-studio` should be unable to pass CI when:
   
   1. `npm test` fails; or
   2. `npm run lint` reports an error.
   
   The existing production build and frontend Docker build coverage should 
remain in place.
   
   ## Proposed CI change
   
   After `npm ci`, run the existing package scripts under Node 20:
   
   ```text
   npm test
   npm run lint
   npm run build
   ```
   
   These may be steps in the current frontend job or separate named jobs. 
Separate jobs improve failure visibility and parallelism, while adding steps 
preserves the existing required-check name. Maintainer guidance is requested 
before changing workflow/check names because branch-protection configuration is 
outside the repository and cannot be inferred from the YAML.
   
   ## Acceptance criteria
   
   - A deliberately failing Vitest assertion makes the frontend CI fail.
   - An ESLint error makes the frontend CI fail.
   - The current `rocketmq-studio` baseline passes both commands.
   - `Frontend Build (Node 20)` and `Frontend Docker Build` coverage is 
retained.
   - Existing lint warnings are reported but do not become failures unless 
maintainers explicitly choose a zero-warning policy.
   
   ## Scope
   
   This issue is limited to the Studio frontend test and lint gates. The 
backend workflow's test policy can be discussed separately to keep this change 
atomic.
   
   Dedupe note (refreshed 2026-08-02): immediate searches across open/closed 
issues and open/closed/merged PRs for CI/workflow/frontend 
tests/Vitest/ESLint/npm test/npm lint found no equivalent or claimed work. #430 
created the compile-only workflow; #500 added only the Docker build; #498 
changed tests, not CI.
   


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

Reply via email to