fix: clean up deleted jobs from orchestrator during scenario deletion#2884
Open
PrathamRanka wants to merge 1 commit into
Open
fix: clean up deleted jobs from orchestrator during scenario deletion#2884PrathamRanka wants to merge 1 commit into
PrathamRanka wants to merge 1 commit into
Conversation
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.
What type of PR is this? (Check all that apply)
Description
Deleting a scenario while jobs are still running or blocked could leave stale job references in the orchestrator. When a remaining job later completed, the orchestrator attempted to unblock dependent jobs that had already been deleted along with the scenario.
Because the deleted jobs' input data nodes no longer existed, dependency resolution could retrieve
Nonefrom the data manager and subsequently raise:This PR ensures that deleted jobs are removed from the orchestrator's internal scheduling queues, preventing stale job references from being processed after scenario deletion.
Related Tickets & Documents
How to reproduce the issue
The added regression test reproduces this workflow and verifies the fix.
Changes
_orchestrator.py
_remove_jobs()to safely remove deleted job IDs from orchestrator scheduling queues.blocked_jobsandjobs_to_runentries associated with deleted jobs._job_manager.py
_delete()to notify the orchestrator when jobs are deleted._delete_many()support to perform the same cleanup for bulk deletions.test_scenario_manager.py
test_hard_delete_scenario_while_jobs_are_blocked.Backporting
This change should be backported to:
Checklist
Reason: The issue is fully covered by a regression/unit test exercising the orchestrator and scenario deletion workflow.
Reason: Internal bug fix with no user-facing API or behavior changes requiring documentation updates.
Reason: Small internal bug fix; release note inclusion can be decided by maintainers.