You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix custom "+tag:some_tag" selector issue related to tests tag inheritance (#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.
0 commit comments