Issue 1:
Apache Airflow version

2.2.4 (latest released)

What happened

After setting up alert emails using AWS SES as instructed here, I received the following error message:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 2103, in email_alert
send_email(self.task.email, subject, html_content)
File "/usr/local/lib/python3.8/site-packages/airflow/utils/email.py", line 57, in send_email
return backend(
TypeError: send_email() got multiple values for argument 'from_email'

What you expected to happen

the send_email method in

airflow/airflow/providers/amazon/aws/utils/emailer.py

Lines 25 to 37
in
d94fa37

def send_email(

from_email: str,

to: Union[List[str], str],

subject: str,

html_content: str,

files: Optional[List] = None,

cc: Optional[Union[List[str], str]] = None,

bcc: Optional[Union[List[str], str]] = None,

mime_subtype: str = 'mixed',

mime_charset: str = 'utf-8',

conn_id: str = 'aws_default',

**kwargs,

) -> None:

doesn't match the invocation of the backend method in

airflow/airflow/utils/email.py

Lines 57 to 70
in
ee9049c

return backend(

to_comma_separated,

subject,

html_content,

files=files,

dryrun=dryrun,

cc=cc,

bcc=bcc,

mime_subtype=mime_subtype,

mime_charset=mime_charset,

conn_id=backend_conn_id,

from_email=from_email,

**kwargs,

)

in the former (provider-amazon), the from_email is the first positional argument. However in the latter (main airflow), from_email is misplaced as a keyword argument.

How to reproduce

Use Airflow 2.2.4 with providers-amazon/3.0.0

Observe the log from a failed DAG

Operating System

Amazon Linux 2

Versions of Apache Airflow Providers

apache-airflow-providers-amazon 3.0.0

Deployment

Other Docker-based deployment

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Description

Currently the 'minimal' version of Airflow Docker image ships with 20+ extra dependencies, which according to my understanding, are the most common used libraries. The idea of this PR to prepare another, pure Airflow image, which wouldn't have those dependencies and would only ship with core Airflow package.

https://github.com/apache/airflow/blob/main/Dockerfile#L37

Alternative solutions would be:

ship separate Airflow images per each executor type (kubernetes, dask, celery, etc.). I like this one equally to having vanilla Airflow image

fix the issue with dask. I don't like this idea as it's less scalable as any of packages mentioned below could yield similar issues

Use case/motivation

We are using official Airflow image for Airflow on our k8s cluster, which is constantly scanned for security vulnerabilities. The fact that dask is pinned to very low version is problematic for us cause there are a lot of red flags coming from this package. We do not need dask at all as we rely on KubernetesExecutor. Some of the security scanners work on docker layer level so removing/upgrading dask doesn't solve the problem.

Related issues

No response

Are you willing to submit a PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct