ashb commented on code in PR #56476:
URL: https://github.com/apache/airflow/pull/56476#discussion_r2417698138
##########
airflow-core/src/airflow/models/serialized_dag.py:
##########
@@ -280,17 +281,15 @@ class SerializedDagModel(Base):
"""
__tablename__ = "serialized_dag"
- id: Mapped[str] = mapped_column(UUIDType(binary=False), primary_key=True,
default=uuid6.uuid7)
- dag_id: Mapped[str] = mapped_column(String(ID_LEN), nullable=False)
- _data: Mapped[dict | None] = mapped_column(
+ id = Column(UUIDType(binary=False), primary_key=True, default=uuid6.uuid7)
+ dag_id = Column(String(ID_LEN), nullable=False)
+ _data = Column(
"data", sqlalchemy_jsonfield.JSONField(json=json).with_variant(JSONB,
"postgresql"), nullable=True
)
- _data_compressed: Mapped[bytes | None] = mapped_column("data_compressed",
LargeBinary, nullable=True)
- created_at: Mapped[UtcDateTime] = mapped_column(UtcDateTime,
nullable=False, default=timezone.utcnow)
- last_updated: Mapped[UtcDateTime] = mapped_column(
- UtcDateTime, nullable=False, default=timezone.utcnow,
onupdate=timezone.utcnow
- )
- dag_hash: Mapped[str] = mapped_column(String(32), nullable=False)
+ _data_compressed = Column("data_compressed", LargeBinary, nullable=True)
+ created_at = Column(UtcDateTime, nullable=False, default=timezone.utcnow)
+ last_updated = Column(UtcDateTime, nullable=False,
default=timezone.utcnow, onupdate=timezone.utcnow)
+ dag_hash = Column(String(32), nullable=False)
Review Comment:
Please don't include changes like this in the same PR. This is unrelated to
deterministic hash ordering, and including changes like this will make it
harder to backport this change to include in 3.1.1.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]