Hi everyone, Is there a way to configure Kedro Viz...
# questions
j
Hi everyone, Is there a way to configure Kedro Viz to run on a subpath? http://127.0.0.1:4141/kedro-viz/
t
Not at the moment, no. Could you please elaborate a little on why you want to do this?
j
Currently I’m working on a Code Server installation. So Kedro viz would need respect the subpath for that vscode code server installation.
n
Hi @Jorit Studer , not sure if I understand the question. What’s in http://127.0.0.1:4141/? I have been using GitPod/Codespace and launch viz from there but haven’t run into sub-path issue.
j
@Nok Lam Chan so internally our ubuntu code server images are deployed under a subpath of the base url. Let’s say https://something.com/code_server/ now if I launch kedro viz it will initially respect the base url path, but when you then click on elements it replaces the subpath with https://something.com/?pipeline_id=xxx instead of http://something.com/code_server/?pipeline_id=xxx
n
I see! I am not familiar with front-end. Is it possible to configure the sub_path similar to this? @Tynan
t
no it isn't. we need to edit the way we add our URL params to respect if there's a subpath
👍🏼 1
j
or you could use a reverse proxy @Jorit Studer ?
I’m not on my keyboard but I believe you can redirect a specific path to a port in Nginx easily
j
Sadly these are disallowed by policy. But yes normally I definitely could. I ended up wrapping the react component with another react + vite setup then patching the node_module folder. This definitely all works, its just that supporting specifying a subpath would be good feature.
👍🏼 1
t
i think if we weren't adding query params to the URL it would work fine. we actually implemented something to ensure this works some time ago, though i think it's being overwritten by the more recent URL params feature
we'll look into it. thanks for flagging!
👍 2
m
The same issue happens if you run kedro-viz from a notebook server running on a JupyterHub. Then the hub proxy proxies each user to http://something.com/user/lab/. So it is impossible to run kedro viz from a base url!
t
does it load initially, or not at all?
(databricks example) Voz should at least load initially: https://docs.kedro.org/en/stable/deployment/databricks/databricks_visualisation.html
m
It actually works (sort of). But if you click on a node to see details, you get nothing. You basically have to click previous page + refresh. Then it works again
Never tried the line magic (always ran viz from a terminal window in Jupyter)
n
@Matthias Roels are you still having this issue?
n
I think the recent kedro-viz release added sub-domain support which should fix this.
👍🏽 1
m
I haven’t upgraded to a more recent version so I will try once I upgraded 😀
j
yes this was fixed when starting using the command line in jupyter it still wont work, i think, because you can‘t inject the the full endpoint url, we simply monkey patched this part internally