-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KED-2110] kedro viz command fails when kedro plugin with automatic hook discovery is installed #260
Comments
@richardwestenra could you have a look at this one? This bug will break kedro-viz whenever there's another plugin installed that's using automatic hook discovery functionality. |
@kaemo Hey sorry for the delay in responding, looks like this fell through the cracks! I've created a JIRA ticket to ensure that it's escalated, and I'm going to see if we can assign this to one of our python devs to take a look at asap. Thanks for reporting! |
@richardwestenra Amazing, thank you! |
@kaemo I've looked into this issue and was able to reproduce the error with 0.16.4. This was fixed in 0.16.5 so could you please upgrade your kedro version to 0.16.5? I'm closing this issue, but please let us know if you have any follow-up questions. |
@921kiyo , I could reproduce the same error using kedro version 0.16.5. I don't understand it, because kedro viz was working fine with this version, but suddenly stoped working. |
Which version of kedro and kedro-viz are you using? And which kedro version did you use to generate your project template? And can you paste the full error stack here? Note if your kedro project was generated with 0.16.5, and try to run with kedro 0.17.*, there's a breaking change (see https://github.com/quantumblacklabs/kedro/blob/master/RELEASE.md#other-breaking-changes-to-the-api), so it might be causing the issue. If your kedro project was created with 0.16.5 and continue using kedro 0.16.* and the latest kedro-viz (or your kedro project was created with 0.17., and try to run 0.17. and latest kedro-viz), that should work without any issue. Hope this helps :) |
@921kiyo , thank you for your reply! The problem was being caused by my Dockerfile, so I could fix it and now everything works fine. Cheers! |
Description
As per title, kedro viz command fails when kedro plugin with automatic hook discovery (
kedro.hooks
entry point) is installed (see traceback below).Context
During the
kedro viz
thekedro_viz/server.py
in_call_viz
is getting the project context (context = get_project_context("context", env=env)
, line 511). This function in core Kedro is returning a deep copy of the context. Deep copy fails when calling__reduce_ex__
that's beinggetattr
-ed from Pluggy'sDistFacade
class.DistFacade
is overwriting the__getattr__
and__dir__
dunders to include_dist
in it's dictionary and I think this is where the problem lies, but I don't know how or where to fix this or even if I'm submitting an issue in the right place.kedro viz
is failing due to this issue hence I'm submitting a bug report here, but it might be as well a bug in Kedro Core or Pluggy.I created a minimal kedro plugin and a minimal kedro project which you can use to investigate.
Steps to Reproduce
git clone https://github.com/kaemo/kedro-minimal-plugin
git clone https://github.com/kaemo/kedro-minimal-project
cd kedro-minimal-plugin && make setup && make build
cd ../kedro-minimal-project && python -m venv .venv && source .venv/bin/activate && python -m pip install kedro && kedro install && python -m pip install ../kedro-minimal-plugin/dist/kedro_minimal_plugin-0.0.1-py3-none-any.whl
kedro viz
Expected Result
A web app should start and Kedro Viz app should be open in a web browser.
Actual Result
Your Environment
The text was updated successfully, but these errors were encountered: