Skip to content

Pydantic 2.0.2 warnings/errors causing issues (Airflow 2.6.2) #32431

@kulasbart

Description

@kulasbart

Apache Airflow version

2.6.2

What happened

When launching webserver, pydantic raised errors. Not sure if this is expected behavior or not.

However, I was able to resolve the error/warning message by downgrading pydantic to 1.10.10

What you think should happen instead

No response

How to reproduce

airflow webserver -p 8080

raise PydanticUserError(
pydantic.errors.PydanticUserError: A non-annotated attribute was detected: dag_id = <class 'str'>. All model fields require a type annotation; if dag_id is not meant to be a field, you may be able to resolve this error by annotating it as a ClassVar or updating model_config['ignored_types'].

For further information visit https://errors.pydantic.dev/2.0.2/u/model-field-missing-annotation

Operating System

macos

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions