-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Improve DataprocCreateClusterOperator in Triggers for Enhanced Error Handling and Resource Cleanup #39130
Improve DataprocCreateClusterOperator in Triggers for Enhanced Error Handling and Resource Cleanup #39130
Conversation
75bff4f
to
51eef81
Compare
51eef81
to
c133c83
Compare
c133c83
to
443e9f8
Compare
7b5e114
to
ee85f59
Compare
18598b3
to
55e50d3
Compare
|
||
self.log.info("Sleeping for %s seconds.", self.polling_interval_seconds) | ||
await asyncio.sleep(self.polling_interval_seconds) | ||
except asyncio.CancelledError: |
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 like to understand when exactly is the CancelledError raised.
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.
This is raised when the user marks the task as failed.
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.
Looks like there are other cases too when CancelledError is raised e.g. when the trigger restarts as mentioned in #36090 (comment)
We might need some additional measures here.
55e50d3
to
63bfab1
Compare
5fa0f7a
to
86a43db
Compare
7de3c9f
to
c47de1f
Compare
c47de1f
to
b261f33
Compare
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.
Tested this on local and Astro working fine
e0cacb5
to
e28fff9
Compare
e28fff9
to
36aa2f8
Compare
This PR introduces improvements to the
DataprocCreateClusterOperator
, specifically addressing deficiencies in handling clusters that are created in an ERROR state when operating in deferrable modePreviously, when the
DataprocCreateClusterOperator
was operating in deferrable mode, it did not correctly handle scenarios where clusters were initially created in an ERROR state. The lack of appropriate error handling and resource cleanup led to subsequent retries encountering these errored clusters, attempting deletion, and resulting in pipeline failures.^ 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.rst
or{issue_number}.significant.rst
, in newsfragments.