The GitHub Actions job "CI" on rocketmq-dashboard.git/codex/metrics-typecheck 
has failed.
Run started by GitHub user tju-yxq (triggered by tju-yxq).

Head commit for run:
66da9bd33e7282ec5fd104246fcf50a69c74b223 / Yxq <[email protected]>
fix(web): type the MetricsExplorer test fixture against MetricData

The Frontend Build job fails on every PR targeting rocketmq-studio at the
typecheck step:

    src/components/__tests__/MetricsExplorer.test.tsx(516,38): error TS2353:
    Object literal may only specify known properties, and 'query' does not
    exist in type '{ cluster: string; node_id: string; }'

The `metricData` fixture is an untyped literal, so its `labels` property is
inferred as the concrete `{ cluster: string; node_id: string }` object type.
`createDeferred<typeof metricData>()` then locks `resolve()` to that narrowed
type, and the custom-query fixtures that add a `query` label (or any key
outside the two base ones) are rejected by the excess-property check — even
though the API contract is `labels: Record<string, string>`.

Annotate the fixture with `MetricData` so the deferred and every spread built
from the fixture are checked against the real contract instead of the
inferred literal shape. No runtime behavior changes.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/36883526830

With regards,
GitHub Actions via GitBox

Reply via email to