From 51b51759c74b033c6a16bfe4255f6df25dd6b122 Mon Sep 17 00:00:00 2001 From: Ian Knox Date: Fri, 9 Jul 2021 10:41:32 -0500 Subject: [PATCH] PR feedback, Changelog --- CHANGELOG.md | 1 + core/dbt/graph/queue.py | 1 - core/dbt/main.py | 2 +- core/dbt/task/build.py | 1 - core/dbt/task/runnable.py | 5 +++-- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae869002248..d96246173df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## dbt 0.21.0 ### Features +- Add `dbt build` command to run models, tests, seeds, and snapshots in DAG order. ([#2743] (https://github.com/dbt-labs/dbt/issues/2743), , [#3490] (https://github.com/dbt-labs/dbt/issues/3490)) ### Fixes - Fix docs generation for cross-db sources in REDSHIFT RA3 node ([#3236](https://github.com/fishtown-analytics/dbt/issues/3236), [#3408](https://github.com/fishtown-analytics/dbt/pull/3408)) diff --git a/core/dbt/graph/queue.py b/core/dbt/graph/queue.py index 4fbc4c8ac25..5205cce655f 100644 --- a/core/dbt/graph/queue.py +++ b/core/dbt/graph/queue.py @@ -34,7 +34,6 @@ def __init__(self, graph: nx.DiGraph, manifest: Manifest, selected: Set[UniqueId # this lock controls most things self.lock = threading.Lock() # store the 'score' of each node as a number. Lower is higher priority. - # TODO: incorporate _include_in_cost (or remove dead code, still needed?) self._scores = self._get_scores(self.graph) # populate the initial queue self._find_new_additions() diff --git a/core/dbt/main.py b/core/dbt/main.py index c9f2a417dda..5068cdfbd33 100644 --- a/core/dbt/main.py +++ b/core/dbt/main.py @@ -383,7 +383,7 @@ def _build_build_subparser(subparsers, base_subparser): 'build', parents=[base_subparser], help=''' - Runs the whole shebang! @TODO: better description + Run all Seeds, Models, Snapshots, and tests in DAG order ''' ) sub.set_defaults( diff --git a/core/dbt/task/build.py b/core/dbt/task/build.py index 10525b82e98..8d93003a137 100644 --- a/core/dbt/task/build.py +++ b/core/dbt/task/build.py @@ -19,7 +19,6 @@ class BuildTask(CompileTask): as run_model_runner. """ - # TODO: is this list complete? RUNNER_MAP = { NodeType.Model: run_model_runner, NodeType.Snapshot: snapshot_model_runner, diff --git a/core/dbt/task/runnable.py b/core/dbt/task/runnable.py index dfe31988681..e046b498d07 100644 --- a/core/dbt/task/runnable.py +++ b/core/dbt/task/runnable.py @@ -12,6 +12,7 @@ print_run_end_messages, print_cancel_line, ) + from dbt import ui from dbt.task.base import ConfiguredTask from dbt.adapters.base import BaseRelation @@ -39,7 +40,7 @@ RuntimeException, FailFastException, ) -from dbt.node_types import NodeType + from dbt.graph import GraphQueue, NodeSelector, SelectionSpec, Graph from dbt.parser.manifest import ManifestLoader @@ -166,7 +167,7 @@ def get_runner(self, node): run_count = self.run_count num_nodes = self.num_nodes - cls = self.get_runner_type(node) # TODO: reduce this to just node.resource_type? + cls = self.get_runner_type(node) return cls(self.config, adapter, node, run_count, num_nodes) def call_runner(self, runner):