nathadfield commented on code in PR #63884:
URL: https://github.com/apache/airflow/pull/63884#discussion_r3227264212
##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -517,6 +517,19 @@ core:
type: boolean
example: ~
default: "False"
+ rerun_with_latest_version:
+ description: |
+ Default value for whether cleared, rerun, or backfilled tasks should
use
+ the latest bundle version. When set to True, reruns and backfills pick
up
+ the latest code. When set to False, they use the original bundle
version.
+ When unset, the fallback depends on the call site: False for clearing
or
+ rerunning tasks, True for creating backfills (preserving the historical
+ defaults for each). Individual DAGs can override this with the
+ ``rerun_with_latest_version`` parameter.
+ type: boolean
+ example: ~
+ default: ~
Review Comment:
This was actually a deliberate change in response to earlier feedback from
@bbovenzi. When `default: "False"` was set, `conf.has_option(...)` always
returned `True`, so the UI config endpoint always sent `false` for the global
config and the per-call-site fallback (`true` for backfills, `false` for
clear/rerun) never kicked in. Removing the default fixed that: `with default:
~, has_option` returns `False` when unset, and the UI sends `null` so the hook
applies the right fallback.
`conf.getboolean(...)` won't fail either as the resolver passes
`fallback=fallback` explicitly:
`return conf.getboolean("core", "rerun_with_latest_version",
fallback=fallback)`
Happy to revisit if you can think of a way to keep both behaviors, but I
think `default: ~` is what we need here.
--
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]