explicitly check for failure of certain jobs

This commit is contained in:
MicroDev 2023-03-10 16:41:13 +05:30
parent 64ba371f28
commit 91d4fed01d
No known key found for this signature in database
GPG Key ID: 2C0867BE60967730
2 changed files with 9 additions and 12 deletions

View File

@ -171,8 +171,7 @@ def get_bad_check_runs(query_check_runs):
more_pages = True
run_types = ["failed", "incomplete"]
regex_matrix = re.compile(r"^\S+ \/ (build|run) \(\S+\)$")
have_dependent_jobs = ["scheduler", "mpy-cross", "tests"]
while more_pages:
check_runs = query_check_runs.fetch()["data"]["node"]
@ -184,15 +183,16 @@ def get_bad_check_runs(query_check_runs):
for check_run in check_runs[run_type]["nodes"]:
name = check_run["name"]
if name.startswith("ports") or regex_matrix.search(name):
matrix = name.split(" ", 1)[0]
matrix_job = name.rsplit(" (", 1)[1][:-1]
bad_runs.setdefault(matrix, []).append(matrix_job)
elif name != "scheduler":
bad_runs[name] = True
else:
if any([name.startswith(job) for job in have_dependent_jobs]):
return {}
if name.startswith("ports"):
matrix_job = name.rsplit(" (", 1)[1][:-1]
bad_runs.setdefault("ports", []).append(matrix_job)
else:
bad_runs[name] = True
if query_check_runs.paginate(
check_runs[run_type]["pageInfo"], "after" + run_type_camel
):

View File

@ -98,9 +98,6 @@ def set_output(name: str, value):
def set_boards(build_all: bool):
if last_failed_jobs.get("mpy-cross") or last_failed_jobs.get("tests"):
build_all = True
# Get boards in json format
boards_info_json = build_board_info.get_board_mapping()
all_board_ids = set()