Skip to content

Remove email configs, operator and callbacks - #46041

Closed
hussein-awala wants to merge 11 commits into
apache:mainfrom
hussein-awala:remove_email_support
Closed

Remove email configs, operator and callbacks#46041
hussein-awala wants to merge 11 commits into
apache:mainfrom
hussein-awala:remove_email_support

Conversation

@hussein-awala

@hussein-awalahussein-awala commented Jan 25, 2025

Copy link
Copy Markdown
Member

This PR:

  • removes the ability to use email_on_retry and email_on_failure to notify the users by email in favor of the SMTP notifier
  • removes EmailOperator from airflow.operators.email in favor of airflow.providers.smtp.operators.smtp.EmailOperator
  • cleans their usage and remove SMTP section from Airflow configuration

closes: #30530

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 - id: check-no-providers-in-core-examples
language: pygrep
name: No providers imports in core example DAGs
description: The core example DAGs have no dependencies other than standard provider or core Airflow
entry: "^\\s*from airflow\\.providers.(?!standard.)"
pass_filenames: true
files: ^airflow/example_dags/.*\.py$

What about pre-installed providers? if we really want to keep the rule as it is, then I will need to update the example.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should do that. We should keep pre-installed to the minimum necessary.
Probably raise this as one of the items in the lazy consensus

Comment threadtests/api_connexion/endpoints/test_config_endpoint.py
@eladkal

eladkal commented Jan 25, 2025

Copy link
Copy Markdown
Contributor

We need also to remove the email and smtp part of airflow.cfg
https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#email

https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#smtp

@eladkaleladkal mentioned this pull request Jan 26, 2025
2 tasks
@eladkal

Copy link
Copy Markdown
Contributor

I merged #47146
@hussein-awala what is left to be completed on this PR?

@eladkaleladkal mentioned this pull request Mar 26, 2025
1 task
@uranusjr
uranusjr self-requested a review March 26, 2025 18:37
@uranusjr

Copy link
Copy Markdown
Member

Do we still want to do this? Happy to help if so.

@eladkal

Copy link
Copy Markdown
Contributor

Do we still want to do this? Happy to help if so.

Yes. we need to sort this one out before RC1

@uranusjr

Copy link
Copy Markdown
Member

We never did anything, and now 3.0 is out…

What do we do next?

@eladkal

Copy link
Copy Markdown
Contributor

We never did anything, and now 3.0 is out…

What do we do next?

Move the email util from airflow-core to smtp provider with airflow4 deprecation warning.
Deprecate email configs from core in favor smtp configs

@uranusjr

Copy link
Copy Markdown
Member

We actually already made some changes and deprecated some configs during task sdk implementation. I think this needs to start from scratch. I’m going to do some of the config changes to catch up with task sdk changes first.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actionsgithub-actionsBot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Jun 13, 2025
@zachliu

Copy link
Copy Markdown
Contributor

We need also to remove the email and smtp part of airflow.cfg

hooray! this surely simplifies things a lot!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:APIAirflow's REST/HTTP APIarea:CLIarea:dev-toolsarea:serializationarea:task-sdkarea:Triggererkind:documentationstaleStale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate core EmailOperator to SMTP provider

4 participants

@hussein-awala@eladkal@uranusjr@zachliu