Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Replaced `execution_date` with `logical_date` (#1001)
sora-san45a7c84faafaf7
diff --git a/openverse_catalog/dags/common/slack.py b/openverse_catalog/dags/common/slack.pyindex 83014bbb5..df41619a0 100644--- a/openverse_catalog/dags/common/slack.py+++ b/openverse_catalog/dags/common/slack.py@@ -375,7 +375,7 @@ def on_failure_callback(context: dict) -> None:ti = context["task_instance"]dag_id = ti.dag_idtask_id = ti.task_id- execution_date = context["execution_date"]+ logical_date = context["logical_date"]exception: Exception | None = context.get("exception")exception_message = ""@@ -395,7 +395,7 @@ def on_failure_callback(context: dict) -> None:message = f"""*DAG*: `{dag_id}`*Task*: `{task_id}`-*Execution Date*: {execution_date.strftime('%Y-%m-%dT%H:%M:%SZ')}+*Logical Date*: {logical_date.strftime('%Y-%m-%dT%H:%M:%SZ')}*Log*: {ti.log_url}{exception_message}"""diff --git a/openverse_catalog/dags/data_refresh/data_refresh_types.py b/openverse_catalog/dags/data_refresh/data_refresh_types.pyindex 36219b885..e2755f45c 100644--- a/openverse_catalog/dags/data_refresh/data_refresh_types.py+++ b/openverse_catalog/dags/data_refresh/data_refresh_types.py@@ -23,7 +23,7 @@ class DataRefresh:default_args: dictionary which is passed to theairflow.dag.DAG __init__ method.start_date: datetime.datetime giving the- first valid execution_date of the DAG.+ first valid logical date of the DAG.schedule: string giving the schedule on which the DAGshould be run. Passed to theairflow.dag.DAG __init__ method.diff --git a/openverse_catalog/dags/providers/provider_dag_factory.py b/openverse_catalog/dags/providers/provider_dag_factory.pyindex c4602233a..7a264e964 100644--- a/openverse_catalog/dags/providers/provider_dag_factory.py+++ b/openverse_catalog/dags/providers/provider_dag_factory.py@@ -108,7 +108,7 @@ def create_ingestion_workflow(Optional Arguments:- day_shift: integer giving the number of days before the current execution date+ day_shift: integer giving the number of days before the current logical datefor which ingestion should run (if `conf.dated==True`).is_reingestion: is this workflow a reingestion workflow"""@@ -369,7 +369,7 @@ def _build_partitioned_ingest_workflows(]It's not necessary for the inner lists to be the same length. Thetask groups instantiated by this factory method will first run- ingestion for the current execution_date, then for the current+ ingestion for the current logical_date, then for the currentdate minus the number of days given by integers in the first list(in an arbitrary order, and possibly in parallel if so configured),then for the dates calculated from the second list, and so on. For@@ -379,7 +379,7 @@ def _build_partitioned_ingest_workflows([8, 13, 18],[28, 38, 48]],- and assuming the current execution date is 2020-01-01, the+ and assuming the current logical date is 2020-01-01, theinstantiated dag will run the `main_function` with the parameters[['2020-01-01'],diff --git a/tests/dags/common/test_slack.py b/tests/dags/common/test_slack.pyindex ebb662001..bcbf13869 100644--- a/tests/dags/common/test_slack.py+++ b/tests/dags/common/test_slack.py@@ -571,7 +571,7 @@ def test_on_failure_callback():context = {"task_instance": mock.Mock(),- "execution_date": datetime.now(),+ "logical_date": datetime.now(),"exception": exception,"dag": mock.Mock(),}