ci_run_n_monitor: require user to add an explicit .*
at the end if jobs like *-full
are wanted
Most of the time, these jobs are not wanted, so let's make this a full match instead of prefix match so that users only get what they ask for. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26066>
This commit is contained in:

committed by
Marge Bot

parent
ce7cda417f
commit
a5e20a5c31
@@ -105,7 +105,7 @@ def monitor_pipeline(
|
|||||||
to_cancel = []
|
to_cancel = []
|
||||||
for job in pipeline.jobs.list(all=True, sort="desc"):
|
for job in pipeline.jobs.list(all=True, sort="desc"):
|
||||||
# target jobs
|
# target jobs
|
||||||
if target_jobs_regex.match(job.name):
|
if target_jobs_regex.fullmatch(job.name):
|
||||||
target_id = job.id
|
target_id = job.id
|
||||||
|
|
||||||
if stress and job.status in ["success", "failed"]:
|
if stress and job.status in ["success", "failed"]:
|
||||||
|
@@ -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:
|
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)})
|
return Dag({job: data for job, data in dag.items() if job in sorted(jobs_with_regex)})
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user