feat(submit): require explicit confirmation for all prepare_submit_job params
Remove defaults from queue, executor_memory, executor_cores, num_executors, and app_name in prepare_submit_job. All must now be explicitly confirmed by the caller. Also add extra_args to the PendingSubmission snapshot so users can confirm non-conf spark-submit flags (e.g. --jars, --py-files) at prepare time; confirm_submit_job passes them through to build_spark_submit_command. This is an intentional breaking change to the MCP tool contract: callers can no longer rely on implicit defaults.
This commit is contained in:
@@ -47,7 +47,15 @@ def test_prepare_submit_job_emits_debug_and_info(log_capture, tmp_path):
|
||||
script = tmp_path / "demo.py"
|
||||
script.write_text("print('hi')\n")
|
||||
log_capture.truncate(0); log_capture.seek(0)
|
||||
submit.prepare_submit_job(connection="prod", script_path=str(script), queue="research")
|
||||
submit.prepare_submit_job(
|
||||
connection="prod",
|
||||
script_path=str(script),
|
||||
queue="research",
|
||||
executor_memory="4G",
|
||||
executor_cores=2,
|
||||
num_executors=2,
|
||||
app_name="test-app",
|
||||
)
|
||||
text = log_capture.getvalue()
|
||||
assert "DEBUG|prepare_submit_job enter" in text
|
||||
assert "INFO|prepare_submit_job ok" in text
|
||||
|
||||
Reference in New Issue
Block a user