ferruzzi commented on code in PR #51494:
URL: https://github.com/apache/airflow/pull/51494#discussion_r2132997060
##########
airflow-core/src/airflow/models/deadline.py:
##########
@@ -136,6 +162,30 @@ def _evaluate_with(self, **kwargs: Any) -> datetime:
"""Must be implemented by subclasses to perform the actual
evaluation."""
raise NotImplementedError
+ @classmethod
+ def deserialize_reference(cls, reference_data: dict):
Review Comment:
`reference_data` is not used by the base/default implementation but is used
for References which accept a parameter, like FixedDatetimeReference (below).
It is in this signature to maintain signature consistency.
##########
airflow-core/src/airflow/models/dag.py:
##########
@@ -1917,7 +1918,7 @@ class DagModel(Base):
# Asset expression based on asset triggers
asset_expression = Column(sqlalchemy_jsonfield.JSONField(json=json),
nullable=True)
# DAG deadline information
- deadline = Column(sqlalchemy_jsonfield.JSONField(json=json), nullable=True)
+ _deadline = Column("deadline", sqlalchemy_jsonfield.JSONField(json=json),
nullable=True)
Review Comment:
This change allows us to change the python name of the column without
changing the actual SQL name, so no migration is needed. I did it this way so
the property (below) can use the existing name and allow for proper
serialization/deserialization.
--
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]