moomindani commented on code in PR #72148:
URL: https://github.com/apache/airflow/pull/72148#discussion_r3887844298
##########
providers/databricks/src/airflow/providers/databricks/operators/databricks.py:
##########
@@ -452,6 +452,13 @@ class DatabricksCreateJobsOperator(BaseOperator):
.. seealso::
This will only be used on create. In order to reset ACL consider
using the Databricks
UI.
+ :param performance_target: Optional performance mode for runs of this job
on serverless compute.
+ Either ``PERFORMANCE_OPTIMIZED`` (prioritizes fast startup and
execution) or
+ ``STANDARD`` (enables cost-efficient execution of serverless
workloads). This field
+ will be templated.
+
+ .. seealso::
+ https://docs.databricks.com/api/workspace/jobs/create
Review Comment:
Correction — this comment originally asked for a docstring note saying that
unrecognised values are ignored rather than rejected. Withdrawing that: the
tolerance is not a property of `performance_target`, it is how several of these
fields behave, so a note attached to this one parameter would be arbitrary.
Same workspace, same `jobs/create`, one invalid value per field:
| field | value sent | result |
| --- | --- | --- |
| `performance_target` | `"FAST"` | 200, field absent from `settings` |
| `edit_mode` | `"BOGUS"` | 200, field absent from `settings` |
| `schedule.pause_status` | `"BOGUS"` | 200, schedule kept, `pause_status`
returned as `UNPAUSED` |
And plenty of fields do validate, with good messages:
| field | value sent | result |
| --- | --- | --- |
| `git_source.git_provider` | `"bogus"` | `must be one of:
github,gitlab,bitbucketcloud,...` |
| `access_control_list[].permission_level` | `"CAN_BOGUS"` | `Permission
type not defined` |
| `health.rules.metric` | `"BOGUS_METRIC"` | `Missing required field:
settings.health.rules.metric` |
| `max_concurrent_runs` | `-5` | `Invalid maximum concurrent runs (-5) -
must be in the range [0, 1000]` |
So the API validates some fields and silently drops or defaults others, and
`performance_target` sits in the second group next to at least `edit_mode` and
`pause_status` — neither of which carries such a note in the provider docs
today. Nothing for this PR to document, and nothing here changes the approval.
---
Drafted-by: Claude Code (Opus 5); reviewed by @moomindani before posting
--
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]