Skip to content

Commit

Permalink
Fix Pydantic 2 pickiness about model definition (#32307)
Browse files Browse the repository at this point in the history
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
(cherry picked from commit 4d84e30)
  • Loading branch information
potiuk committed Jul 2, 2023
1 parent 06a8853 commit 4e1c0bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions airflow/serialization/pydantic/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ class TaskOutletDatasetReferencePydantic(BaseModelPydantic):
"""

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 ORM classes of SQL Alchemy"""
Expand Down

0 comments on commit 4e1c0bb

Please sign in to comment.