feat: Add initial support for cleaning orphaned jobs#1427
Merged
Conversation
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
- K8s fake client does not support cascading delete from Owner field Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
[skip ci] Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
Move backend.go and backend_test.go resource cleanup changes to review/service-account-deletion (PR #1423) per reviewer request. PR #1421 should only contain the ServiceAccount deletion race condition fix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Assisted-by: Claude Code:claude [Claude Code]
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
Gen3 Integration Tests
|
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
Gen3 Integration Tests
|
nss10
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR addresses the orphaned Executor Job cleanup gap identified in the PR #1423 review.
Current Behavior⚠️
Currently
CleanOrphanedResourcesdoes not scan for orphaned Executor Jobs (app=funnel-executor).If a worker job completes or is cleaned up but one or more of its Executor Jobs remain, those jobs are never discovered and never deleted — leaking Kubernetes resources.
New Behavior ✔️
CleanOrphanedResourcesnow:app=funnel-executorlabel selector){taskID}-{index})isResourceCleanupNeeded→cleanResourcespipelineThis ensures orphaned Executor Jobs for terminal or missing tasks are cleaned up on the same schedule as other orphaned resources.
Breaking Changes? ❌
No,
CleanOrphanedResourcesis an additional check — existing cleanup behavior is unchanged; this only adds Executor Jobs to the set of resources it considers.Next Steps 🌀
develop(it was not included in the PR fix: Update Funnel resource cleanup all K8s resources (including Worker + Executor jobs) #1423 merge commit)