Add repair_run action to manage_job_runs MCP tool#444
Open
jacksandom wants to merge 2 commits intomainfrom
Open
Add repair_run action to manage_job_runs MCP tool#444jacksandom wants to merge 2 commits intomainfrom
jacksandom wants to merge 2 commits intomainfrom
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.
Summary
repairaction tomanage_job_runsMCP tool, enabling retry of only failed tasks instead of re-running entire jobsrepair_run()core function following the existingrun_job_nowpatternrerun_all_failed_tasks,rerun_dependent_tasks,rerun_tasks, andlatest_repair_idCloses #392
Problem
When a job run had failed tasks, the LLM had no way to repair the run via MCP. The
repairaction was missing frommanage_job_runs, so attempts fell through to aValueError. The LLM then fell back torun_now, re-running all tasks (including successful ones), wasting compute and time.Changes
databricks-tools-core/.../jobs/runs.pyrepair_run()functiondatabricks-tools-core/.../jobs/__init__.pyrepair_rundatabricks-mcp-server/.../tools/jobs.py"repair"action dispatch with error handlingdatabricks-tools-core/tests/.../conftest.pyfailing_notebook_pathfixturedatabricks-tools-core/tests/.../test_runs.pyTestRepairRunclassTest plan
TestRepairRun)rerun_all_failed_tasks=Truereturnsrepair_idlatest_repair_id