Vamsi-klu commented on PR #68895:
URL: https://github.com/apache/airflow/pull/68895#issuecomment-4912280657

   Confirmed the root cause: the early-exit guard in getsection() only checked 
self._default_values.has_section(), so lazy-registered provider sections whose 
keys all default to None (like celery_broker_transport_options) exit before the 
env-var loop runs, dropping AIRFLOW__SECTION__KEY overrides. Swapping to 
_has_section_in_any_defaults() (parser.py line 1599) is the right fix and 
reuses the exact "exists anywhere" helper already relied on inside write() at 
line 2018, so it aligns the two paths rather than adding new logic. Also 
confirmed all-None sections stay correct: line 1884 still gates default loading 
on _default_values only, so a fallback-only section starts as {} and is 
populated purely by env vars, avoiding the None-value raise at line 1903-1904. 
Regression tests cover the env-var-only, cfg-fallback, and truly-unknown cases, 
and the first fails without the change. One minor note (not blocking): for any 
section that lives only in provider fallback defaults, getsection now re
 turns just the env-var-overridden keys, not the section's fallback default 
values, since only _default_values is merged in at line 1884 — still a strict 
improvement over the prior None, just flagging in case you want to fold the 
fallback defaults in too.
   


-- 
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]

Reply via email to