shivaam opened a new pull request, #76346:
URL: https://github.com/apache/airflow/pull/76346

   The SMTP emailer (`airflow.providers.smtp.utils.emailer`) reads the `[smtp]` 
options, but their defaults live in Airflow core's `config.yml`. This gives the 
emailer the same defaults in code (`conf.get(..., fallback=...)`), so the 
provider no longer depends on core for them.
   
   Nothing changes for users. Core still defines the same defaults and they are 
found first. Values set in `airflow.cfg` or `AIRFLOW__SMTP__*` still win.
   
   **Next step for `[smtp]` in core** (follow-up to the question in #75414). 
Two options:
   
   - **A. Now:** remove `[smtp]` from core and raise core's SMTP floor to this 
release. Email works the same, but the options disappear from the config docs 
and `airflow config list`.
   - **B. Later:** keep `[smtp]` in core until this provider requires Airflow 
3.2+, then move it to the provider's `provider.yaml`. It can't move sooner: 
Airflow 2.11–3.1 fail to start if a provider declares a section core already 
has.
   
   Both are built and tested locally. I prefer B. Happy to go either way.
   
   The tests now check the default values directly instead of reading them from 
core's config, and three new tests send email with core's `[smtp]` defaults 
removed. The provider docs now list the options and their defaults.
   
   **Testing:**
   - Unit tests: SMTP provider 101 passed.
   - With `[smtp]` removed from core: the new tests fail without this change.
   - Released Airflow 2.11.2, 3.0.6, 3.1.8, 3.2.2 and 3.3.2 with this provider: 
real sends to a local SMTP server pass with defaults, env vars and 
`airflow.cfg`.
   - With core's `[smtp]` removed, a scheduler run sent the task's retry and 
failure alerts using these defaults.
   
   related: #30530, #75414
   
   ---
   
   ##### 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]

Reply via email to