From 201723d5066275edad372aae6f51cb22168ea2fd Mon Sep 17 00:00:00 2001 From: Ian Knox Date: Thu, 20 May 2021 08:27:16 -0500 Subject: [PATCH 1/8] ls in RPC works --- core/dbt/contracts/rpc.py | 17 +++++++++++++++++ core/dbt/rpc/task_handler.py | 7 +++++-- core/dbt/task/list.py | 14 +++++++++----- core/dbt/task/rpc/project_commands.py | 26 ++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 7 deletions(-) diff --git a/core/dbt/contracts/rpc.py b/core/dbt/contracts/rpc.py index 83d248e84d2..90b26bd9dfc 100644 --- a/core/dbt/contracts/rpc.py +++ b/core/dbt/contracts/rpc.py @@ -63,6 +63,16 @@ class RPCCompileParameters(RPCParameters): state: Optional[str] = None +@dataclass +class RPCListParameters(RPCParameters): + resource_type: Optional[str] = None + models: Union[None, str, List[str]] = None + exclude: Union[None, str, List[str]] = None + selector: Optional[str] = None + select: Optional[str] = None + output: Optional[str] = 'json' + + @dataclass class RPCRunParameters(RPCParameters): threads: Optional[int] = None @@ -190,6 +200,13 @@ class RemoteResult(VersionedSchema): logs: List[LogMessage] +@dataclass +@schema_version('remote-list-results', 1) +class RemoteListResults(RemoteResult): + output: List[Any] + generated_at: datetime = field(default_factory=datetime.utcnow) + + @dataclass @schema_version('remote-deps-result', 1) class RemoteDepsResult(RemoteResult): diff --git a/core/dbt/rpc/task_handler.py b/core/dbt/rpc/task_handler.py index ce2f320fc1f..bfd8c9f3d1f 100644 --- a/core/dbt/rpc/task_handler.py +++ b/core/dbt/rpc/task_handler.py @@ -38,7 +38,7 @@ QueueTimeoutMessage, ) from dbt.rpc.method import RemoteMethod - +from dbt.task.rpc.project_commands import RemoteListTask # we use this in typing only... from queue import Queue # noqa @@ -78,7 +78,10 @@ def _spawn_setup(self): def task_exec(self) -> None: """task_exec runs first inside the child process""" - signal.signal(signal.SIGTERM, sigterm_handler) + if type(self.task) != RemoteListTask: + # TODO: find another solution for this.. in theory it stops us from + # being able to kill ls processes + signal.signal(signal.SIGTERM, sigterm_handler) # the first thing we do in a new process: push logging back over our # queue handler = QueueLogHandler(self.queue) diff --git a/core/dbt/task/list.py b/core/dbt/task/list.py index d78223eef8b..cc22da27f68 100644 --- a/core/dbt/task/list.py +++ b/core/dbt/task/list.py @@ -3,7 +3,7 @@ from dbt.contracts.graph.parsed import ( ParsedExposure, - ParsedSourceDefinition, + ParsedSourceDefinition ) from dbt.graph import ( parse_difference, @@ -120,7 +120,7 @@ def generate_paths(self): def run(self): ManifestTask._runtime_initialize(self) - output = self.config.args.output + output = self.args.output if output == 'selector': generator = self.generate_selectors elif output == 'name': @@ -133,7 +133,11 @@ def run(self): raise InternalException( 'Invalid output {}'.format(output) ) - for result in generator(): + + return self.output_results(generator()) + + def output_results(self, results): + for result in results: self.node_results.append(result) print(result) return self.node_results @@ -143,10 +147,10 @@ def resource_types(self): if self.args.models: return [NodeType.Model] - values = set(self.config.args.resource_types) - if not values: + if not self.args.resource_types: return list(self.DEFAULT_RESOURCE_VALUES) + values = set(self.args.resource_types) if 'default' in values: values.remove('default') values.update(self.DEFAULT_RESOURCE_VALUES) diff --git a/core/dbt/task/rpc/project_commands.py b/core/dbt/task/rpc/project_commands.py index cc345cfde20..4dbc9039027 100644 --- a/core/dbt/task/rpc/project_commands.py +++ b/core/dbt/task/rpc/project_commands.py @@ -1,3 +1,4 @@ +import json from datetime import datetime from pathlib import Path from typing import List, Optional, Union @@ -15,9 +16,11 @@ RPCTestParameters, RemoteCatalogResults, RemoteExecutionResult, + RemoteListResults, RemoteRunOperationResult, RPCSnapshotParameters, RPCSourceFreshnessParameters, + RPCListParameters, ) from dbt.rpc.method import ( Parameters, RemoteManifestMethod @@ -32,6 +35,7 @@ from dbt.task.seed import SeedTask from dbt.task.snapshot import SnapshotTask from dbt.task.test import TestTask +from dbt.task.list import ListTask from .base import RPCTask from .cli import HasCLI @@ -258,3 +262,25 @@ def handle_request(self) -> GetManifestResult: def interpret_results(self, results): return results.manifest is not None + + +class RemoteListTask( + RPCCommandTask[RPCListParameters], ListTask +): + METHOD_NAME = 'list' + + def set_args(self, params: RPCListParameters) -> None: + + self.args.output = params.output + self.args.resource_types = self._listify(params.resource_type) + self.args.models = self._listify(params.models) + self.args.exclude = self._listify(params.exclude) + self.args.selector_name = params.selector + self.args.select = params.select + + @staticmethod + def output_results(results): + return RemoteListResults( + output=[json.loads(x) for x in results], + logs=None + ) From dbfa35139515abb12f6ff90b8635fa56affe8331 Mon Sep 17 00:00:00 2001 From: Ian Knox Date: Fri, 21 May 2021 09:22:18 -0500 Subject: [PATCH 2/8] tests and fixes --- core/dbt/contracts/rpc.py | 4 +- core/dbt/task/rpc/project_commands.py | 4 +- test/integration/100_rpc_test/test_rpc.py | 96 +++++++++++++++++++++++ 3 files changed, 100 insertions(+), 4 deletions(-) diff --git a/core/dbt/contracts/rpc.py b/core/dbt/contracts/rpc.py index 90b26bd9dfc..dbfb2e737cd 100644 --- a/core/dbt/contracts/rpc.py +++ b/core/dbt/contracts/rpc.py @@ -65,11 +65,11 @@ class RPCCompileParameters(RPCParameters): @dataclass class RPCListParameters(RPCParameters): - resource_type: Optional[str] = None + resource_types: Optional[List[str]] = None models: Union[None, str, List[str]] = None exclude: Union[None, str, List[str]] = None + select: Optional[List[str]] = None selector: Optional[str] = None - select: Optional[str] = None output: Optional[str] = 'json' diff --git a/core/dbt/task/rpc/project_commands.py b/core/dbt/task/rpc/project_commands.py index 4dbc9039027..87694b58124 100644 --- a/core/dbt/task/rpc/project_commands.py +++ b/core/dbt/task/rpc/project_commands.py @@ -272,11 +272,11 @@ class RemoteListTask( def set_args(self, params: RPCListParameters) -> None: self.args.output = params.output - self.args.resource_types = self._listify(params.resource_type) + self.args.resource_types = self._listify(params.resource_types) self.args.models = self._listify(params.models) self.args.exclude = self._listify(params.exclude) self.args.selector_name = params.selector - self.args.select = params.select + self.args.select = self._listify(params.select) @staticmethod def output_results(results): diff --git a/test/integration/100_rpc_test/test_rpc.py b/test/integration/100_rpc_test/test_rpc.py index 373129cb960..3c327ee96fc 100644 --- a/test/integration/100_rpc_test/test_rpc.py +++ b/test/integration/100_rpc_test/test_rpc.py @@ -1176,3 +1176,99 @@ def test_deps_cli_compilation_postgres(self): 'cli_args', cli='deps', _poll_timeout=180).json()) self._check_deps_ok(status) + + +class TestRPCServerList(HasRPCServer): + should_seed = False + + @property + def models(self): + return "models" + + @mark.flaky(rerun_filter=addr_in_use, max_runs=3) + @use_profile('postgres') + def test_list_base_postgres(self): + result = self.query('list').json() + self.assertIsResult(result) + self.assertEqual(len(result["result"]["output"]), 17) + self.assertEqual( + [x["name"] for x in result["result"]["output"]], + [ + 'descendant_model', + 'ephemeral_model', + 'multi_source_model', + 'nonsource_descendant', + 'expected_multi_source', + 'other_source_table', + 'other_table', + 'source', + 'table', + 'test_table', + 'disabled_test_table', + 'other_test_table', + 'test_table', + 'relationships_descendant_model_favorite_color__favorite_color__source_test_source_test_table_', + 'source_not_null_test_source_test_table_id', + 'source_relationships_test_source_test_table_favorite_color__favorite_color__ref_descendant_model_', + 'source_unique_test_source_test_table_id' + ] + ) + + @mark.flaky(rerun_filter=addr_in_use, max_runs=3) + @use_profile('postgres') + def test_list_resource_type_postgres(self): + result = self.query('list', resource_types=['model']).json() + self.assertIsResult(result) + self.assertEqual(len(result["result"]["output"]), 4) + self.assertEqual( + [x['name'] for x in result["result"]["output"]], + [ + 'descendant_model', + 'ephemeral_model', + 'multi_source_model', + 'nonsource_descendant'] + ) + + @mark.flaky(rerun_filter=addr_in_use, max_runs=3) + @use_profile('postgres') + def test_list_models_postgres(self): + result = self.query('list', models=['descendant_model']).json() + self.assertIsResult(result) + self.assertEqual(len(result["result"]["output"]), 1) + self.assertEqual(result["result"]["output"][0]["name"], 'descendant_model') + + @mark.flaky(rerun_filter=addr_in_use, max_runs=3) + @use_profile('postgres') + def test_list_exclude_postgres(self): + result = self.query('list', exclude=['+descendant_model']).json() + self.assertIsResult(result) + self.assertEqual(len(result["result"]["output"]), 11) + self.assertEqual( + [x['name'] for x in result['result']['output']], + [ + 'ephemeral_model', + 'multi_source_model', + 'nonsource_descendant', + 'expected_multi_source', + 'other_source_table', + 'other_table', + 'source', + 'table', + 'test_table', + 'disabled_test_table', + 'other_test_table' + ] + ) + + @mark.flaky(rerun_filter=addr_in_use, max_runs=3) + @use_profile('postgres') + def test_list_select_postgres(self): + result = self.query('list', select=[ + 'relationships_descendant_model_favorite_color__favorite_color__source_test_source_test_table_' + ]).json() + self.assertIsResult(result) + self.assertEqual(len(result["result"]["output"]), 1) + self.assertEqual( + result["result"]["output"][0]["name"], + 'relationships_descendant_model_favorite_color__favorite_color__source_test_source_test_table_' + ) From f9ef5e7e8e31545f8795dc8ef2a40efaebe44183 Mon Sep 17 00:00:00 2001 From: Ian Knox Date: Fri, 21 May 2021 09:27:54 -0500 Subject: [PATCH 3/8] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c332f0732e2..e9b077bbde4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### Under the hood - Added logic for registry requests to raise a timeout error after a response hangs out for 30 seconds and 5 attempts have been made to reach the endpoint ([#3177](https://github.com/fishtown-analytics/dbt/issues/3177), [#3275](https://github.com/fishtown-analytics/dbt/pull/3275)) +- Added support for invoking the `list` task via the RPC server [#3311](https://github.com/fishtown-analytics/dbt/issues/3311) Contributors: - [@TeddyCr](https://github.com/TeddyCr) ([#3275](https://github.com/fishtown-analytics/dbt/pull/3275)) From b23129982c1d0e914a39fb4c9d8182a0d4b40707 Mon Sep 17 00:00:00 2001 From: Ian Knox Date: Wed, 26 May 2021 09:37:49 -0500 Subject: [PATCH 4/8] update default threading settings for all tasks --- core/dbt/rpc/task_handler.py | 2 +- core/dbt/task/base.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/dbt/rpc/task_handler.py b/core/dbt/rpc/task_handler.py index bfd8c9f3d1f..a066b7614b0 100644 --- a/core/dbt/rpc/task_handler.py +++ b/core/dbt/rpc/task_handler.py @@ -80,7 +80,7 @@ def task_exec(self) -> None: """task_exec runs first inside the child process""" if type(self.task) != RemoteListTask: # TODO: find another solution for this.. in theory it stops us from - # being able to kill ls processes + # being able to kill RemoteListTask processes signal.signal(signal.SIGTERM, sigterm_handler) # the first thing we do in a new process: push logging back over our # queue diff --git a/core/dbt/task/base.py b/core/dbt/task/base.py index 0da36feb294..09b23707f58 100644 --- a/core/dbt/task/base.py +++ b/core/dbt/task/base.py @@ -58,6 +58,7 @@ class BaseTask(metaclass=ABCMeta): def __init__(self, args, config): self.args = args + self.args.single_threaded = False self.config = config @classmethod From 82f5e9f5b2eccdc6928417bcc1fe6a4455d3efcc Mon Sep 17 00:00:00 2001 From: Ian Knox Date: Wed, 26 May 2021 10:21:12 -0500 Subject: [PATCH 5/8] added additional fields to list response (unique_id, original_file_path) --- core/dbt/task/list.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/dbt/task/list.py b/core/dbt/task/list.py index cc22da27f68..60051e065cf 100644 --- a/core/dbt/task/list.py +++ b/core/dbt/task/list.py @@ -38,6 +38,8 @@ class ListTask(GraphRunnableTask): 'config', 'resource_type', 'source_name', + 'original_file_path', + 'unique_id' )) def __init__(self, args, config): From 1be625436333edd643e32f8c22ea1e76cd7fa620 Mon Sep 17 00:00:00 2001 From: Ian Knox Date: Wed, 26 May 2021 10:39:23 -0500 Subject: [PATCH 6/8] updated changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f546d6fbab..3a36a6caa33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,8 @@ ### Under the hood - Added logic for registry requests to raise a timeout error after a response hangs out for 30 seconds and 5 attempts have been made to reach the endpoint ([#3177](https://github.com/fishtown-analytics/dbt/issues/3177), [#3275](https://github.com/fishtown-analytics/dbt/pull/3275)) -- Added support for invoking the `list` task via the RPC server [#3311](https://github.com/fishtown-analytics/dbt/issues/3311) +- Added support for invoking the `list` task via the RPC server ([#3311](https://github.com/fishtown-analytics/dbt/issues/3311), [#3384](https://github.com/fishtown-analytics/dbt/pull/3384)) +- Added `unique_id` and `original_file_path` as keys to json responses from the `list` task ([#3356](https://github.com/fishtown-analytics/dbt/issues/3356), [#3384](https://github.com/fishtown-analytics/dbt/pull/3384)) - Use shutil.which so Windows can pick up git.bat as a git executable ([#3035](https://github.com/fishtown-analytics/dbt/issues/3035), [#3134](https://github.com/fishtown-analytics/dbt/issues/3134)) - Add `ssh-client` and update `git` version (using buster backports) in Docker image ([#3337](https://github.com/fishtown-analytics/dbt/issues/3337), [#3338](https://github.com/fishtown-analytics/dbt/pull/3338)) From 90edc388598ff14a4435285fe79ecdb3d8b516a0 Mon Sep 17 00:00:00 2001 From: Ian Knox Date: Wed, 26 May 2021 11:59:34 -0500 Subject: [PATCH 7/8] fix ls test --- test/integration/047_dbt_ls_test/test_ls.py | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/integration/047_dbt_ls_test/test_ls.py b/test/integration/047_dbt_ls_test/test_ls.py index 747c4a1f947..0780c532554 100644 --- a/test/integration/047_dbt_ls_test/test_ls.py +++ b/test/integration/047_dbt_ls_test/test_ls.py @@ -94,6 +94,8 @@ def expect_snapshot_output(self): 'alias': None, 'check_cols': None, }, + 'unique_id': 'snapshot.test.my_snapshot', + 'original_file_path': 'snapshots/snapshot.sql', 'alias': 'my_snapshot', 'resource_type': 'snapshot', }, @@ -125,6 +127,8 @@ def expect_analyses_output(self): 'schema': None, 'alias': None, }, + 'unique_id': 'analysis.test.a', + 'original_file_path': 'analyses/a.sql', 'alias': 'a', 'resource_type': 'analysis', }, @@ -157,6 +161,8 @@ def expect_model_output(self): 'schema': None, 'alias': None, }, + 'original_file_path': 'models/ephemeral.sql', + 'unique_id': 'model.test.ephemeral', 'alias': 'ephemeral', 'resource_type': 'model', }, @@ -181,6 +187,8 @@ def expect_model_output(self): 'schema': None, 'alias': None, }, + 'original_file_path': 'models/incremental.sql', + 'unique_id': 'model.test.incremental', 'alias': 'incremental', 'resource_type': 'model', }, @@ -204,6 +212,8 @@ def expect_model_output(self): 'schema': None, 'alias': None, }, + 'original_file_path': 'models/sub/inner.sql', + 'unique_id': 'model.test.inner', 'alias': 'inner', 'resource_type': 'model', }, @@ -227,6 +237,8 @@ def expect_model_output(self): 'schema': None, 'alias': None, }, + 'original_file_path': 'models/outer.sql', + 'unique_id': 'model.test.outer', 'alias': 'outer', 'resource_type': 'model', }, @@ -261,6 +273,8 @@ def expect_model_ephemeral_output(self): 'schema': None, 'alias': None, }, + 'unique_id': 'model.test.ephemeral', + 'original_file_path': 'models/ephemeral.sql', 'alias': 'outer', 'resource_type': 'model', }, @@ -277,6 +291,8 @@ def expect_source_output(self): 'config': { 'enabled': True, }, + 'unique_id': 'source.test.my_source.my_table', + 'original_file_path': 'models/schema.yml', 'package_name': 'test', 'name': 'my_table', 'source_name': 'my_source', @@ -314,6 +330,8 @@ def expect_seed_output(self): 'schema': None, 'alias': None, }, + 'unique_id': 'seed.test.seed', + 'original_file_path': 'data/seed.csv', 'alias': 'seed', 'resource_type': 'seed', }, @@ -347,6 +365,8 @@ def expect_test_output(self): 'schema': None, 'alias': None, }, + 'unique_id': 'test.test.not_null_outer_id.8f1c176a93', + 'original_file_path': 'models/schema.yml', 'alias': 'not_null_outer_id', 'resource_type': 'test', }, @@ -371,6 +391,8 @@ def expect_test_output(self): 'schema': None, 'alias': None, }, + 'unique_id': 'test.test.t', + 'original_file_path': 'tests/t.sql', 'alias': 't', 'resource_type': 'test', }, @@ -395,6 +417,8 @@ def expect_test_output(self): 'schema': None, 'alias': None, }, + 'unique_id': 'test.test.unique_outer_id.a653b29b17', + 'original_file_path': 'models/schema.yml', 'alias': 'unique_outer_id', 'resource_type': 'test', }, From e68fd6eb7fb5f33201fffb4bc4b01fe730a36a00 Mon Sep 17 00:00:00 2001 From: Ian Knox Date: Wed, 26 May 2021 12:24:56 -0500 Subject: [PATCH 8/8] PR Feedback --- core/dbt/contracts/rpc.py | 2 +- core/dbt/task/rpc/project_commands.py | 12 ++++++++++ test/integration/047_dbt_ls_test/test_ls.py | 25 +++++++++++---------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/core/dbt/contracts/rpc.py b/core/dbt/contracts/rpc.py index dbfb2e737cd..02198630e00 100644 --- a/core/dbt/contracts/rpc.py +++ b/core/dbt/contracts/rpc.py @@ -68,7 +68,7 @@ class RPCListParameters(RPCParameters): resource_types: Optional[List[str]] = None models: Union[None, str, List[str]] = None exclude: Union[None, str, List[str]] = None - select: Optional[List[str]] = None + select: Union[None, str, List[str]] = None selector: Optional[str] = None output: Optional[str] = 'json' diff --git a/core/dbt/task/rpc/project_commands.py b/core/dbt/task/rpc/project_commands.py index 87694b58124..a4952cc87fb 100644 --- a/core/dbt/task/rpc/project_commands.py +++ b/core/dbt/task/rpc/project_commands.py @@ -22,6 +22,7 @@ RPCSourceFreshnessParameters, RPCListParameters, ) +from dbt.exceptions import RuntimeException from dbt.rpc.method import ( Parameters, RemoteManifestMethod ) @@ -278,6 +279,17 @@ def set_args(self, params: RPCListParameters) -> None: self.args.selector_name = params.selector self.args.select = self._listify(params.select) + if self.args.models: + if self.args.select: + raise RuntimeException( + '"models" and "select" are mutually exclusive arguments' + ) + if self.args.resource_types: + raise RuntimeException( + '"models" and "resource_type" are mutually exclusive ' + 'arguments' + ) + @staticmethod def output_results(results): return RemoteListResults( diff --git a/test/integration/047_dbt_ls_test/test_ls.py b/test/integration/047_dbt_ls_test/test_ls.py index 0780c532554..5ebe12b14aa 100644 --- a/test/integration/047_dbt_ls_test/test_ls.py +++ b/test/integration/047_dbt_ls_test/test_ls.py @@ -1,6 +1,7 @@ from test.integration.base import DBTIntegrationTest, use_profile import os from dbt.logger import log_manager +from test.integration.base import normalize import json @@ -95,7 +96,7 @@ def expect_snapshot_output(self): 'check_cols': None, }, 'unique_id': 'snapshot.test.my_snapshot', - 'original_file_path': 'snapshots/snapshot.sql', + 'original_file_path': normalize('snapshots/snapshot.sql'), 'alias': 'my_snapshot', 'resource_type': 'snapshot', }, @@ -128,7 +129,7 @@ def expect_analyses_output(self): 'alias': None, }, 'unique_id': 'analysis.test.a', - 'original_file_path': 'analyses/a.sql', + 'original_file_path': normalize('analyses/a.sql'), 'alias': 'a', 'resource_type': 'analysis', }, @@ -161,7 +162,7 @@ def expect_model_output(self): 'schema': None, 'alias': None, }, - 'original_file_path': 'models/ephemeral.sql', + 'original_file_path': normalize('models/ephemeral.sql'), 'unique_id': 'model.test.ephemeral', 'alias': 'ephemeral', 'resource_type': 'model', @@ -187,7 +188,7 @@ def expect_model_output(self): 'schema': None, 'alias': None, }, - 'original_file_path': 'models/incremental.sql', + 'original_file_path': normalize('models/incremental.sql'), 'unique_id': 'model.test.incremental', 'alias': 'incremental', 'resource_type': 'model', @@ -212,7 +213,7 @@ def expect_model_output(self): 'schema': None, 'alias': None, }, - 'original_file_path': 'models/sub/inner.sql', + 'original_file_path': normalize('models/sub/inner.sql'), 'unique_id': 'model.test.inner', 'alias': 'inner', 'resource_type': 'model', @@ -237,7 +238,7 @@ def expect_model_output(self): 'schema': None, 'alias': None, }, - 'original_file_path': 'models/outer.sql', + 'original_file_path': normalize('models/outer.sql'), 'unique_id': 'model.test.outer', 'alias': 'outer', 'resource_type': 'model', @@ -274,7 +275,7 @@ def expect_model_ephemeral_output(self): 'alias': None, }, 'unique_id': 'model.test.ephemeral', - 'original_file_path': 'models/ephemeral.sql', + 'original_file_path': normalize('models/ephemeral.sql'), 'alias': 'outer', 'resource_type': 'model', }, @@ -292,7 +293,7 @@ def expect_source_output(self): 'enabled': True, }, 'unique_id': 'source.test.my_source.my_table', - 'original_file_path': 'models/schema.yml', + 'original_file_path': normalize('models/schema.yml'), 'package_name': 'test', 'name': 'my_table', 'source_name': 'my_source', @@ -331,7 +332,7 @@ def expect_seed_output(self): 'alias': None, }, 'unique_id': 'seed.test.seed', - 'original_file_path': 'data/seed.csv', + 'original_file_path': normalize('data/seed.csv'), 'alias': 'seed', 'resource_type': 'seed', }, @@ -366,7 +367,7 @@ def expect_test_output(self): 'alias': None, }, 'unique_id': 'test.test.not_null_outer_id.8f1c176a93', - 'original_file_path': 'models/schema.yml', + 'original_file_path': normalize('models/schema.yml'), 'alias': 'not_null_outer_id', 'resource_type': 'test', }, @@ -392,7 +393,7 @@ def expect_test_output(self): 'alias': None, }, 'unique_id': 'test.test.t', - 'original_file_path': 'tests/t.sql', + 'original_file_path': normalize('tests/t.sql'), 'alias': 't', 'resource_type': 'test', }, @@ -418,7 +419,7 @@ def expect_test_output(self): 'alias': None, }, 'unique_id': 'test.test.unique_outer_id.a653b29b17', - 'original_file_path': 'models/schema.yml', + 'original_file_path': normalize('models/schema.yml'), 'alias': 'unique_outer_id', 'resource_type': 'test', },