Skip to content
Open
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6cf9c4b
Foundations: snapshot loader, node-ID scheme, parity harness (#2689)
jitu5 Jul 9, 2026
e268bc2
Graph builder: main graph from the inspection snapshot (#2697)
jitu5 Jul 16, 2026
f0695da
Layers: dataset layers from the inspection snapshot (#2700)
jitu5 Jul 30, 2026
28f35cd
Adopt `NodeSnapshot.func_name` from Snapshot (#2716)
jitu5 Aug 5, 2026
2fa59ef
Build modular pipelines from the inspection snapshot (#2726)
jitu5 Aug 13, 2026
4eee2fd
Populate graph nodes with parameter values (#2736)
ravi-kumar-pilla Aug 31, 2026
23f7fd6
Serve `/api/main` and `/api/pipelines/{id}` from the inspection snaps…
jitu5 Sep 2, 2026
9ae2e4c
Load shared inspection inputs at the project context boundary (#2763)
jitu5 Sep 10, 2026
c949196
Prepare project enrichment through one inspection loader (#2764)
jitu5 Sep 16, 2026
35850cc
Build static node metadata from shared inspection inputs (#2765)
jitu5 Sep 17, 2026
c4bbfb4
Remove unused inspection node metadata preparation (#2772)
jitu5 Sep 18, 2026
0fd1072
Serve run status from the project context (#2773)
jitu5 Sep 22, 2026
5d07b0d
Live load deferred for metadata (#2774)
ravi-kumar-pilla Sep 22, 2026
66c6814
Forward --params runtime overrides to the inspection snapshot (#2778)
jitu5 Sep 23, 2026
9ee2942
Lite mode for inspection (#2777)
ravi-kumar-pilla Sep 24, 2026
252a568
Restructured inspection hierarchy (#2780)
ravi-kumar-pilla Sep 24, 2026
9aa5a26
Restructure integration package (#2781)
ravi-kumar-pilla Sep 24, 2026
8b93995
merge main
ravi-kumar-pilla Sep 24, 2026
14267f9
address security concern
ravi-kumar-pilla Sep 24, 2026
9bae514
fix CI
ravi-kumar-pilla Sep 25, 2026
df91621
Merge branch 'main' into feat/backend_v2
ravi-kumar-pilla Sep 28, 2026
0fc8772
Remove parity baseline tests before merging to main (#2785)
jitu5 Sep 29, 2026
93938a4
merge main
ravi-kumar-pilla Sep 29, 2026
a7b9fa2
update release notes
ravi-kumar-pilla Sep 29, 2026
c2fe4c0
fix vale
ravi-kumar-pilla Sep 29, 2026
f1e99b2
fix cypress flaky tests
ravi-kumar-pilla Sep 29, 2026
2370ebe
fix cypress flaky tests
ravi-kumar-pilla Sep 29, 2026
bc5d6de
fix flaky tests
ravi-kumar-pilla Sep 29, 2026
d7251cb
Update backend architecture (#2788)
ravi-kumar-pilla Oct 1, 2026
c58999b
Merge branch 'main' into feat/backend_v2
ravi-kumar-pilla Oct 1, 2026
8c869d3
Merge branch 'main' into feat/backend_v2
ravi-kumar-pilla Oct 1, 2026
5db17a9
merge main
ravi-kumar-pilla Oct 2, 2026
b2338ef
Merge branch 'main' into feat/backend_v2
jitu5 Oct 21, 2026
dc79726
Encode non-JSON parameter values in the snapshot graph
jitu5 Oct 21, 2026
810c346
Keep task IDs stable for nodes built from callable objects
jitu5 Oct 21, 2026
7c04f30
Build node metadata on the event loop, not in the threadpool
jitu5 Oct 21, 2026
9fc1930
Honour KEDRO_ENV when reading the inspection snapshot
jitu5 Oct 21, 2026
87c88c6
Report a failed deferred project load on the CLI
jitu5 Oct 21, 2026
bf57d0e
Separate breaking changes in the 13.0.0 release notes
jitu5 Oct 21, 2026
6d6232f
Correct the load_and_populate_data docstring
jitu5 Oct 21, 2026
8861947
Report an e2e startup timeout instead of a KeyError
jitu5 Oct 21, 2026
0e31650
Note the node-ID exception in the architecture overview
jitu5 Oct 21, 2026
d91a2c8
Normalise only the function name in live task IDs
jitu5 Oct 21, 2026
998e9b8
Mask typed secret parameters in the snapshot graph
jitu5 Oct 21, 2026
6f652cb
Restore CRLF line endings in modular_pipelines.py
jitu5 Oct 21, 2026
5fe76b2
Bootstrap the project once when reading inspection inputs
jitu5 Oct 22, 2026
7fe4ee9
Clarify shared bootstrap in inspection input docstring
jitu5 Oct 22, 2026
559cc90
Merge branch 'main' into feat/backend_v2
jitu5 Oct 27, 2026
5a1f8d5
Merge branch 'main' into feat/backend_v2
jitu5 Oct 30, 2026
7c05f0c
Merge branch 'main' into feat/backend_v2
jitu5 Nov 11, 2026
af74ec0
Merge remote-tracking branch 'origin/main' into feat/backend_v2
jitu5 Nov 24, 2026
19e062a
Merge remote-tracking branch 'origin/main' into feat/backend_v2
jitu5 Nov 30, 2026
220b26d
Restore the Upcoming Release heading in RELEASE.md
jitu5 Dec 1, 2026
a328247
Resolve flat dotted parameter keys in the snapshot graph
jitu5 Dec 1, 2026
4a5a423
Keep DatasetStatsHook importable from its pre-13.0.0 path
jitu5 Dec 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Install Kedro and other Python Dependencies
description: Installs Kedro from the main branch and other Python dependencies, then prints the Python version and installed packages.
description: Installs the project requirements, including the supported Kedro requirement, then prints the Python version and installed packages.
runs:
using: composite
steps:
Expand All @@ -9,7 +9,6 @@ runs:
shell: bash
- name: Install Python dependencies
run: |-
uv pip install --system git+https://github.com/kedro-org/kedro@main
uv pip install --system -r package/test_requirements.txt -r demo-project/src/docker_requirements.txt -U
shell: bash
- name: Echo package versions
Expand Down
Binary file modified .github/img/backend-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion .github/styles/Kedro-viz/ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ Plotly
Pylint
Astro
Xebia
pytest
pytest
VSCode
serialisable
1 change: 1 addition & 0 deletions .github/styles/Kedro-viz/ukspelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ exceptions:
- dialog
- log
- maize
- NotebookVisualizer
- prize
- seize
- size
Expand Down
71 changes: 69 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For further information, see also:

- [Kedro-Viz contributing documentation](CONTRIBUTING.md), which covers how to start development on the project
- [Kedro-Viz style guide](STYLE_GUIDE.md), which walks through our standards and recommended best practices for our codebase
- [Kedro-Viz Architecture Diagram](https://miro.com/app/board/uXjVKhNg1RE=/?moveToWidget=3458764606468376036&cot=10), to see a high level overview of both back-end and front-end and how they are connected.
- [Kedro-Viz Architecture Diagram](https://miro.com/app/board/uXjVKhNg1RE=/?moveToWidget=3458764685599765471&cot=14), to see a high level overview of both back-end and front-end and how they are connected.

## High-level Overview

Expand Down Expand Up @@ -137,4 +137,71 @@ The app uses [redux-watch](https://github.com/ExodusMovement/redux-watch) with a

![Kedro-Viz backend architecture](/.github/img/backend-architecture.png)

The backend of Kedro-Viz serves as the data provider and API layer that interacts with Kedro projects and manages data access for visualisations in the frontend. It offers REST API to support data retrieval for the frontend, allowing access to pipeline structures and node-specific details. Key components include the `DataAccessManager`, which interfaces with data `Repositories` to fetch and structure data. The CLI enables users launch with Kedro-Viz from the command line, while deploy and build options enables seamless sharing of pipeline visualisations on any static website hosting platform.
The backend of Kedro-Viz is the data provider and API layer that interacts with Kedro projects and manages data access for visualisations in the frontend. It offers a REST API to support data retrieval for the frontend, giving access to pipeline structures and details about individual nodes. The CLI enables users to launch Kedro-Viz from the command line. Deploy and build options enable sharing of pipeline visualisations on any static website hosting platform.

The backend answers its REST API from two paths, one for reading a project as data and one for reading a project as a running system. Both paths return the same response shapes, so the frontend and the rest of the API surface do not need to know which path answered a given request.

### Inspection path

The inspection path treats a project as data. Kedro produces a snapshot of a project: a serialisable structure covering its pipelines, nodes, datasets, and parameters. The backend builds its graph, layers, and modular pipeline tree from that snapshot, the resolved configuration, and extras loaded from files such as dataset statistics. It does this without holding a live pipeline or catalog in memory. This is the primary path, and it answers most requests: `/api/main`, `/api/pipelines/{id}`, and `/api/run-status`. Run status is served from this same path, but not from the snapshot: it comes from a run events file that hooks record while a pipeline runs.

Each project served this way owns a context: an object that holds the snapshot together with the graph and run status services built on it. The server creates this context a single time per project at startup. Passing this context explicitly, rather than reading it from shared global state, keeps those services isolated. More than one project can be served from the same process without state from one leaking into another. Node metadata and static export, described in the live path below, do not yet share this isolation. They still read from state the process sets up a single time and shares across every project.

Lite mode is a variant of this same path, for projects with dependencies that cannot be imported in the current environment. Rather than requiring every dependency to be installed before a project can be visualised, lite mode mocks the missing ones and still builds a snapshot.

Statistics, custom styles, and layer overrides are not part of the snapshot itself. They are layered on top of it as a separate enrichment step, keeping the description Kedro produces distinct from the presentation choices Kedro-Viz adds to it.

Node identity is kept stable across both paths, so a node built from the snapshot and a node built from a live project resolve to the same ID. This lets the frontend treat a node consistently even when its metadata is fetched from the other path, described below. The one known exception is an explicit node name that looks generated (`<function>__<8 hex characters>`), which the snapshot can't tell apart from a generated one (see `integrations/kedro/node_ids.py`).

### Live path

Kedro can also be loaded as a running system: a session, a pipeline, and a catalog, held in memory the way they exist when a project runs. The live path uses this route, and is the source of truth for the handful of features that need something the snapshot does not carry. That includes the source code and run commands behind node metadata, dataset previews, and the static output produced for `--save-file`, deploying from the running UI, and `kedro viz build`/`kedro viz deploy`.

Because most requests are answered by the inspection path, loading a live project inside the running server is deferred until a request actually needs one. Node metadata, `--save-file`, and deploying from within the running UI all wait until first use this way. A project that never asks for any of them never pays the cost of loading a live project. If a load fails, later requests are told about that same failure rather than retrying a load expected to fail again.

One exception: when hooks are enabled, the backend loads the live catalog and pipelines at startup anyway, to capture any layers a hook modifies. The later step, building the repositories from that catalog, still waits until something needs them.

`kedro viz build` and `kedro viz deploy`, run from the command line, reach that same live state a different way. Each runs in a process of its own, spun up for that single command, and loads the project directly, rather than waiting on the deferred load of the running server. A notebook integration and the VSCode extension work the same way: each loads a project directly in its own process to render a pipeline without the REST API.

### Backend data flow

```mermaid
flowchart TB
subgraph Kedro["Kedro"]
Snapshot["ProjectSnapshot<br/>metadata, pipelines, nodes,<br/>datasets, parameters"]
RunEvents["run events file<br/>recorded by hooks"]
Session["KedroSession / Pipeline / DataCatalog"]
end

subgraph Inspection["Inspection path"]
Context["VizProjectContext"]
GraphSvc["GraphService + GraphBuilder"]
RunSvc["RunStatusService"]
NewAPI["/api/main<br/>/api/pipelines/&#123;id&#125;<br/>/api/run-status"]
end

subgraph Live["Live path"]
Deferred["DeferredDataLoader<br/>loads on first use, in this process"]
Manager["DataAccessManager<br/>+ Repositories"]
DeferredConsumers["/api/nodes/&#123;id&#125;<br/>--save-file / deploy from the UI"]
DirectConsumers["kedro viz build / deploy<br/>NotebookVisualizer, VSCode"]
end

UI["React UI / frontend consumers"]

Snapshot --> Context
Context --> GraphSvc
Context --> RunSvc
RunEvents --> RunSvc
GraphSvc --> NewAPI
RunSvc --> NewAPI
NewAPI --> UI

Session --> Deferred
DeferredConsumers --> Deferred
Deferred --> Manager
Manager --> DeferredConsumers
DeferredConsumers --> UI

DirectConsumers -- "own process, loads directly" --> Manager
```
9 changes: 8 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ Please follow the established format:
- Use present tense (e.g. 'Add new feature')
- Include the ID number for the related PR (or PRs) in parentheses
-->
# Upcoming Release
# # Release 13.0.0

## Major features and improvements
- Dropped support for Python 3.10 (EOL Oct 2026). Minimum supported version is now 3.11.
- Build the flowchart graph, modular pipelines, layers and task parameters from Kedro's Inspection API instead of live pipeline/catalog introspection. (#2782)
Comment thread
jitu5 marked this conversation as resolved.
Resolved
- Load node details on the first node click instead of at startup. (#2782)
- Drop support for Kedro versions below 1.6.0. (#2782)

## Breaking changes to the API
- Move the `kedro_viz.integrations.kedro` modules into `hooks`, `lite`, `live` and `inspection` subpackages, and add a required `context` argument to `create_api_app_from_project`. (#2782)

## Bug fixes and other changes
- Fix npm publishing by switching the release workflow to npm trusted publishing with staged releases. (#2826)
- Read `/api/run-status` events from the project root instead of the current working directory. (#2782)


# Release 12.6.0
Expand Down
2 changes: 1 addition & 1 deletion package/.coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[report]
show_missing = True
omit =
*/integrations/kedro/data_loader.py
*/integrations/kedro/live/data_loader.py
exclude_lines =
pragma: no cover
raise NotImplementedError
Expand Down
45 changes: 37 additions & 8 deletions package/features/steps/cli_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,24 @@ def exec_viz_lite_command(context):
)


@then("kedro-viz should start successfully")
def check_kedroviz_up(context):
"""Check that Kedro-Viz is up and responding to requests."""
max_duration = 45
def _wait_for_main_response() -> dict | None:
"""Poll ``/api/main`` until it responds; return its JSON body, or ``None``."""
max_duration = 45 # seconds
end_by = time() + max_duration
data_json = None

while time() < end_by:
try:
data_json = requests.get("http://localhost:4141/api/main", timeout=5).json()
return requests.get("http://localhost:4141/api/main", timeout=5).json()
except Exception: # noqa: BLE001
sleep(2.0)
continue
else:
break
return None


@then("kedro-viz should start successfully")
def check_kedroviz_up(context):
"""Check that Kedro-Viz is up and responding to requests."""
data_json = _wait_for_main_response()

try:
if context.result.poll() is not None:
Expand All @@ -202,6 +205,32 @@ def check_kedroviz_up(context):
context.result.terminate()


@then("kedro-viz should serve the graph and node metadata successfully")
def check_kedroviz_up_and_node_metadata(context):
"""Check that Kedro-Viz is up, and that a node metadata request also succeeds."""
data_json = _wait_for_main_response()

try:
assert context.result.poll() is None
if data_json is None:
raise AssertionError("Kedro Viz did not respond within 45 seconds")
assert (
"X_test" == sorted(data_json["nodes"], key=lambda i: i["name"])[0]["name"]
)

nodes = data_json["nodes"]
data_nodes = [node for node in nodes if node.get("type") == "data"]
node_id = (data_nodes[0] if data_nodes else nodes[0])["id"]

node_response = requests.get(f"http://localhost:4141/api/nodes/{node_id}")
assert node_response.status_code == 200, (
f"Expected node metadata request for node '{node_id}' to succeed, "
f"got {node_response.status_code}: {node_response.text}"
)
finally:
context.result.terminate()


@then("I store the response from main endpoint")
def get_main_api_response(context):
max_duration = 45 # 45 seconds
Expand Down
2 changes: 1 addition & 1 deletion package/features/viz.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: Viz plugin in new project
Given I have installed kedro version "latest"
And I have run a non-interactive kedro new with spaceflights-pandas starter
When I execute the kedro viz run command with lite option
Then kedro-viz should start successfully
Then kedro-viz should serve the graph and node metadata successfully

Scenario: Compare viz responses in regular and lite mode
Given I have installed kedro version "latest"
Expand Down
16 changes: 12 additions & 4 deletions package/kedro_viz/api/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
from kedro_viz import __version__
from kedro_viz.api.rest.responses.utils import EnhancedORJSONResponse
from kedro_viz.integrations.kedro import telemetry as kedro_telemetry
from kedro_viz.integrations.kedro.inspection import VizProjectContext

from .rest.router import create_project_router
from .rest.router import router as rest_router

_HTML_DIR = Path(__file__).parent.parent.absolute() / "html"
Expand Down Expand Up @@ -50,18 +52,24 @@ async def set_secure_headers(request, call_next):


def create_api_app_from_project(
project_path: Path, autoreload: bool = False
context: VizProjectContext,
project_path: Path,
autoreload: bool = False,
) -> FastAPI:
"""Create an API from a real Kedro project by adding the router to the FastAPI app.

Args:
project_path: Path to the Kedro project
context: Project-scoped services built from the inspection snapshot and enrichment
sources.
project_path: Path to the Kedro project.
autoreload: Whether the app should autoreload based on content change
in the Kedro project
in the Kedro project.

Returns:
The FastAPI app
The FastAPI app.
"""
app = _create_base_api_app()
app.include_router(create_project_router(context))
app.include_router(rest_router)

# Check for html directory existence.
Expand Down
25 changes: 25 additions & 0 deletions package/kedro_viz/api/rest/responses/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

from kedro_viz.api.rest.responses.base import BaseAPIResponse
from kedro_viz.data_access import data_access_manager
from kedro_viz.integrations.kedro.live.deferred_loader import (
DeferredDataLoadError,
deferred_data_loader,
)
from kedro_viz.models.flowchart.node_metadata import (
DataNodeMetadata,
ParametersNodeMetadata,
Expand Down Expand Up @@ -150,6 +154,27 @@ class ParametersNodeMetadataAPIResponse(BaseAPIResponse):

def get_node_metadata_response(node_id: str):
"""API response for `/api/nodes/node_id`."""
try:
deferred_data_loader.ensure_loaded()
except DeferredDataLoadError:
logger.exception(
"Deferred data loader failed while building node metadata response."
)
return JSONResponse(
status_code=503,
content={
"message": (
"Node metadata is unavailable because the live project failed "
"to load. Check the terminal running Kedro-Viz for details."
)
},
)
Comment thread
SajidAlamQB marked this conversation as resolved.
Resolved

return _build_node_metadata_response(node_id)


def _build_node_metadata_response(node_id: str):
"""Resolve ``node_id`` against the (already-loaded) live repositories."""
node = data_access_manager.nodes.get_node_by_id(node_id)
if not node:
return JSONResponse(status_code=404, content={"message": "Invalid node ID"})
Expand Down
Loading
Loading