mirror of
https://github.com/apache/superset.git
synced 2026-07-12 17:55:38 +00:00
Breaking change to the (still-unmerged) activity-view JSON contract: ``entity_kind`` now emits ``"dashboard"`` / ``"chart"`` / ``"dataset"`` instead of the Python class names ``"Dashboard"`` / ``"Slice"`` / ``"SqlaTable"``. The class names are developer-facing artifacts that leaked the model layer (e.g. ``"Slice"`` predates the UI rename to "chart"; ``"SqlaTable"`` predates "dataset"). User-facing JSON should speak user language. Implementation: a new ``_USER_FACING_KIND`` map translates at JSON serialization time only (in ``_decorate_records``). Internal code keeps the Python class-name form (``model_cls.__name__``) for dispatch — the existing ``_NAME_COLUMN``, ``_NOT_FOUND_EXC``, ``_API_KIND_LABEL``, ``_can_read``, ``_compute_impact``, etc. all key off class names and are unchanged. The translation happens at the single ``record["entity_kind"] = ...`` assignment. Schema validator ``ACTIVITY_ENTITY_KINDS`` updated to the new tuple. Integration tests' response-shape assertions renamed via bulk sed; unit tests testing internal helpers are unchanged (they operate on internal api_kind / class names). UPDATING.md example payload updated. Spec updates (spec.md, data-model.md, contracts/activity-view.yaml) committed separately to the spec repo. Full suite: 66 unit + 35 integration + 1 xfailed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
42 KiB
42 KiB