Open AetherUnbound opened 3 weeks ago
Hi, I'm new to contributing to public OpenSource projects and would like to take this up if available.
Hi @triii10 , thank you for your interest in contributing to Openverse! I've assigned this issue to you. If you have any questions, you may leave them here.
Please check out our welcome and general setup documentation pages for getting started with setting up your local environment.
Description
Since
common.slack.notify_slack
is an Airflow TaskFlow API@task
, it has access to the context variables: https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/taskflow.html#contextThus, we should be able to have it determine the
dag_id
on its own (via thedag.dag_id
property of thedag
object available for templating).This function will need to be changed to remove the
dag_id
required parameter from the outer function call, adddag: DAG | None = None
at the end of the argument list, and then passdag.dag_id
into thesend_message
call:https://github.com/WordPress/openverse/blob/7f5baa29f1c5f0e09266946bd2c1a2f321d6f07a/catalog/dags/common/slack.py#L421-L433