-
Notifications
You must be signed in to change notification settings - Fork 926
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
Clarify unexpected namespace filtering behavior #3448
Comments
Thanks @marrrcin for reporting! The Framework team is at low capacity at the moment but we'll have a look at this soon. |
Capture some relevant discussion in Slack. PR are welcome since I think this should be a straightforward fix without introducing more complicated tree structure. On a side note, kedro-viz probably did build this internal tree structure for the visualisation, so if we end up needing this we should check how it's done. def only_nodes_with_namespace(self, node_namespace: str) -> Pipeline:
...
nodes = [
n
for n in self.nodes
if n.namespace and n.namespace.startswith(node_namespace) This is the related code in Pipeline API. The reason to use
|
I can try to fix , are you accepting PR from new folks? |
@amitpoorab feel free to make a draft PR |
Spike to clarify how namespace filtering behaves across Kedro and Kedro-Viz. Are they consistent currently and what would the implication be of changing the |
We need to clarify this case:
If one choosing namespace = a, should a.b, and a.c be filtered? Changing from The case report in the description is definitely a bug regardless. |
Description
I have observed an unexpected behavior related to namespace filtering in modular pipelines.
Context
Specifically, when I have two modular pipelines under the same namespace, such as:
yolo.marketing
yolo.marketing_b2b
and I attempt to run a single pipeline using
kedro run --namespace yolo.marketing
, both pipelines get executed.This happens because of the filtering based on
startswith
:kedro/kedro/pipeline/pipeline.py
Line 421 in 543fa8b
Steps to Reproduce
Then in CLI:
kedro run --namespace yolo.marketing
Expected Result
Only single pipeline is executed (
yolo.marketing
one).Actual Result
Both pipelines are executed.
Logs ⬇️
Your Environment
pip show kedro
orkedro -V
): 0.18.14python -V
): 3.11.5The text was updated successfully, but these errors were encountered: