DG47 commented on code in PR #74120:
URL: https://github.com/apache/airflow/pull/74120#discussion_r4668882203
##########
providers/databricks/src/airflow/providers/databricks/operators/databricks.py:
##########
@@ -307,6 +307,13 @@ def
_handle_deferrable_databricks_operator_completion(event: dict, log: Logger)
"run_job_task": "job_parameters",
}
+# Per-task parameter slots that the Databricks API rejects when combined with
the dict-shaped field
+# above. ``python_wheel_task.parameters`` (positional CLI arguments) is
mutually exclusive with
+# ``python_wheel_task.named_parameters``, so a task that already carries one
must not receive the other.
+_TASK_PARAM_SLOTS_CONFLICTING_WITH_DICT_PARAM_FIELD = {
+ "python_wheel_task": ("parameters",),
Review Comment:
Done in 30aa77cff7: moved
`_RUN_NOW_PARAM_SLOTS_CONFLICTING_WITH_JOB_PARAMETERS` above the map and added
`"run_job_task": _RUN_NOW_PARAM_SLOTS_CONFLICTING_WITH_JOB_PARAMETERS`, so a
`run_job_task` that already has one of the legacy slots no longer gets
`job_parameters` injected. The test is now
`test_submit_run_skips_param_injection_when_task_has_conflicting_parameters`,
with `run_job_task` cases for `python_params`, `notebook_params`, `jar_params`
and `python_named_params` (no injection), plus an empty `python_params` and a
task without legacy slots (injection still happens). The four conflicting cases
fail without the change and pass with it. Docstring and `submit_run.rst`
mention `run_job_task` too. Thanks for testing it against the API.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]