Skip to content

Feat: add failed jobs as unused#283

Merged
yonahd merged 13 commits intomainfrom
yonahd-patch-1
May 23, 2024
Merged

Feat: add failed jobs as unused#283
yonahd merged 13 commits intomainfrom
yonahd-patch-1

Conversation

@yonahd
Copy link
Copy Markdown
Owner

@yonahd yonahd commented May 22, 2024

This PR adds a case where A Job has failed and reached it's maximum retries.
This pod should now be considered unused

What this PR does / why we need it?

PR Checklist

  • This PR adds K8s exceptions (false positives)
  • This PR adds new code
  • This PR includes tests for new/existing code
  • This PR adds docs

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.96%. Comparing base (710239d) to head (72e1cab).
Report is 3 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #283      +/-   ##
==========================================
+ Coverage   40.84%   40.96%   +0.12%     
==========================================
  Files          58       58              
  Lines        2904     2910       +6     
==========================================
+ Hits         1186     1192       +6     
  Misses       1530     1530              
  Partials      188      188              

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

@doronkg
Copy link
Copy Markdown
Contributor

doronkg commented May 23, 2024

Left small suggestion. Few thoughts, as we're shifting the way we approach unused Jobs from just completed ones:

  1. If adding failures as an indication for unused, let's add another condition for DeadlineExceeded.
  2. We can also consider checking FailedIndexes which is another type of BackoffLimit.
  3. What about suspended Jobs?

Comment thread pkg/kor/jobs.go Outdated
Comment thread pkg/kor/jobs_test.go Outdated
Comment thread pkg/kor/jobs_test.go Outdated
@yonahd yonahd merged commit 852a6f9 into main May 23, 2024
@yonahd yonahd deleted the yonahd-patch-1 branch May 23, 2024 16:16
@doronkg doronkg mentioned this pull request Jun 7, 2024
4 tasks
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.

3 participants