Skip to content

SceneDataTransformer: getResolvedSystemTransformations() returns a shape every consumer has to unwrap #1628

Description

@gtk-grafana

Entries come back as SystemTransformation — the registered entry plus origin/position. For a
DataTransformerConfig that is harmless, since the extra keys are ignored by transformDataFrame and
by readers.

The custom-operator case is not. A registered CustomTransformOperator (a function) comes back as
{ operator, topic }, which transformDataFrame will not take and which sends any "is this entry a
function or a config" branch — picking a display name, say — down the wrong path.

So every consumer writes the same unwrap. In Grafana it is most of a module, plus a WeakMap keyed on
the object scenes returned, because the unwrapped arrays are React effect deps and rebuilding them per
render would resubscribe every editor row (grafana/grafana#131174).

Asks:

  1. Return the entries as registered, or expose a companion that does, so the result can go straight to
    transformDataFrame. If the tags must travel, { transformation, origin, position } with the
    original entry intact would also do it.
  2. Document the returned object's per-pass identity stability as contract — React consumers have no
    other way to keep effect deps stable and are relying on it already.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions