-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix custom "+tag:some_tag" selector issue related to tests tag inheri…
…tance (#1466) The selector method `_should_include_node` changes test tasks to inherit tags from their parent nodes. While this behaviour is acceptable and desirable in some cases, it can cause problems using graph selectors with tags. This PR improves the test coverage, narrows down the problem and fixes the problem reported by Astronomer customers. More details below. A user reported that they see the correct `DbtDag` when using Cosmos 1.8.1 with: * `LoadMode.DBT_LS` * `RenderConfig(selector="accounts_marts")` Where the selector `accounts_marts` is defined as: ``` - name: accounts_marts description: Run Accounts models definition: intersection: - '+tag:accounts' - '+tag:datamart' - '+tag:stratus' ``` The expected behaviour includes: - 164 Airflow tasks - 152 Local run tasks - 12 Snapshot tasks However, when they attempt to run the same `DbtDag` using: * `LoadMode.DBT_MANIFEST` * `RenderConfig(select=["+tag:accounts,+tag:datamart,+tag:stratus"])` Their `DbtDag` seems to have the wrong subset of nodes. They reported: - 197 Airflow tasks - 183 Local run tasks - 14 Snapshot tasks This pull request aims to reproduce and fix this issue.
- Loading branch information
Showing
4 changed files
with
116 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters