AdminUI cluster-node editor was dead: HTTP 500 on load (InputNumber<byte>) + Save a silent no-op (NodeId regex forbids ':') #505
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while live-verifying the #499 guard, which lives on this page. Both defects are pre-existing on master and unrelated to that change. Fixed in
4cc0215bonfix/issues-503-501-493-499-488; filing this so the finding is recorded independently of the issue that happened to surface it./clusters/{clusterId}/nodes/{nodeId}and/clusters/{clusterId}/nodes/newwere completely non-functional.1. HTTP 500 on load
FormModel.ServiceLevelBasewas declaredbyteto matchClusterNode.ServiceLevelBase, and bound to<InputNumber>.InputNumber<T>'s static constructor throws forSystem.Byte:Unhandled inside
BuildRenderTree, so it takes the whole page, not one field — the same failure mode as #504. Blazor's supportedInputNumbertypes areint/long/short/float/double/decimal(and nullables);byteis not among them.Fix:
inton the form model with the same[Range(0, 255)], cast tobyteon the way to the entity. Stored type unchanged.2. Save did nothing at all, silently
NodeIdwas validated against^[A-Za-z0-9_-]+$— which forbids the colon. Every NodeId in this system ishost:port:ClusterRoleInfoandConfigPublishCoordinatorderive it frommember.Address.Host:Port, the docker-dev seed writescentral-1:4053, andNodeDeploymentState.NodeIdis FK-bound to it.So on every existing node, validation failed,
OnValidSubmitnever ran, and the Save button was inert.Fix:
^[A-Za-z0-9_.:-]+$(hostnames may also be dotted —line3-opc-a.plant.local:4053).3. Why nobody could tell — the missing
<ValidationSummary/>The form had a
<DataAnnotationsValidator />but nothing rendering its output, and no per-field<ValidationMessage>. A validation failure produced zero feedback: the button simply did nothing. That is how (2) stayed invisible, and it is the reason this is worth a separate issue rather than a footnote — the missing summary is a defect generator, not just a symptom. Added.Verification
Live on docker-dev, both central nodes rebuilt (
:9200round-robins the pair):/clusters/MAIN/nodes/central-1:4053and/clusters/MAIN/nodes/new, and it renders fully.DriverConfigOverridesJsonnow persists (confirmed in SQL). Rig restored afterwards.Worth following up
This page has no automated coverage that would have caught either defect — consistent with the standing note that the AdminUI has no bUnit. A cheap partial guard would be a reflection test asserting no
InputNumberin the codebase is bound to an unsupported numeric type; the silent-validation class is better handled by a convention that everyEditFormcarries aValidationSummary. Neither is done here.