ashb commented on a change in pull request #17265:
URL: https://github.com/apache/airflow/pull/17265#discussion_r678970064
##########
File path: tests/conftest.py
##########
@@ -444,11 +445,17 @@ def __exit__(self, type, value, traceback):
dag.__exit__(type, value, traceback)
if type is None:
dag.clear()
+
self.dag_run = dag.create_dagrun(
run_id=self.kwargs.get("run_id", "test"),
state=self.kwargs.get('state', State.RUNNING),
execution_date=self.kwargs.get('execution_date',
self.kwargs['start_date']),
start_date=self.kwargs['start_date'],
+ run_type=self.kwargs.get('run_type', DagRunType.SCHEDULED),
+ conf=self.kwargs.get('conf', {}),
+ dag_hash=self.kwargs.get('dag_hash', None),
+ external_trigger=self.kwargs.get('external_trigger',
False),
+ creating_job_id=self.kwargs.get('creating_job_id', None),
Review comment:
I think we should have two factories: `dag_and_dagrun_creator` (though I
don't love the name) and a `dag_maker` -- `dag_maker` would be responsible for
makeing the DAG, and ensuring that the SerliazedDag and DagModel tables are
up-to-date, and then the `dag_and_dagrun_creator` can use that factory somehow,
but also create a DagRun.
--
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]