Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Build operator as a test behavior: TestBehavior.BUILD #892

Closed
dwreeves opened this issue Mar 14, 2024 · 3 comments · Fixed by #1377
Closed

[Feature request] Build operator as a test behavior: TestBehavior.BUILD #892

dwreeves opened this issue Mar 14, 2024 · 3 comments · Fixed by #1377
Assignees
Labels
area:testing Related to testing, like unit tests, integration tests, etc customer request An Astronomer customer made requested this dbt:build Primarily related to dbt build command or functionality execution:local Related to Local execution environment good first issue Good for newcomers parsing:custom Related to custom parsing, like custom DAG parsing, custom DBT parsing, etc
Milestone

Comments

@dwreeves
Copy link
Collaborator

In Cosmos 1.4, the "build" operator was added.

This is not currently being used in the DbtTaskGroup / DbtDag API. But there is one use case that can be supported: tests! You can run tests and a model in a single dbt invocation using dbt build.

Why would someone want this? A big reason is to reduce the time of DAG runs. Splitting out tests into two Airflow tasks-- one for the node and one for the test-- can slow things down for users who are facing huge bottlenecks in spinning up nodes, e.g. they are not using partial parsing.

This is probably not a simple change because it most likely requires changing some internal assumptions regarding how Cosmos parses DAGs.

I'm very open to someone else taking on this issue, too.

Copy link

dosubot bot commented Mar 14, 2024

It seems like you've got this under control, if you want help or have specific questions, let me know what I can do for you!

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added area:testing Related to testing, like unit tests, integration tests, etc dbt:build Primarily related to dbt build command or functionality execution:local Related to Local execution environment parsing:custom Related to custom parsing, like custom DAG parsing, custom DBT parsing, etc labels Mar 14, 2024
@tatiana
Copy link
Collaborator

tatiana commented May 17, 2024

Hi @dwreeves , I like your proposal.
What do you think we introduced this as TestBehaviour.BUILD? I believe this is a relatively small change.

@tatiana tatiana added this to the 1.6.0 milestone May 17, 2024
@tatiana tatiana added the good first issue Good for newcomers label May 17, 2024
@tatiana tatiana modified the milestones: Cosmos 1.6.0, Cosmos 1.7.0 Jul 30, 2024
@tatiana tatiana mentioned this issue Jul 31, 2024
18 tasks
@tatiana tatiana modified the milestones: Cosmos 1.7.0, Triage Sep 20, 2024
@tatiana tatiana self-assigned this Dec 9, 2024
@tatiana tatiana modified the milestones: Triage, Cosmos 1.8.0 Dec 9, 2024
@tatiana tatiana added the customer request An Astronomer customer made requested this label Dec 9, 2024
tatiana added a commit that referenced this issue Dec 10, 2024
@tatiana
Copy link
Collaborator

tatiana commented Dec 10, 2024

@dwreeves please, take a look if you have a chance: #1377

tatiana added a commit that referenced this issue Dec 11, 2024
tatiana added a commit that referenced this issue Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:testing Related to testing, like unit tests, integration tests, etc customer request An Astronomer customer made requested this dbt:build Primarily related to dbt build command or functionality execution:local Related to Local execution environment good first issue Good for newcomers parsing:custom Related to custom parsing, like custom DAG parsing, custom DBT parsing, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants