Closed rashidakanchwala closed 4 weeks ago
Kacper confirmed that this PR resolves the main issue i.e it doesn't break Kedro-viz; the outputs of pipelines are not entirely correct. and when he gets time he will create some example pipelines that we can use to reproduce and fix this bug.
FYI @astrojuanlu
Description
Partly resolves #2106
Development notes
In the user's pipeline, one of the nodes was tagged as
validation
. While this tag was mentioned in the{ node: { tags: [] } }
response, it wasn't somehow mentioned in the{ tags: {} }
response which caused the flowchart to break. We were unable to reproduce this issue on the backend, which would have been the optimal place to address it.As a workaround, we fixed this on the frontend. When a tag is not defined correctly in the backend, the frontend cannot link the tag to the corresponding tag name. Since the tag name and ID are the same, we added a fallback. If the tag name is undefined (due to an error we still need to investigate), we use the tag ID itself as a fallback. This prevents Kedro-Viz from breaking and ensures the flowchart runs correctly.
QA notes
To test this fix using the demo project:
Run
kedro viz --save-file=test
. This will create a test folder with an api folder inside. Move theapi
folder into thekedro-viz/public
directory. Remove 'company' dict fromtags:
inapi/main
folder Runnpm run start:dev
. Before this PR, you will see the app breaking with the error message the user encountered. After applying the PR, the issue will be fixed.Checklist
RELEASE.md
file