Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Bump Airflow to 2.4.0, standardize version bump process (#737)
Madison Swain-Bowdenb4ef93ce5f82
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.ymlindex 026a1d7ba..7cba455c9 100644--- a/.github/workflows/ci_cd.yml+++ b/.github/workflows/ci_cd.yml@@ -54,6 +54,10 @@ jobs:id: python-versionrun: echo "::set-output name=value::$(just py-version)"+ - name: Get Airflow version+ id: airflow-version+ run: echo "::set-output name=value::$(just airflow-version)"+- name: Setup Docker Buildxuses: docker/setup-buildx-action@v1with:@@ -70,6 +74,7 @@ jobs:outputs: type=docker,dest=/tmp/catalog.tarbuild-args: |PROJECT_PY_VERSION=${{ steps.python-version.outputs.value }}+ PROJECT_AIRFLOW_VERSION=${{ steps.airflow-version.outputs.value }}- name: Upload imageuses: actions/upload-artifact@v2diff --git a/DAGs.md b/DAGs.mdindex b741d27fd..c09916317 100644--- a/DAGs.md+++ b/DAGs.md@@ -161,7 +161,6 @@ airflow dags trigger --conf- enableDelete:<BOOLEAN> - Optional-## `audio_data_refresh`### Data Refresh DAG Factory@@ -219,7 +218,6 @@ after the issue has been resolved.The DAG runs weekly.-## `europeana_reingestion_workflow`@@ -233,7 +231,6 @@ Output: TSV file containing the images and theNotes: https://www.europeana.eu/api/v2/search.json-## `europeana_workflow`@@ -247,7 +244,6 @@ Output: TSV file containing the images and theNotes: https://www.europeana.eu/api/v2/search.json-## `flickr_reingestion_workflow`@@ -262,7 +258,6 @@ Notes: https://www.flickr.com/help/terms/apiRate limit: 3600 requests per hour.-## `flickr_workflow`@@ -277,7 +272,6 @@ Notes: https://www.flickr.com/help/terms/apiRate limit: 3600 requests per hour.-## `freesound_workflow`@@ -292,7 +286,6 @@ Notes: https://freesound.org/apiv2/search/text'No rate limit specified.-## `image_data_refresh`### Data Refresh DAG Factory@@ -351,7 +344,6 @@ Notes: [The iNaturalist API is not intended for data scraping.]except for adding ancestry tags to the taxa table.-## `jamendo_workflow`@@ -372,7 +364,6 @@ Notes: https://api.jamendo.com/v3.0/tracks/channels: 1/2-## `metropolitan_museum_workflow`@@ -402,7 +393,6 @@ Notes: https://metmuseum.github.io/#search-## `oauth2_authorization`### OAuth Provider Authorization@@ -455,7 +445,6 @@ Notes: http://phylopic.org/api/No rate limit specified.-## `pr_review_reminders`@@ -479,7 +468,6 @@ author of the PR to re-assign review if one of the randomly selected reviewersis unavailable for the time period during which the PR should be reviewed.-## `recreate_audio_popularity_calculation`@@ -493,7 +481,6 @@ These DAGs are not on a schedule, and should only be run manually when newSQL code is deployed for the calculation.-## `recreate_image_popularity_calculation`@@ -507,7 +494,6 @@ These DAGs are not on a schedule, and should only be run manually when newSQL code is deployed for the calculation.-## `report_pending_reported_media`### Report Pending Reported Media DAG@@ -534,7 +520,6 @@ Output: TSV file containing the images and the respectiveNotes: None-## `stocksnap_workflow`@@ -551,7 +536,6 @@ Notes: https://stocksnap.io/api/load-photos/date/desc/1API is undocumented.-## `tsv_to_postgres_loader`#### Database Loader DAG@@ -602,7 +586,6 @@ https://github.com/creativecommons/cccatalog/issues/334)-## `walters_workflow`@@ -617,7 +600,6 @@ Notes: http://api.thewalters.org/Rate limit: 250000 Per Day Per Key-## `wikimedia_commons_workflow`@@ -632,7 +614,6 @@ Notes: https://commons.wikimedia.org/wiki/API:Main_pageNo rate limit specified.-## `wikimedia_reingestion_workflow`@@ -647,7 +628,6 @@ Notes: https://commons.wikimedia.org/wiki/API:Main_pageNo rate limit specified.-## `wordpress_workflow`diff --git a/docker-compose.override.yml b/docker-compose.override.ymlindex 5087335fb..38dc8a801 100644--- a/docker-compose.override.yml+++ b/docker-compose.override.yml@@ -86,6 +86,7 @@ services:args:- REQUIREMENTS_FILE=requirements_dev.txt- PROJECT_PY_VERSION=${PROJECT_PY_VERSION}+ - PROJECT_AIRFLOW_VERSION=${PROJECT_AIRFLOW_VERSION}dockerfile: docker/airflow/Dockerfilerestart: on-failure# This command ensures an admin account is created on startupdiff --git a/docker/airflow/Dockerfile b/docker/airflow/Dockerfileindex a1b5a95fe..db64d79b7 100644--- a/docker/airflow/Dockerfile+++ b/docker/airflow/Dockerfile@@ -43,7 +43,6 @@ RUN useradd -m -d ${AIRFLOW_HOME} airflow && \chown airflow:airflow ${OUTPUT_DIR}USER airflow-ARG AIRFLOW_VERSION=2.3.4WORKDIR ${AIRFLOW_HOME}# Always add the prod req because the dev reqs depend on it for deduplicationCOPY ${REQUIREMENTS_FILE} requirements_prod.txt ${AIRFLOW_HOME}/@@ -51,9 +50,10 @@ COPY docker/airflow/wait_for_db.py /opt/airflow/# args go out of scope when a new build stage starts so it must be redeclared hereARG PROJECT_PY_VERSION+ARG PROJECT_AIRFLOW_VERSION# https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html#constraints-files-ARG CONSTRAINTS_FILE="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PROJECT_PY_VERSION}.txt"+ARG CONSTRAINTS_FILE="https://raw.githubusercontent.com/apache/airflow/constraints-${PROJECT_AIRFLOW_VERSION}/constraints-${PROJECT_PY_VERSION}.txt"RUN pip install --user -r ${REQUIREMENTS_FILE} -c ${CONSTRAINTS_FILE}diff --git a/env.template b/env.templateindex 33264748f..2f913c901 100644--- a/env.template+++ b/env.template@@ -43,7 +43,7 @@ AIRFLOW_VAR_API_KEY_FREESOUND=not_setAIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres:5432/airflow# Remote logging connection ID# Replace "access_key" and "secret+key" with the real values. Secret key must be URL-encoded-AIRFLOW_CONN_AWS_DEFAULT=aws://test_key:test_secret@?region_name=us-east-1&host=http://s3:5000+AIRFLOW_CONN_AWS_DEFAULT=aws://test_key:test_secret@?region_name=us-east-1&endpoint_url=http://s3:5000# Catalog DB connection. Change the following line in prod to use the appropriate DBAIRFLOW_CONN_POSTGRES_OPENLEDGER_UPSTREAM=postgres://deploy:deploy@postgres:5432/openledgerdiff --git a/justfile b/justfileindex b6468d50a..a8d45c709 100644--- a/justfile+++ b/justfile@@ -11,11 +11,16 @@ DOCKER_FILES := "--file=docker-compose.yml" + (SERVICE := "webserver"export PROJECT_PY_VERSION := `grep '# PYTHON' requirements_prod.txt | awk -F= '{print $2}'`+export PROJECT_AIRFLOW_VERSION := `grep '^apache-airflow' requirements_prod.txt | awk -F= '{print $3}'`# Print the required Python version@py-version:echo $PROJECT_PY_VERSION+# Print the current Airflow version+@airflow-version:+ echo $PROJECT_AIRFLOW_VERSION+# Check the installed Python version matches the required Python version and fail if notcheck-py-version:#! /usr/bin/env shdiff --git a/openverse_catalog/dags/commoncrawl/commoncrawl_etl.py b/openverse_catalog/dags/commoncrawl/commoncrawl_etl.pyindex fdc78e2fb..6c3289569 100644--- a/openverse_catalog/dags/commoncrawl/commoncrawl_etl.py+++ b/openverse_catalog/dags/commoncrawl/commoncrawl_etl.py@@ -162,7 +162,7 @@ dag = DAG("execution_timeout": None,},start_date=datetime(1970, 1, 1),- schedule_interval="0 0 * * 1",+ schedule="0 0 * * 1",max_active_tasks=1,catchup=False,tags=["commoncrawl"],diff --git a/openverse_catalog/dags/commoncrawl/sync_commoncrawl_workflow.py b/openverse_catalog/dags/commoncrawl/sync_commoncrawl_workflow.pyindex 15aeb45bd..9a493999f 100644--- a/openverse_catalog/dags/commoncrawl/sync_commoncrawl_workflow.py+++ b/openverse_catalog/dags/commoncrawl/sync_commoncrawl_workflow.py@@ -33,7 +33,7 @@ dag = DAG("retry_delay": timedelta(days=1),"execution_timeout": None,},- schedule_interval="0 16 15 * *",+ schedule="0 16 15 * *",catchup=False,tags=["commoncrawl"],)diff --git a/openverse_catalog/dags/data_refresh/dag_factory.py b/openverse_catalog/dags/data_refresh/dag_factory.pyindex b40874af2..ec1d0710a 100644--- a/openverse_catalog/dags/data_refresh/dag_factory.py+++ b/openverse_catalog/dags/data_refresh/dag_factory.py@@ -157,7 +157,7 @@ def create_data_refresh_dag(data_refresh: DataRefresh, external_dag_ids: Sequencdag_id=data_refresh.dag_id,default_args=default_args,start_date=data_refresh.start_date,- schedule_interval=data_refresh.schedule_interval,+ schedule=data_refresh.schedule,max_active_runs=1,catchup=False,doc_md=__doc__,diff --git a/openverse_catalog/dags/data_refresh/data_refresh_types.py b/openverse_catalog/dags/data_refresh/data_refresh_types.pyindex 9cc6563a3..42149fc10 100644--- a/openverse_catalog/dags/data_refresh/data_refresh_types.py+++ b/openverse_catalog/dags/data_refresh/data_refresh_types.py@@ -25,7 +25,7 @@ class DataRefresh:airflow.dag.DAG __init__ method.start_date: datetime.datetime giving thefirst valid execution_date of the DAG.- schedule_interval: string giving the schedule on which the DAG+ schedule: string giving the schedule on which the DAGshould be run. Passed to theairflow.dag.DAG __init__ method.data_refresh_timeout: int giving the amount of time in seconds a@@ -45,7 +45,7 @@ class DataRefresh:dag_id: str = field(init=False)media_type: strstart_date: datetime = datetime(2020, 1, 1)- schedule_interval: Optional[str] = "@weekly"+ schedule: Optional[str] = "@weekly"default_args: Optional[Dict] = field(default_factory=dict)data_refresh_timeout: int = 24 * 60 * 60 # 1 dayrefresh_metrics_timeout: timedelta = timedelta(hours=1)diff --git a/openverse_catalog/dags/database/image_expiration_workflow.py b/openverse_catalog/dags/database/image_expiration_workflow.pyindex a0247fb43..6d6282f21 100644--- a/openverse_catalog/dags/database/image_expiration_workflow.py+++ b/openverse_catalog/dags/database/image_expiration_workflow.py@@ -24,7 +24,7 @@ dag = DAG(max_active_tasks=MAX_ACTIVE_TASKS,max_active_runs=MAX_ACTIVE_TASKS,catchup=False,- schedule_interval=None,+ schedule=None,tags=["database"],)diff --git a/openverse_catalog/dags/database/loader_workflow.py b/openverse_catalog/dags/database/loader_workflow.pyindex 4ba637200..059cd7872 100644--- a/openverse_catalog/dags/database/loader_workflow.py+++ b/openverse_catalog/dags/database/loader_workflow.py@@ -75,7 +75,7 @@ dag = DAG(},max_active_tasks=MAX_ACTIVE_TASKS,max_active_runs=1,- schedule_interval=None,+ schedule=None,catchup=False,tags=["database"],doc_md=__doc__,diff --git a/openverse_catalog/dags/database/recreate_popularity_calculation_dag_factory.py b/openverse_catalog/dags/database/recreate_popularity_calculation_dag_factory.pyindex 2db97c493..bae487a47 100644--- a/openverse_catalog/dags/database/recreate_popularity_calculation_dag_factory.py+++ b/openverse_catalog/dags/database/recreate_popularity_calculation_dag_factory.py@@ -26,7 +26,7 @@ def create_recreate_popularity_calculation_dag(data_refresh: DataRefresh):dag_id=f"recreate_{media_type}_popularity_calculation",default_args=default_args,max_active_runs=1,- schedule_interval=None,+ schedule=None,catchup=False,doc_md=__doc__,tags=["database", "data_refresh"],diff --git a/openverse_catalog/dags/database/report_pending_reported_media.py b/openverse_catalog/dags/database/report_pending_reported_media.pyindex d0fbbf842..b55ff8b87 100644--- a/openverse_catalog/dags/database/report_pending_reported_media.py+++ b/openverse_catalog/dags/database/report_pending_reported_media.py@@ -134,7 +134,7 @@ def create_dag():dag = DAG(dag_id=DAG_ID,default_args=DAG_DEFAULT_ARGS,- schedule_interval="@weekly",+ schedule="@weekly",catchup=False,tags=["database"],doc_md=__doc__,diff --git a/openverse_catalog/dags/maintenance/airflow_log_cleanup_workflow.py b/openverse_catalog/dags/maintenance/airflow_log_cleanup_workflow.pyindex 063e22804..0ef39bbbc 100644--- a/openverse_catalog/dags/maintenance/airflow_log_cleanup_workflow.py+++ b/openverse_catalog/dags/maintenance/airflow_log_cleanup_workflow.py@@ -45,7 +45,7 @@ dag = DAG("template_undefined": jinja2.Undefined,},start_date=datetime(2020, 6, 15),- schedule_interval="@weekly",+ schedule="@weekly",max_active_tasks=MAX_ACTIVE_TASKS,max_active_runs=MAX_ACTIVE_TASKS,# If this was True, airflow would run this DAG in the beginningdiff --git a/openverse_catalog/dags/maintenance/check_silenced_dags.py b/openverse_catalog/dags/maintenance/check_silenced_dags.pyindex e9bd749b0..60fab330a 100644--- a/openverse_catalog/dags/maintenance/check_silenced_dags.py+++ b/openverse_catalog/dags/maintenance/check_silenced_dags.py@@ -99,7 +99,7 @@ dag = DAG("retry_delay": timedelta(minutes=1),},start_date=datetime(2022, 7, 29),- schedule_interval="@weekly",+ schedule="@weekly",max_active_tasks=MAX_ACTIVE,max_active_runs=MAX_ACTIVE,catchup=False,diff --git a/openverse_catalog/dags/maintenance/pr_review_reminders/pr_review_reminders_dag.py b/openverse_catalog/dags/maintenance/pr_review_reminders/pr_review_reminders_dag.pyindex 1a98f3aac..fd1e951ea 100644--- a/openverse_catalog/dags/maintenance/pr_review_reminders/pr_review_reminders_dag.py+++ b/openverse_catalog/dags/maintenance/pr_review_reminders/pr_review_reminders_dag.py@@ -41,7 +41,7 @@ dag = DAG(},start_date=datetime(2022, 6, 9),# Run every weekday- schedule_interval="0 0 * * 1-5",+ schedule="0 0 * * 1-5",max_active_tasks=MAX_ACTIVE_TASKS,max_active_runs=MAX_ACTIVE_TASKS,# If this was True, airflow would run this DAG in the beginningdiff --git a/openverse_catalog/dags/oauth2/authorize_dag.py b/openverse_catalog/dags/oauth2/authorize_dag.pyindex 9cf2f5f88..2bd5a43b3 100644--- a/openverse_catalog/dags/oauth2/authorize_dag.py+++ b/openverse_catalog/dags/oauth2/authorize_dag.py@@ -16,7 +16,7 @@ from common.constants import DAG_DEFAULT_ARGSdag = DAG(dag_id="oauth2_authorization",- schedule_interval=None,+ schedule=None,start_date=datetime(2021, 1, 1),description="Authorization workflow for all Oauth2 providers.",max_active_runs=1,diff --git a/openverse_catalog/dags/oauth2/token_refresh_dag.py b/openverse_catalog/dags/oauth2/token_refresh_dag.pyindex 1bcd56124..f4459a6fa 100644--- a/openverse_catalog/dags/oauth2/token_refresh_dag.py+++ b/openverse_catalog/dags/oauth2/token_refresh_dag.py@@ -15,7 +15,7 @@ from common.constants import DAG_DEFAULT_ARGSdag = DAG(dag_id="oauth2_token_refresh",- schedule_interval="0 */12 * * *",+ schedule="0 */12 * * *",start_date=datetime(2021, 1, 1),description="Refresh tokens for all Oauth2 providers",max_active_runs=1,diff --git a/openverse_catalog/dags/providers/factory_utils.py b/openverse_catalog/dags/providers/factory_utils.pyindex f717926dd..3fa36f408 100644--- a/openverse_catalog/dags/providers/factory_utils.py+++ b/openverse_catalog/dags/providers/factory_utils.py@@ -147,7 +147,7 @@ def pull_media_wrapper(def date_partition_for_prefix(- schedule_interval: str | None,+ schedule: str | None,logical_date: datetime,reingestion_date: datetime,) -> str:@@ -178,11 +178,11 @@ def date_partition_for_prefix(prefix = f"year={logical_date.year}"# Add month in daily/hourly cases- if schedule_interval in {hourly_airflow, hourly_cron, daily_airflow, daily_cron}:+ if schedule in {hourly_airflow, hourly_cron, daily_airflow, daily_cron}:prefix += f"/month={logical_date.month:02}"# Add day to hourly cases- if schedule_interval in {hourly_airflow, hourly_cron}:+ if schedule in {hourly_airflow, hourly_cron}:prefix += f"/day={logical_date.day:02}"# Further partition by reingestion date if supplieddiff --git a/openverse_catalog/dags/providers/provider_dag_factory.py b/openverse_catalog/dags/providers/provider_dag_factory.pyindex b3edf6f51..79797e41f 100644--- a/openverse_catalog/dags/providers/provider_dag_factory.py+++ b/openverse_catalog/dags/providers/provider_dag_factory.py@@ -288,7 +288,7 @@ def create_provider_api_workflow_dag(conf: ProviderWorkflow):max_active_tasks=conf.max_active_tasks,max_active_runs=conf.max_active_runs,start_date=conf.start_date,- schedule_interval=conf.schedule_string,+ schedule=conf.schedule_string,catchup=conf.dated, # catchup is turned on for dated DAGs to allow backfillingdoc_md=conf.doc_md,tags=["provider"]@@ -418,7 +418,7 @@ def create_day_partitioned_reingestion_dag(max_active_tasks=conf.max_active_tasks,max_active_runs=conf.max_active_runs,dagrun_timeout=conf.dagrun_timeout,- schedule_interval=conf.schedule_string,+ schedule=conf.schedule_string,start_date=conf.start_date,catchup=False,doc_md=conf.doc_md,diff --git a/pytest.ini b/pytest.iniindex 7d8e9e8ee..bf9d961c3 100644--- a/pytest.ini+++ b/pytest.ini@@ -17,3 +17,21 @@ addopts =--dist loadscope--disable-socket--allow-unix-socket+# SMTP+# This occurs because the default config is loaded when running `just test --extended`+# which happens to still have SMTP credential defaults assigned in it. We do not set+# these anywhere in the dev stack so it can be safely ignored.+# Subdag+# This appears to be coming from Airflow internals during testing as a result of+# loading the example DAGs:+# /usr/local/airflow/.local/lib/python3.10/site-packages/airflow/example_dags/example_subdag_operator.py:43: RemovedInAirflow3Warning+# distutils+# Warning in dependency, nothing we can do+# flask+# Warning in dependency, nothing we can do+# "removed"/"remoevd" is due to https://github.com/pallets/flask/pull/4757+filterwarnings=+ ignore:Fetching SMTP credentials from configuration variables will be deprecated in a future release. Please set credentials using a connection instead:airflow.exceptions.RemovedInAirflow3Warning+ ignore:This class is deprecated. Please use `airflow.utils.task_group.TaskGroup`.:airflow.exceptions.RemovedInAirflow3Warning+ ignore:distutils Version classes are deprecated. Use packaging.version instead:DeprecationWarning+ ignore:.*is deprecated and will be (remoevd|removed) in Flask 2.3.:DeprecationWarningdiff --git a/requirements_prod.txt b/requirements_prod.txtindex 3aec4d73f..45a89546f 100644--- a/requirements_prod.txt+++ b/requirements_prod.txt@@ -1,5 +1,5 @@# PYTHON=3.10-apache-airflow[amazon,postgres,http]==2.3.4+apache-airflow[amazon,postgres,http]==2.4.0lxmlpsycopg2-binaryrequests-file==1.5.1diff --git a/tests/dags/common/operators/test_postgres_result.py b/tests/dags/common/operators/test_postgres_result.pyindex 4e11bc350..79bf79c93 100644--- a/tests/dags/common/operators/test_postgres_result.py+++ b/tests/dags/common/operators/test_postgres_result.py@@ -35,7 +35,7 @@ def clean_db():def get_dag(sql, handler):with DAG(dag_id=TEST_DAG_ID,- schedule_interval="@daily",+ schedule="@daily",start_date=DATA_INTERVAL_START,) as dag:PostgresResultOperator(diff --git a/tests/dags/common/sensors/test_single_run_external_dags_sensor.py b/tests/dags/common/sensors/test_single_run_external_dags_sensor.pyindex fd8969594..f1d801f1c 100644--- a/tests/dags/common/sensors/test_single_run_external_dags_sensor.py+++ b/tests/dags/common/sensors/test_single_run_external_dags_sensor.py@@ -1,6 +1,5 @@import loggingimport unittest-import warningsimport pytestfrom airflow.exceptions import AirflowException@@ -106,14 +105,7 @@ class TestExternalDAGsSensor(unittest.TestCase):def test_fails_if_external_dag_missing_sensor_task(self):# Loads an example DAG which does not have a Sensor task.- with warnings.catch_warnings():- # TODO: As of 2.2.4, initializing the example DAGs emits deprecation- # TODO: warnings for...(drumroll) Airflow operators 🙃 hopefully this is- # TODO: fixed in 2.2.5 or something.- # TODO: Update: 2022-05-06/v2.3.0, still an issue!- # TODO: Update: 2022-09-19/v2.3.4, Still an issue (MJSB)- warnings.simplefilter("ignore", category=DeprecationWarning)- dagbag = DagBag(dag_folder=DEV_NULL, include_examples=True)+ dagbag = DagBag(dag_folder=DEV_NULL, include_examples=True)bash_dag = dagbag.dags["example_bash_operator"]bash_dag.sync_to_db()diff --git a/tests/dags/providers/test_factory_utils.py b/tests/dags/providers/test_factory_utils.pyindex c657dcda1..ff46a6214 100644--- a/tests/dags/providers/test_factory_utils.py+++ b/tests/dags/providers/test_factory_utils.py@@ -247,10 +247,10 @@ def test_pull_media_wrapper_always_pushes_duration(func, ti_mock, dagrun_mock):assert duration > 0-# Set up parametrizations for the schedule_interval and reingestion_date,+# Set up parametrizations for the schedule and reingestion_date,# which result in different components of the path@pytest.mark.parametrize(- "schedule_interval, expected_schedule_prefix",+ "schedule, expected_schedule_prefix",[# Hourly should have year/month/day("@hourly", "year=2022/month=02/day=03"),@@ -277,12 +277,12 @@ def test_pull_media_wrapper_always_pushes_duration(func, ti_mock, dagrun_mock):],)def test_date_partition_for_prefix(- schedule_interval,+ schedule,expected_schedule_prefix,reingestion_date,expected_reingestion_prefix,):actual = factory_utils.date_partition_for_prefix(- schedule_interval, datetime(2022, 2, 3), reingestion_date+ schedule, datetime(2022, 2, 3), reingestion_date)assert actual == expected_schedule_prefix + expected_reingestion_prefixdiff --git a/tests/utilities/dag_doc_gen/test_dag_doc_generation.py b/tests/utilities/dag_doc_gen/test_dag_doc_generation.pyindex 32beb61af..10423edb3 100644--- a/tests/utilities/dag_doc_gen/test_dag_doc_generation.py+++ b/tests/utilities/dag_doc_gen/test_dag_doc_generation.py@@ -8,6 +8,8 @@ from openverse_catalog.utilities.dag_doc_gen.dag_doc_generation import DagInfoclass DagMock(NamedTuple):+ # schedule_interval used here because the Dag model does not actually have a+ # schedule attributeschedule_interval: str | Nonedoc_md: str | Nonecatchup: bool@@ -21,7 +23,7 @@ PROVIDER_WORKFLOW_INSTANCE.media_types = SAMPLE_MEDIA_TYPES_MODULE = "openverse_catalog.utilities.dag_doc_gen.dag_doc_generation"[email protected]("schedule_interval", ["@daily", None])[email protected]("schedule", ["@daily", None])@pytest.mark.parametrize("doc, expected_doc",[@@ -42,14 +44,12 @@ _MODULE = "openverse_catalog.utilities.dag_doc_gen.dag_doc_generation")@pytest.mark.parametrize("provider_workflow", ["foo_bar", None])def test_get_dags_info(- schedule_interval, doc, expected_doc, catchup, tags, type_, provider_workflow+ schedule, doc, expected_doc, catchup, tags, type_, provider_workflow):- dag = DagMock(- schedule_interval=schedule_interval, doc_md=doc, catchup=catchup, tags=tags- )+ dag = DagMock(schedule_interval=schedule, doc_md=doc, catchup=catchup, tags=tags)expected = DagInfo(dag_id=DAG_ID,- schedule=schedule_interval,+ schedule=schedule,doc=expected_doc,dated=catchup,type_=type_,