Skip to content

frontend: stop the reassignment wizard failing silently when the bandwidth throttle is set - #2644

Open
SpicyPete wants to merge 1 commit into
masterfrom
fix/wizard-submit-errors-and-settings-writes
Open

frontend: stop the reassignment wizard failing silently when the bandwidth throttle is set#2644
SpicyPete wants to merge 1 commit into
masterfrom
fix/wizard-submit-errors-and-settings-writes

Conversation

@SpicyPete

Copy link
Copy Markdown
Contributor

"Start Reassignment" fails silently whenever the bandwidth throttle is above the slider minimum

Found by @eblairmckee while testing #2639 against a 3-broker cluster, and pre-existing — none of these lines is a Chakra-exit hunk, so it is split out of that PR rather than folded into an approved swap. One file, three catch blocks.

The symptom

Click Start Reassignment with any throttle above the slider's minimum: a toast flashes for a fraction of a second, then nothing. No error, no alert, nothing in the console, and the wizard stays on step 3. Re-clicking behaves the same. The only way to submit is to drag the slider to its minimum.

Why it fails, and why it is silent

setTrafficLimit patches leader.replication.throttled.rate / follower.replication.throttled.rate per broker. Redpanda does not support per-broker property patches — it uses cluster config — so every broker comes back with an error, inside an HTTP 200:

PATCH /api/operations/configs → HTTP 200
{"patchedConfigs":[
  {"error":"INVALID_CONFIG: Setting broker properties on named brokers is unsupported","resourceName":"0","resourceType":4},
  {"error":"INVALID_CONFIG: Setting broker properties on named brokers is unsupported","resourceName":"1","resourceType":4},
  {"error":"INVALID_CONFIG: Setting broker properties on named brokers is unsupported","resourceName":"2","resourceType":4}]}

The code detects it correctly and then drops it, three layers deep:

  • setTrafficLimitcatch (_err) { closeToast(toastRef); return false; }. That closeToast is the flash: the loading toast opens, then closes.
  • startReassignmentif (!success) { return false; }, no message. Its own catch has the same shape.
  • onNextPageif (success) { … } with no else.

The sibling handler's copy even promises "See console for more information" while nothing was ever logged.

What this changes

Both catches surface the error and log it. The INVALID_CONFIG text is genuinely useful to an operator, so it is passed through rather than replaced with a generic string, and onNextPage's handler now logs the detail its own copy promises. No happy-path behaviour changes: every return false path already had a toast except these two.

Deliberately not here

Whether the throttle should be offered on Redpanda at all is a product call. It cannot work there, for every broker, every time — and this feature already branches on api.isRedpanda (the non-Redpanda warning under Active Reassignments), so disabling the slider with a short explanation is a small change. It would stop people reaching an unreachable path, but it is a product decision rather than a bug fix, so it is left alone here.

Gates

type:check clean · test:unit 882 · test:integration 1316 · lint:check on the changed file reports the same three pre-existing errors as master's copy of it (verified against a probe of origin/master), no net-new · bun run lint leaves the tree clean.

Not covered by a test: the failure needs a live Redpanda cluster to reproduce, and the change is error-path plumbing rather than logic. Verified by reading the response shape from @eblairmckee's repro above.

🤖 Generated with Claude Code

"Start Reassignment" did nothing visible whenever the bandwidth throttle was
above the slider minimum. Redpanda rejects per-broker property patches
("INVALID_CONFIG: Setting broker properties on named brokers is unsupported")
per resource inside an HTTP 200, so `setTrafficLimit` throws, and all three
layers dropped it: `catch (_err) { closeToast(toastRef); return false; }`,
then `if (!success) return false`, then `if (success) {…}` with no `else`.
The loading toast flashed and the wizard sat on step 3, with nothing in the
console either — while the sibling handler's copy promised "See console for
more information".

Both catches now surface the message, which is the part an operator needs,
and the handler that promises console detail logs. Whether the throttle should
be offered on Redpanda at all is a product call, left alone: it cannot work
there, and the codebase already branches on `api.isRedpanda` in this feature.

Reported on #2639 by a reviewer testing against a 3-broker cluster; pre-existing
rather than a Chakra-exit regression, so it is split out of that PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Clean — no registry drift, off-token colours, or ad-hoc classes

App: frontend · Scope: diff vs origin/master · Files: 1

Count
⚠️ Outdated registry components 0
🛠 Locally-modified components 0
❓ Unknown to registry 0
🎨 Off-token palette colours 0
🔢 Ad-hoc utility classes 0

Generated by lookout audit-changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant