From f94033e89fbdc0fe9125eb5efc6ade2aa34c2553 Mon Sep 17 00:00:00 2001 From: GiovanniCorsetti <66136602+CorsettiS@users.noreply.github.com> Date: Thu, 27 Jul 2023 13:26:48 +0200 Subject: [PATCH 1/4] Update graph.py --- cosmos/dbt/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmos/dbt/graph.py b/cosmos/dbt/graph.py index 8e061041da..f189e71ce2 100644 --- a/cosmos/dbt/graph.py +++ b/cosmos/dbt/graph.py @@ -103,7 +103,7 @@ def load( self.load_from_dbt_manifest() return elif ( - execution_mode in (ExecutionMode.LOCAL, ExecutionMode.VIRTUALENV) + execution_mode == ExecutionMode.LOCAL and self.project.is_profile_yml_available() ): try: From 7c045f8d2396e8dc3808ade096d708e4252d4aee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 27 Jul 2023 11:30:46 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=8E=A8=20[pre-commit.ci]=20Auto=20for?= =?UTF-8?q?mat=20from=20pre-commit.com=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cosmos/dbt/graph.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cosmos/dbt/graph.py b/cosmos/dbt/graph.py index f189e71ce2..7218770f40 100644 --- a/cosmos/dbt/graph.py +++ b/cosmos/dbt/graph.py @@ -102,10 +102,7 @@ def load( if self.project.is_manifest_available(): self.load_from_dbt_manifest() return - elif ( - execution_mode == ExecutionMode.LOCAL - and self.project.is_profile_yml_available() - ): + elif execution_mode == ExecutionMode.LOCAL and self.project.is_profile_yml_available(): try: self.load_via_dbt_ls() return From 4080ef257bb48fd173e464b785fc96cfbf4c915d Mon Sep 17 00:00:00 2001 From: GiovanniCorsetti <66136602+CorsettiS@users.noreply.github.com> Date: Thu, 27 Jul 2023 12:33:30 +0000 Subject: [PATCH 3/4] change mock_test of virtualenv for mock_load_via_custom_parser --- tests/dbt/test_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dbt/test_graph.py b/tests/dbt/test_graph.py index c210fe1dfc..1b9cfdcec7 100644 --- a/tests/dbt/test_graph.py +++ b/tests/dbt/test_graph.py @@ -87,7 +87,7 @@ def test_load_manifest_with_manifest(mock_load_from_dbt_manifest): "exec_mode,method,expected_function", [ (ExecutionMode.LOCAL, LoadMode.AUTOMATIC, "mock_load_via_dbt_ls"), - (ExecutionMode.VIRTUALENV, LoadMode.AUTOMATIC, "mock_load_via_dbt_ls"), + (ExecutionMode.VIRTUALENV, LoadMode.AUTOMATIC, "mock_load_via_custom_parser"), (ExecutionMode.KUBERNETES, LoadMode.AUTOMATIC, "mock_load_via_custom_parser"), (ExecutionMode.DOCKER, LoadMode.AUTOMATIC, "mock_load_via_custom_parser"), (ExecutionMode.LOCAL, LoadMode.DBT_LS, "mock_load_via_dbt_ls"), From a9bbbaaf10a992572ac27572e0353146de9af6b6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 27 Jul 2023 12:33:48 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=8E=A8=20[pre-commit.ci]=20Auto=20for?= =?UTF-8?q?mat=20from=20pre-commit.com=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/dbt/test_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dbt/test_graph.py b/tests/dbt/test_graph.py index 1b9cfdcec7..5b4b8fbd5f 100644 --- a/tests/dbt/test_graph.py +++ b/tests/dbt/test_graph.py @@ -87,7 +87,7 @@ def test_load_manifest_with_manifest(mock_load_from_dbt_manifest): "exec_mode,method,expected_function", [ (ExecutionMode.LOCAL, LoadMode.AUTOMATIC, "mock_load_via_dbt_ls"), - (ExecutionMode.VIRTUALENV, LoadMode.AUTOMATIC, "mock_load_via_custom_parser"), + (ExecutionMode.VIRTUALENV, LoadMode.AUTOMATIC, "mock_load_via_custom_parser"), (ExecutionMode.KUBERNETES, LoadMode.AUTOMATIC, "mock_load_via_custom_parser"), (ExecutionMode.DOCKER, LoadMode.AUTOMATIC, "mock_load_via_custom_parser"), (ExecutionMode.LOCAL, LoadMode.DBT_LS, "mock_load_via_dbt_ls"),