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

Support on_warning_callback with TestBehavior.BUILD and ExecutionMode.LOCAL #1571

Merged
merged 11 commits into from
Feb 28, 2025

Conversation

corsettigyg
Copy link
Contributor

@corsettigyg corsettigyg commented Feb 27, 2025

Description

as of now, when we set TestBehavior.BUILD, we are not leveraging the method on_warning_callback that is available for Test nodes and Source Nodes. I have added the parsing to DbtBuildLocalOperator in order to fix it. I tested it locally and I got positive results

Related Issue(s)

#1569

Breaking Change?

Should not be

Checklist

  • I have made corresponding changes to the documentation (if required)
  • I have added tests that prove my fix is effective or that my feature works

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 27, 2025
Copy link

netlify bot commented Feb 27, 2025

Deploy Preview for sunny-pastelito-5ecb04 canceled.

Name Link
🔨 Latest commit 5867fd4
🔍 Latest deploy log https://app.netlify.com/sites/sunny-pastelito-5ecb04/deploys/67c11983253c2f0008878dde

@dosubot dosubot bot added area:parsing Related to parsing DAG/DBT improvement, issues, or fixes dbt:build Primarily related to dbt build command or functionality execution:local Related to Local execution environment labels Feb 27, 2025
@corsettigyg
Copy link
Contributor Author

corsettigyg commented Feb 27, 2025

it seems that the CI is failing due to a different error (#1567)

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.35%. Comparing base (0811e46) to head (5867fd4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1571   +/-   ##
=======================================
  Coverage   97.34%   97.35%           
=======================================
  Files          80       80           
  Lines        4903     4920   +17     
=======================================
+ Hits         4773     4790   +17     
  Misses        130      130           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@tatiana tatiana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@corsettigyg thanks a lot for improving this.

Ideally, we'd also have feature parity / fix this in the other executors, as an example:

So their build operators also can receive on_warning_callback.

I understand these changes are outside the scope of the current PR, but could you please log a GitHub issue so we can keep track of them?

I'm happy for us to merge this PR once the checks pass.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 28, 2025
@corsettigyg corsettigyg changed the title make on_warning_callback functional with TestBehavior.BUILD make on_warning_callback functional with TestBehavior.BUILD for Local EM Feb 28, 2025
@corsettigyg
Copy link
Contributor Author

@tatiana Good catch ! I renamed the name of this PR to specify that it only accommodates the LocalOperator EM. There is an issue logged here that I have created.

Since the CI is all green, happy to contribute :)

@tatiana tatiana changed the title make on_warning_callback functional with TestBehavior.BUILD for Local EM Support on_warning_callback with TestBehavior.BUILD and ExecutionMode.LOCAL Feb 28, 2025
@tatiana tatiana merged commit ddea39c into astronomer:main Feb 28, 2025
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:parsing Related to parsing DAG/DBT improvement, issues, or fixes dbt:build Primarily related to dbt build command or functionality execution:local Related to Local execution environment lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants