This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 4d84e304b8 Fix Pydantic 2 pickiness about model definition (#32307)
4d84e304b8 is described below
commit 4d84e304b86c97d0437fddbc6b6757b5201eefcc
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Jul 1 23:41:59 2023 +0200
Fix Pydantic 2 pickiness about model definition (#32307)
The new Pydantic 2 has been released on 30th of June and it is a
bit more picky about model definition, thus causing Airflow to
fail because there were wrong definitions of models (previously
corretly validated).
Fixes: #32301
---
airflow/serialization/pydantic/dataset.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/airflow/serialization/pydantic/dataset.py
b/airflow/serialization/pydantic/dataset.py
index 5ee0d18128..659e5a1899 100644
--- a/airflow/serialization/pydantic/dataset.py
+++ b/airflow/serialization/pydantic/dataset.py
@@ -38,10 +38,10 @@ class TaskOutletDatasetReferencePydantic(BaseModelPydantic):
"""Serializable version of the TaskOutletDatasetReference ORM
SqlAlchemyModel used by internal API."""
dataset_id: int
- dag_id = str
- task_id = str
- created_at = datetime
- updated_at = datetime
+ dag_id: str
+ task_id: str
+ created_at: datetime
+ updated_at: datetime
class Config:
"""Make sure it deals automatically with SQLAlchemy ORM classes."""