Repository navigation
Commit ac60411
committed
fix(gooddata-sdk): keep isHiddenFromKda on declarative metrics
CatalogDeclarativeMetric did not declare is_hidden_from_kda. The
generated DeclarativeMetric gained the field when the API client was
regenerated, but the SDK attrs class was not updated, and cattrs drops
keys a class does not declare. So loading a metric layout from disk or
the server lost the flag silently, and every SDK put sent the metric
without it: a git deploy could never set it, and a load-then-put wiped
a flag set in the UI.
Declare the field on the metric class only; the other analytics
classes share CatalogAnalyticsBase but their generated models have no
such field. An unset field stays None and is not sent, so existing
layouts and cassettes are unchanged. A round-trip test covers true,
false and an absent key through disk and to_api().
jira: GDAI-2630
risk: low1 parent 9e9ffae commit ac60411
2 files changed
Lines changed: 36 additions & 0 deletions
File tree
- packages/gooddata-sdk
- src/gooddata_sdk/catalog/workspace/declarative_model/workspace/analytics_model
- tests/catalog/unit_tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments