Skip to content

raise TypeError when default_args not a dictionary #21768

@rustikk

Description

@rustikk

Apache Airflow version

2.2.4 (latest released)

What happened

When triggering this dag below it runs when it should fail. A set is being passed to default_args instead of what should be a dictionary yet the dag still succeeds.

What you expected to happen

I expected the dag to fail as the default_args parameter should only be a dictionary.

How to reproduce

from airflow.models import DAG
from airflow.operators.python import PythonVirtualenvOperator, PythonOperator
from airflow.utils.dates import days_ago


def callable1():
   pass

with DAG(
    dag_id="virtualenv_python_operator",
    default_args={"owner: airflow"},
    schedule_interval=None,
    start_date=days_ago(2),
    tags=["core"],
) as dag:

    task = PythonOperator(
        task_id="check_errors",
        python_callable=callable1,
    )

Operating System

Docker (debian:buster)

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

Deployment details

Astro CLI with images:

  • quay.io/astronomer/ap-airflow-dev:2.2.4-1-onbuild
  • quay.io/astronomer/ap-airflow-dev:2.2.3-2
  • quay.io/astronomer/ap-airflow-dev:2.2.0-5-buster-onbuild

Anything else

Bug happens every time.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions