telemetry-airflow/dags/partybal.py

59 строки
1.6 KiB
Python
Исходник Обычный вид История

"""
2023-07-13 17:50:04 +03:00
DAG to schedule generation of results for partybal.
2022-02-08 20:49:03 +03:00
Partybal is an experimental service to visualize experiment results that have been
produced by [jetstream](https://github.com/mozilla/jetstream).
See https://github.com/mozilla/partybal
2022-02-08 20:49:03 +03:00
This DAG depends on experiment results being available for a certain date.
So if the [jetstream DAG](https://workflow.telemetry.mozilla.org/tree?dag_id=jetstream)
does not successfully complete running, then the tasks in this DAG will fail as well.
The DAG is scheduled to run every three hours to pick up experiment results from manually
triggered analysis runs quickly.
"""
2023-07-13 17:50:04 +03:00
from datetime import datetime, timedelta
2021-06-22 22:46:32 +03:00
from airflow import DAG
2021-06-22 22:46:32 +03:00
from operators.gcp_container_operator import GKEPodOperator
from utils.tags import Tag
2021-06-22 22:46:32 +03:00
default_args = {
"owner": "ascholtz@mozilla.com",
2023-07-13 17:50:04 +03:00
"email": [
"ascholtz@mozilla.com",
"mwilliams@mozilla.com",
],
2021-06-22 22:46:32 +03:00
"depends_on_past": False,
"start_date": datetime(2021, 6, 21),
"email_on_failure": True,
"email_on_retry": True,
"retries": 2,
"retry_delay": timedelta(minutes=30),
}
tags = [Tag.ImpactTier.tier_2]
2023-07-13 17:50:04 +03:00
with DAG(
"partybal",
default_args=default_args,
schedule_interval="0 */3 * * *",
doc_md=__doc__,
tags=tags,
) as dag:
2021-06-22 22:46:32 +03:00
# Built from repo https://github.com/mozilla/partybal
2023-07-13 17:50:04 +03:00
partybal_image = "gcr.io/moz-fx-data-experiments/partybal:latest"
2021-06-22 22:46:32 +03:00
partybal = GKEPodOperator(
task_id="partybal",
name="partybal",
image=partybal_image,
2023-07-13 17:50:04 +03:00
email=[
"ascholtz@mozilla.com",
"mwilliams@mozilla.com",
],
2021-06-22 22:46:32 +03:00
dag=dag,
)