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

Bugfix: Better exception handling and cluster clean up #68

Merged
merged 5 commits into from
Sep 25, 2024

Conversation

venkatajagannath
Copy link
Contributor

@venkatajagannath venkatajagannath commented Sep 19, 2024

This PR fixes a bug for cleaning up cluster resources when they are no longer required.

We make 2 changes --

  1. SubmitRayJob -- Add better exception handling to ensure cluster is deleted if there is an exception in the execute() method
  2. RayJobTrigger -- Added cleanup methods to ensure that even if there is an exception when the trigger is running, the cluster clean up still happens. This was not the case earlier

Also added additional unit tests for both operator & trigger to ensure high code coverage.

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.44%. Comparing base (48b9785) to head (27a2020).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ray_provider/operators/ray.py 95.65% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   95.42%   96.44%   +1.02%     
==========================================
  Files           5        5              
  Lines         546      563      +17     
==========================================
+ Hits          521      543      +22     
+ Misses         25       20       -5     

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

@venkatajagannath venkatajagannath changed the title Bugfix: Setting up on_failure_callback Bugfix: Better exception handling and cluster clean up Sep 24, 2024
pankajastro
pankajastro previously approved these changes Sep 25, 2024
@venkatajagannath venkatajagannath merged commit b7dc197 into main Sep 25, 2024
17 checks passed
@venkatajagannath venkatajagannath deleted the on_failure_callback branch September 25, 2024 09:03
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.

Add on_failure_callback to the SubmitRayJob operator
3 participants