Add the node's function name to NodeSnapshot#5663
Merged
Merged
Conversation
Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
jitu5
marked this pull request as ready for review
July 13, 2026 13:38
jitu5
requested review from
AliceCima10,
ElenaKhaustova and
merelcht
as code owners
July 13, 2026 13:38
| """ | ||
|
|
||
| name: str | ||
| func_name: str |
Contributor
There was a problem hiding this comment.
func_name inserted as a required positional field silently corrupts field values for any pre-existing positional NodeSnapshot(...) call (values shift by one field with no error). Should be field(kw_only=True) or given a default as you proposed.
Contributor
Author
There was a problem hiding this comment.
I’ll make func_name required but keyword-only so existing positional fields cannot silently shift.
…avior Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
…a test for TypeError Signed-off-by: Jitendra Gundaniya <jitendra_gundaniya@mckinsey.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #5653.
get_project_snapshotexposes each node'sname,namespace,tags,inputsandoutputs, but not the name of the underlying function. Kedro-Viz needs the function name when reading the graph from the snapshot instead of a liveKedroSession(kedro-org/kedro-viz#2265):Development notes
func_name: strtoNodeSnapshot, populated in_node_to_snapshotfromNode._func_name, the readable function name Kedro already derives internally (the same onekedro registry describeprints). The value is available at snapshot-build time, so no extra project loading is needed.NodeSnapshotfield list and example) and theGET /snapshotexample response in the serving docs.NodeSnapshotinstantiation and_node_to_snapshottests, and the snapshot endpoint test now assertsfunc_nameappears in the JSON payload.Note on the constructor:
func_nameis added as a required field, second inNodeSnapshot, so it sits next tonamein serialized output. This changes the signature for any code that constructsNodeSnapshotpositionally, likely rare, since snapshots are produced by Kedro and all internal call sites use keyword arguments. Happy to make it keyword-only (field(kw_only=True)) or give it a default if preferred.Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-byline in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
RELEASE.mdfile