Commit 71d882c
fix(model-apps): dashboard chart tiles emitted ChartId, which the platform rejects
Found by a live build against a real environment. A chart tile set
`parameters.ChartId`, and the platform validates dashboard FormXML against a
schema that enumerates the legal children of `<parameters>`:
The element 'parameters' has invalid child element 'ChartId'. List of possible
elements expected: 'ViewId, IsUserView, ... VisualizationId, ...'
So any spec with a chart tile failed the entire `dashboards` phase with a 400.
The correct name is `VisualizationId` — which `download-model-app.js` already
reads, so a dashboard could not round-trip through download -> rebuild either.
Build wrote one name and download looked for the other.
Pre-existing, not a regression from the SDK uptake: `parameters.ChartId` is on
origin/main and dates from the original plugin commit, and this branch had not
touched that function.
Why 1599 tests passed while a real build failed: `sdk-build.test.js` asserted
`chart.parameters.ChartId` — the suite had encoded the wrong wire name, so it
agreed with the bug. A mock cannot validate FormXML against the platform schema,
so the assertion now pins the NAME explicitly and also asserts that `ChartId` is
not emitted, which is the half that would have caught this.
Live-proven: the same spec that failed the dashboards phase now completes
`build complete - 16 created, 0 failed (27 steps)`, and the deployed dashboard
reads back with 3 tiles, 2 VisualizationId and 0 ChartId.
Also documents that teardown deliberately leaves the publisher behind — a
publisher can own other solutions, so deleting it is not this app's decision,
the same fail-safe reasoning that keeps an `external` web resource. It is the
one artifact that legitimately survives a clean teardown.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 42626da2-b66f-4162-acaa-b1127ef23d891 parent 7983f92 commit 71d882c
4 files changed
Lines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
926 | 930 | | |
927 | 931 | | |
928 | 932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
132 | 144 | | |
133 | 145 | | |
134 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
145 | 153 | | |
146 | | - | |
| 154 | + | |
147 | 155 | | |
148 | 156 | | |
149 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
971 | 977 | | |
972 | 978 | | |
973 | 979 | | |
| |||
0 commit comments