You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vincbeck (via GitHub)" <gi...@apache.org> on 2023/03/09 17:00:01 UTC

[GitHub] [airflow] vincbeck commented on a diff in pull request #28900: Convert DagFileProcessor.execute_callbacks to Internal API

vincbeck commented on code in PR #28900:
URL: https://github.com/apache/airflow/pull/28900#discussion_r1131330638


##########
airflow/models/pydantic/dagrun.py:
##########
@@ -14,35 +14,32 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+from __future__ import annotations
 
 from datetime import datetime
-from typing import List, Optional
 
 from pydantic import BaseModel as BaseModelPydantic
 
-from airflow.models.pydantic.dataset import DatasetEventPydantic
-
 
 class DagRunPydantic(BaseModelPydantic):
     """Serializable representation of the DagRun ORM SqlAlchemyModel used by internal API."""
 
     id: int
     dag_id: str
-    queued_at: Optional[datetime]
+    queued_at: datetime | None
     execution_date: datetime
-    start_date: Optional[datetime]
-    end_date: Optional[datetime]
+    start_date: datetime | None
+    end_date: datetime | None
     state: str
-    run_id: Optional[str]
-    creating_job_id: Optional[int]
+    run_id: str | None
+    creating_job_id: int | None
     external_trigger: bool
     run_type: str
-    data_interval_start: Optional[datetime]
-    data_interval_end: Optional[datetime]
-    last_scheduling_decision: Optional[datetime]
-    dag_hash: Optional[str]
+    data_interval_start: datetime | None
+    data_interval_end: datetime | None
+    last_scheduling_decision: datetime | None
+    dag_hash: str | None
     updated_at: datetime
-    consumed_dataset_events: List[DatasetEventPydantic]

Review Comment:
   I could not find this one in `airflow/models/dag.py`, hence I removed it. Again, I might miss something



##########
airflow/models/pydantic/dagrun.py:
##########
@@ -14,35 +14,32 @@
 # KIND, either express or implied.  See the License for the

Review Comment:
   I renamed this one to make sense with dagrun.py in `airflow/models`. Happy to revert if it does not make sense 



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org