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

Mark DBT cloud job run failed if cancelled by raising AirflowFailException #1082

Merged
merged 4 commits into from May 16, 2023

Conversation

pankajkoti
Copy link
Collaborator

@pankajkoti pankajkoti commented May 11, 2023

Currently, if DBT Cloud job run is cancelled our async operator just logs
a message in the task logs that the job is cancelled and marks the task
status as success.
The PR now raises an AirflowFailException to mark the task as failed
and that it is not retried by Airflow as the user may not pay attention to
re-cancel the job or may not have set retries to 0 for the task in their DAG.

closes: #1081

@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (e6de12d) 98.55% compared to head (e16fada) 98.56%.

❗ Current head e16fada differs from pull request most recent head 8f0ba62. Consider uploading reports for the commit 8f0ba62 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1082   +/-   ##
=======================================
  Coverage   98.55%   98.56%           
=======================================
  Files          90       90           
  Lines        5208     5211    +3     
=======================================
+ Hits         5133     5136    +3     
  Misses         75       75           
Impacted Files Coverage Δ
astronomer/providers/dbt/cloud/operators/dbt.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pankajkoti pankajkoti changed the title Mark DBT cloud job run failed if cancelled and set retries to 0 Mark DBT cloud job run failed if cancelled by raising AirflowFailException May 11, 2023
@pankajkoti pankajkoti marked this pull request as ready for review May 15, 2023 12:05
@pankajkoti pankajkoti merged commit 4854faf into main May 16, 2023
0 of 13 checks passed
@pankajkoti pankajkoti deleted the fix-dbt-cancel-status branch May 16, 2023 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Zendesk ticket] DbtCloudRunJobOperatorAsync task marked success if job is cancelled
2 participants