jeremychia opened a new pull request, #74338:
URL: https://github.com/apache/airflow/pull/74338
a Dag that takes a start and an end date as params cannot stop someone
triggering it with the end before the start. per-field schema checks cannot see
another field, so authors add a first task that fails, which still creates a
failed Dag run.
this lets a `date`, `date-time` or `time` param be bounded by another param
with the ajv-formats keywords `formatMinimum`, `formatExclusiveMinimum`,
`formatMaximum` and `formatExclusiveMaximum`. the bound is `{"$data":
"1/<param>"}` or a literal value.
```python
"end": Param(None, type=["null", "string"], format="date-time",
formatExclusiveMinimum={"$data": "1/start"})
```
- **trigger form:** the error shows under the field, and the trigger button
stays disabled until the values pass.
- **server:** `SerializedParamsDict.validate()` runs the same check when a
Dag run is created, so api and cli triggers get a 400.
open question: the task sdk does not run the check. a scheduled Dag whose
defaults break a bound fails at run creation, not at parse time. happy to add
it there if wanted.
checked: the new python and vitest tests, the full ui vitest suite,
`tests/unit/serialization`, and the prek pre-commit and manual stages. docs
were not built locally.
closes: #74336
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 5.5)
Generated-by: Claude Code (Opus 5.5) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
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]