Skip to content

Serve lite mode without creating a KedroSession or DataCatalog #2661

Description

@jitu5

Parent issue: #2265
Depends on: #2659, #2660, #2687

Update: Runtime graph cutover belongs to #2659, and #2715/#2716 restored the existing node IDs. No ID migration, stale-link warning, fixture regeneration, or forced static-site re-export is required.

Summary

Make kedro viz run --lite use the inspection provider without creating a KedroSession, building a DataCatalog or dataset objects, or populating the live data repositories.

Inspection still bootstraps project configuration and imports pipeline definitions. Reuse the existing lite_import_stubs() helper so inspection can work when optional project dependencies are missing.

Scope

  • Short-circuit the live loader during --lite startup and install the inspection provider directly.
  • Reuse the static node lookup added in Route node metadata and static export through the inspection adapter #2660; do not create a second metadata implementation.
  • Keep resolved parameter values and typed --params overrides through the config loader.
  • Keep configuration/file-backed fields such as styles and stats when they do not require dataset construction.
  • Omit live-only preview fields cleanly instead of fabricating them.
  • Serve task code/filepath when the upstream Kedro node-source field is available; otherwise omit those optional fields without failing.
  • Define and test the lite-mode dataset_type contract. Raw catalog strings do not always match the existing frontend icon mapping, so either normalise supported types or explicitly document and test the generic-icon fallback.
  • Preserve --env, --pipeline, --params, run-status, and static-export behaviour.
  • Agree and test the behaviour of --lite --include-hooks (reject, warn/ignore, or another supported policy). Whatever is chosen, lite startup must not create a KedroSession.

Acceptance criteria

  • Tests prove KedroSession, live load_data, DataCatalog/dataset construction, and live repository population are not called in lite mode.
  • /api/main, valid pipeline views, /api/nodes/{id}, and /api/run-status remain coherent and use the same IDs as full mode.
  • Parameter values and typed runtime overrides are available in lite mode.
  • A project with missing optional dependencies can be inspected through lite_import_stubs().
  • Unknown pipeline and node IDs return 404.
  • Preview fields that require live objects are absent rather than misleading.
  • Dataset type/icon behaviour is explicit and covered for Plotly, Matplotlib, and a normal dataset.
  • The agreed --include-hooks behaviour is documented and tested.
  • Static export works from the provider in lite mode.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

Status
In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions