Skip to content

Commit

Permalink
Merge branch 'main' into prql
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Oct 5, 2022
2 parents 615490a + d012451 commit 6462be7
Show file tree
Hide file tree
Showing 40 changed files with 435 additions and 1,317 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220929-134406.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Added flat_graph attribute the Manifest class's deepcopy() coverage
time: 2022-09-29T13:44:06.275941-04:00
custom:
Author: peterallenwebb
Issue: "5809"
PR: "5975"
4 changes: 3 additions & 1 deletion core/dbt/contracts/graph/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ def get_used_databases(self):
return frozenset(x.database for x in chain(self.nodes.values(), self.sources.values()))

def deepcopy(self):
return Manifest(
copy = Manifest(
nodes={k: _deepcopy(v) for k, v in self.nodes.items()},
sources={k: _deepcopy(v) for k, v in self.sources.items()},
macros={k: _deepcopy(v) for k, v in self.macros.items()},
Expand All @@ -793,6 +793,8 @@ def deepcopy(self):
files={k: _deepcopy(v) for k, v in self.files.items()},
state_check=_deepcopy(self.state_check),
)
copy.build_flat_graph()
return copy

def build_parent_and_child_maps(self):
edge_members = list(
Expand Down
6 changes: 5 additions & 1 deletion core/dbt/tests/fixtures/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import warnings
import yaml

from dbt.exceptions import CompilationException
import dbt.flags as flags
from dbt.config.runtime import RuntimeConfig
from dbt.adapters.factory import get_adapter, register_adapter, reset_adapters, get_adapter_by_type
Expand Down Expand Up @@ -481,8 +482,11 @@ def project(
# See https://github.com/dbt-labs/dbt-core/issues/5041
# The debug command also results in an AttributeError since `Profile` doesn't have
# a `load_dependencies` method.
# Macros gets executed as part of drop_scheme in core/dbt/adapters/sql/impl.py. When
# the macros have errors (which is what we're actually testing for...) they end up
# throwing CompilationExceptions
try:
project.drop_test_schema()
except (KeyError, AttributeError):
except (KeyError, AttributeError, CompilationException):
pass
os.chdir(orig_cwd)

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions test/integration/015_cli_invocation_tests/seed.sql

This file was deleted.

3 changes: 0 additions & 3 deletions test/integration/015_cli_invocation_tests/seed_custom.sql

This file was deleted.

304 changes: 0 additions & 304 deletions test/integration/015_cli_invocation_tests/test_cli_invocation.py

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6462be7

Please sign in to comment.