diff --git a/bin/ci/ci_run_n_monitor.py b/bin/ci/ci_run_n_monitor.py index 46a627a4dad..4c14d1d5a7a 100755 --- a/bin/ci/ci_run_n_monitor.py +++ b/bin/ci/ci_run_n_monitor.py @@ -105,7 +105,7 @@ def monitor_pipeline( to_cancel = [] for job in pipeline.jobs.list(all=True, sort="desc"): # target jobs - if target_jobs_regex.match(job.name): + if target_jobs_regex.fullmatch(job.name): target_id = job.id if stress and job.status in ["success", "failed"]: diff --git a/bin/ci/gitlab_gql.py b/bin/ci/gitlab_gql.py index b78c8a70c7b..3f422d5d10a 100755 --- a/bin/ci/gitlab_gql.py +++ b/bin/ci/gitlab_gql.py @@ -337,7 +337,7 @@ def create_job_needs_dag(gl_gql: GitlabGQL, params, disable_cache: bool = True) def filter_dag(dag: Dag, regex: Pattern) -> Dag: - jobs_with_regex: set[str] = {job for job in dag if regex.match(job)} + jobs_with_regex: set[str] = {job for job in dag if regex.fullmatch(job)} return Dag({job: data for job, data in dag.items() if job in sorted(jobs_with_regex)})