The GitHub Actions job "CI" on 
rocketmq-dashboard.git/fix/broker-config-dialog-live-values has failed.
Run started by GitHub user unbridled-41 (triggered by unbridled-41).

Head commit for run:
5737a1bd8b95a2851fae1c4cbd800ad28ea2791f / unbridled-41 
<[email protected]>
fix(cluster): read the live broker config before the dialog may submit it

The Broker tab is fed by GET /clusters/registry, which reports topology only:
RocketMQClusterProvider.buildClusterVO builds name/type/status/brokers/proxies/
nameServers/tpsHistory/topicCount/groupCount and never sets config, so every row
of that tab carries config: null (ClusterVO.config has no builder default).
handleConfigOpen turned the missing config into concrete values through "??"
fallbacks - ASYNC_FLUSH, 4194304 bytes, 72 h, 8 write / 8 read queues,
permission 6, both auto-create switches off - and buildConfigUpdateRequest
spread them into the request that ClusterService.applyConfig applies to *every
broker of the cluster*. Opening the dialog and pressing 确定 without touching a
field therefore rewrote eight live broker settings (durability, retention,
message size, queue counts, permission, auto-create) with values the operator
never chose, and persisted them in Studio's own record.

The data exists: GET /clusters/{id} runs the same enrichWithLiveConfig the
instance-scoped list uses, which is why the sibling "配置差异" dialog on the same
row can show the real values.

Load that detail when the dialog opens (the row's config is still used as the
immediate fill when it is present, so nothing changes for the instance-scoped
list), fill the form from the live config, and when no config can be read at all
show the reason and disable 确定 instead of offering a form that would invent
one.

Tests (web/): npx vitest run src/pages/cluster/__tests__/ClusterPage.test.tsx
- new case "fills the broker config dialog from the live cluster detail, not 
from
  fabricated defaults" (row without config + live detail SYNC_FLUSH/168h) fails
  before this change (the dialog showed the 72 h fallback and never asked for 
the
  detail) and passes after it.
- new case "refuses to edit a broker config it could not read instead of
  submitting defaults" fails before (no reason shown, 确定 enabled) and passes
  after it.
- 32 tests in ClusterPage.test.tsx pass; npx eslint reports no errors;
  npx tsc -b passes.

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

With regards,
GitHub Actions via GitBox

Reply via email to