Skip to content

Commit

Permalink
🩹 fix access to depends_on attr
Browse files Browse the repository at this point in the history
  • Loading branch information
z3z1ma committed Apr 3, 2023
1 parent cd05e2e commit f4e20a5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changes/0.11.17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.11.17 - 2023-04-03
### Fixed
* Added attr check to lineage function to ensure safe access to depends_on
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).


## 0.11.17 - 2023-04-03
### Fixed
* Added attr check to lineage function to ensure safe access to depends_on

## 0.11.16 - 2023-03-31
### Fixed
* Ensure we use regular jinja parsing and NOT experimental parsing or rust parsing because both of these involve randomized correctness tests sampled from user projects in the wild if not explicitly disable and both seem to want to pickle an object with an RLock, probably an adapter instance
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dbt-osmosis"
version = "0.11.16"
version = "0.11.17"
description = "A dbt server and suite of optional developer tools to make developing with dbt delightful."
authors = ["z3z1ma <[email protected]>"]
license = "Apache 2.0"
Expand Down
2 changes: 2 additions & 0 deletions src/dbt_osmosis/core/osmosis.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,8 @@ def build_node_ancestor_tree(
family_tree = {}
if members_found is None:
members_found = []
if not hasattr(node, "depends_on"):
return family_tree
for parent in getattr(node.depends_on, "nodes", []):
member = self.manifest.nodes.get(parent, self.manifest.sources.get(parent))
if member and parent not in members_found:
Expand Down

0 comments on commit f4e20a5

Please sign in to comment.