Skip to content

Commit 15a0ce6

Browse files
committed
refactor(github): update DAG and utils to use trigger_github_repository_dispatch as primary name
1 parent e0b13d0 commit 15a0ce6

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

dags/multipod/maxtext_e2e_tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from airflow.models.param import Param
2424
from airflow.operators.trigger_dagrun import TriggerDagRunOperator
2525
from airflow.utils.trigger_rule import TriggerRule
26-
from xlml.utils.github import fire_github_callback, validate_git_trigger
26+
from xlml.utils.github import trigger_github_repository_dispatch, validate_git_trigger
2727

2828
with models.DAG(
2929
dag_id="maxtext_e2e_tests",
@@ -79,12 +79,12 @@
7979
poke_interval=600, # check every 10 minutes for child DAG completion
8080
)
8181

82-
github_callback_pre_training = fire_github_callback.override(
82+
github_callback_pre_training = trigger_github_repository_dispatch.override(
8383
task_id="fire_github_callback_pre_training",
8484
trigger_rule=TriggerRule.ALL_SUCCESS,
8585
)(test_type="pre_training")
8686

87-
github_callback_post_training = fire_github_callback.override(
87+
github_callback_post_training = trigger_github_repository_dispatch.override(
8888
task_id="fire_github_callback_post_training",
8989
trigger_rule=TriggerRule.ALL_SUCCESS,
9090
)(test_type="post_training")

xlml/utils/github.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def validate_git_trigger() -> None:
4444

4545

4646
@task
47-
def fire_github_callback(
47+
def trigger_github_repository_dispatch(
4848
test_type: str | None = None,
4949
repo: str | None = None,
5050
token: str | None = None,
@@ -99,4 +99,4 @@ def fire_github_callback(
9999
response.raise_for_status()
100100

101101

102-
trigger_github_repository_dispatch = fire_github_callback
102+
fire_github_callback = trigger_github_repository_dispatch

0 commit comments

Comments
 (0)