uranusjr commented on code in PR #54383:
URL: https://github.com/apache/airflow/pull/54383#discussion_r2306953418
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1865,6 +1880,63 @@ def get_parse_time_mapped_ti_count(self) -> int:
return group.get_parse_time_mapped_ti_count()
+@provide_session
+def _create_orm_dagrun(
+ *,
+ dag: SerializedDAG,
+ run_id: str,
+ logical_date: datetime.datetime | None,
+ data_interval: DataInterval | None,
+ run_after: datetime.datetime,
+ start_date: datetime.datetime | None,
+ conf: Any,
+ state: DagRunState | None,
+ run_type: DagRunType,
+ creating_job_id: int | None,
+ backfill_id: NonNegativeInt | None,
+ triggered_by: DagRunTriggeredByType,
+ triggering_user_name: str | None = None,
+ session: Session = NEW_SESSION,
+) -> DagRun:
Review Comment:
However, this is only used by create_dagrun in SerializedDAG. Putting this
in dagrun.py actually makes it kind of more misplaced in some senses since
you’d need to open an additional module when reading create_dagrun.
Maybe actually we should move create_dagrun to DagRun instead… (e.g.
`DagRun.create(serdag, run_id, ...)` but that’s probably out of the scope here.
--
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]