Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

#118: fix run_namespaced_job to read the condition status rather than the number of succeeded/failed pods in a job #119

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

NicholasFiorentini
Copy link
Contributor

@NicholasFiorentini NicholasFiorentini commented Mar 7, 2024

Closes #118.

This PR changes the behaviour of run_namespaced_job:

  • Jobs wrongfully terminated as failures are now correctly recognized as successful.
  • Jobs terminated as successful will continue to remain successful.

In case of a failure, the exception now reports the reason reported by Kubernetes to help debug the issue.

Checklist

  • References any related issue by including "Closes #" or "Closes ".
  • Includes tests or only affects documentation.
  • Passes pre-commit checks.
  • Includes screenshots of documentation updates. not applicable

@NicholasFiorentini NicholasFiorentini changed the title wait_for_completion use v1_job_status.status.conditions to check for … #118: fix run_namespaced_job to read the condition status rather than the number of succeeded/failed pods in a job Mar 7, 2024
@NicholasFiorentini NicholasFiorentini marked this pull request as ready for review March 7, 2024 12:01
@NicholasFiorentini NicholasFiorentini requested a review from a team as a code owner March 7, 2024 12:01
@NicholasFiorentini
Copy link
Contributor Author

@WillRaphaelson hi there, do you have some time to review this PR? 🙏

Copy link
Contributor

@chrisguidry chrisguidry left a comment

Choose a reason for hiding this comment

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

Thanks @NicholasFiorentini, looking at the conditions is definitely more accurate, thank you!

@chrisguidry chrisguidry merged commit c7248ba into PrefectHQ:main Mar 11, 2024
6 checks passed
@NicholasFiorentini
Copy link
Contributor Author

Thanks @chrisguidry !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jobs launched with run_namespaced_job fails in case of evictions
2 participants