shivaam opened a new pull request, #64939: URL: https://github.com/apache/airflow/pull/64939
When a backfill reprocesses an existing DAG run (via "reprocess failed" or "reprocess completed"), the parameters provided by the user are ignored. The existing run's old conf is kept, even though the user explicitly passed new parameters. This means tasks see stale params instead of what the user intended. This PR fixes that by: - Applying the user-provided conf to reprocessed DAG runs, not just newly created ones - Only overriding conf when the user actually provides params — omitting params preserves the existing conf - Validating the provided conf against the DAG's param schema before creating any runs, matching the validation that already happens for manually triggered runs **Open items for follow-up:** 1. **Conf validation error handling:** Both `create_dagrun()` and the new backfill conf validation raise a `ValueError` on invalid params, but the backfill API route doesn't catch `ValueError` — so it surfaces as a 500 instead of a clean 400. The other backfill validations use custom exceptions that are caught and returned as proper error responses. This is a pre-existing pattern (manual trigger has the same gap) but worth addressing separately. 2. **UI: accidental conf override:** The backfill form pre-fills params with DAG defaults. If an existing run had custom conf (e.g. `client_id="acme"`), submitting the form without changes would overwrite it with the default (`client_id="all"`). A follow-up PR could add a checkbox like "Override parameters on existing runs" to give users explicit control. This only affects the UI — the CLI already behaves correctly since omitting `--dag-run-conf` sends null. closes: #59043 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.6) Generated-by: Claude Code (Opus 4.6) 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]
