-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CT-677] [Bug] Downstream models do not run correctly after NetworkX 2.8.1 #5286
Comments
https://github.com/networkx/networkx/milestone/21?closed=1 -- looks like 2.8.2 of networkx is incoming... |
2.8.1 broke, but 2.8.2 did not fix whatever is now wrong with the graph stuff and newtorkx. |
After quite a few hours of investigation, this is proving a VERY difficult bug to track down. We're doing this wrongThe issue can be traced back to our use of Specifically, it's used to return a list of a given node's descendants, and by reversing the graph first, it's ancestors. However, that isn't really what that function is supposed to do! Using the DAG-specific There's still a bug, even when we do it the "right way"In researching this it was discovered that doing any kind of iteration over I suspect that either we are constructing the initial graph in such a way that causes problems unless it's iterated over OR there's a bug in networkx somewhere very very very not obvious. Unfortunately, I wasn't able to definitively pin down the source of this bug despite several days worth of effort. |
@iknox-fa My inclination here is to move forward with the refactor that you've identified, after several days of detailed investigation. This is critical dbt functionality. It feels most important that we are confident in the approach we're taking going forward—specifically, that it is closely aligned with intended behavior of We've now pinned dbt-core v1.0 to use
|
@jtcohen6 I like pinning 1.1 and not backporting since it's a change that introduces risk. We can add that to the RC2 that we are going to push out soon |
@leahwicz Agree with pinning as the safer bet for v1.1. Let's make sure that gets in for RC2. |
I spent some time debugging this issue this morning. Two videos for you: First, A walkthrough of using https://www.loom.com/share/084a91690e6744738063ad78c7b5e79e The first commit in Networkx which causes the errant behavior is: networkx/networkx@f50fc70 Second, A deep dive with a debugger to figure out the root cause of the regression. I feel like I'm 90% of the way to understanding the culprit, but I'm missing the specific place where (surprise!) a cache is not being invalidated/updated https://www.loom.com/share/a67fa29caaac436997e278742d61c031 Here's the code that I'm using to repro this issue: https://gist.github.com/drewbanin/60f3b6a5d19d8af694dc6830c8c986b3 |
Is there an existing issue for this?
Current Behavior
Any 1.0.x version of dbt installed after NetworkX 2.8.1 was released does not correctly run downstream models when using selection syntax. For some reason this does not seem to effect 1.1
Expected Behavior
All downstream models are run
Steps To Reproduce
Install dbt- @ v1.0.x
Create a project with a
model_foo
and downstreammodel_bar
Run dbt with selection
dbt run --select +model_foo+
Observe that only
model_foo
is runRelevant log output
No response
Environment
What database are you using dbt with?
postgres
Additional Context
No response
The text was updated successfully, but these errors were encountered: