-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Merge DbtCloudJobRunAsyncSensor logic to DbtCloudJobRunSensor #30227
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
Merge DbtCloudJobRunAsyncSensor logic to DbtCloudJobRunSensor #30227
Conversation
11f6807 to
a58bc04
Compare
599ef53 to
abc5998
Compare
…unAsyncSensor to DbtCloudJobRunSensor
… deferrable attribute is set to True
abc5998 to
a428e5d
Compare
d5de0ca to
31044d0
Compare
|
@uranusjr Does it timeout again? If so, could you please help rerun it? Thanks! |
josh-fell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A much-need consolidation indeed! Just a few small comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind including this note in a .. note:: directive? The formatting of the docs with a Note would put some emphasis around the deprecation.
Let's remove the code snippet example below too since that example shows a deprecated sensor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure! I just update it. I'm not sure whether we can remove the code snippet. If my memory serves me right, it won't pass the CI.
…le mode and DbtCloudJobRunAsyncSensor deprecation
…t_cloud_run_job_sensor_defered
fdfd23b to
a774320
Compare
|
HI @josh-fell , I've tried to address all the comments. Could you please take a look when you have time? Thanks! |
Why making this change?
apache-airflow-providers-dbt-cloud treats the deferred execution of its operators and sensors differently, which might cause confusion. For example, DbtCloudRunJobOperator uses the deferrable parameter to toggle deferred execution while we need to use another sensor for DbtCloudJobRunSensor (i.e., DbtCloudJobRunAsyncSensor) to achieve the same thing.
What's changed?
In this pull request, I move the deferred logic from DbtCloudJobRunAsyncSensor to DbtCloudJobRunSensor so that we can keep the consistency and reduce maintenance effort. Instead of removing DbtCloudJobRunSensor, I add a deprecation warning in case there're users using it.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.