Skip to content

Conversation

@chirodip98
Copy link

@chirodip98 chirodip98 commented Dec 27, 2025

Fixes : (apache/airflow#59812)
In Case of Cluster does not exists , DataprocDeleteClusterOperator will raise AirflowSkipException.

@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Dec 27, 2025
@chirodip98 chirodip98 changed the title Fix/delete cluster dataproc bug Fix/delete cluster dataproc bug Dec 27, 2025
Copy link
Author

@chirodip98 chirodip98 left a comment

Choose a reason for hiding this comment

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

@potiuk kindly review . I am fairly new to contributing to airflow. Look forward to your guidance and feedback!

@potiuk
Copy link
Member

potiuk commented Dec 27, 2025

@potiuk kindly review . I am fairly new to contributing to airflow. Look forward to your guidance and feedback!

Guidance no.1 : Please avoid pinging individual maintainers - just open PR. and not ping people. When you ping someone, you significantly decrease your chances of getting review by someone else, and when the person you ping is not available or simply does not want to - for any reason - review it, you might wait for a long time for any review (which might happen anyway, but then you can again ping (in general, not individual maintainer) after few days and that will bring your PR back to the top of the pile of PRs.

@potiuk potiuk force-pushed the fix/delete-cluster-dataproc-bug branch from dd10705 to 2f24ab0 Compare December 28, 2025 08:57
chirodip98 and others added 4 commits December 28, 2025 16:17
* Compatibility updates for sqlalchemy 2.0

* Fixes for review comments

* Fixes for review comments

* More fixes for review comments
Copy link
Author

@chirodip98 chirodip98 left a comment

Choose a reason for hiding this comment

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

Need support to run Workfows

@potiuk
Copy link
Member

potiuk commented Dec 28, 2025

I approved it but I thin we need a look from @VladaZakharova and @MaksYermak -> Google team, and - ideally a system test log / screenshots on running this operator using system tests for that operation.

@chirodip98
Copy link
Author

chirodip98 commented Dec 29, 2025

Thanks!
As a System Test I created a bare-minimum Dag which Simulates the scenarios on my local breeze-airflow setup. I will try to add the screenshots for the same, also explore the system tests folder if I can add few test cases.

@chirodip98
Copy link
Author

chirodip98 commented Dec 29, 2025

Scenario 1 : When the Delete operation is performed when Cluster does'nt exists (already-deleted)

image image image

@chirodip98
Copy link
Author

chirodip98 commented Dec 29, 2025

Scenario 2 : When Delete Cluster Operation is performed in defferable mode

image [scenario_2_logs.txt](https://github.com/user-attachments/files/24369267/scenario_2_logs.txt)

@chirodip98
Copy link
Author

Scenario 3 : When Delete operation is perform , but not in deffered mode
image

@chirodip98
Copy link
Author

chirodip98 commented Dec 29, 2025

Scenario 4 : When two Delete actions performed at the same time (raises Exception)
image

@chirodip98 chirodip98 changed the title Fix/delete cluster dataproc bug #59812 : DataprocDeleteClusterOperator to raise AirflowSkipException if the cluster is already Deleted / Not Found Dec 29, 2025

mock_hook.return_value.wait_for_operation.assert_not_called()
assert not mock_defer.called
assert mock_defer.called
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this required?

Copy link
Author

Choose a reason for hiding this comment

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

yes

@chirodip98 chirodip98 force-pushed the fix/delete-cluster-dataproc-bug branch from 0a30780 to a51e6e1 Compare January 2, 2026 08:57
@shahar1 shahar1 changed the title #59812 : DataprocDeleteClusterOperator to raise AirflowSkipException if the cluster is already Deleted / Not Found DataprocDeleteClusterOperator to raise AirflowSkipException if the cluster is already Deleted / Not Found Jan 3, 2026
Copy link
Author

@chirodip98 chirodip98 left a comment

Choose a reason for hiding this comment

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

Is it okay If I raise a new PR for this issue and close this? I am facing some issues while rebasing. @potiuk

@chirodip98
Copy link
Author

closing this as re-opened
#60083

@chirodip98 chirodip98 closed this Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataprocDeleteClusterOperator fails if cluster was already deleted by DataprocCreateClusterOperator(delete_on_error=True)

8 participants