Skip to content

Commit

Permalink
fix(notify): [agent6] Wide try..except to prevent crash in notifica…
Browse files Browse the repository at this point in the history
…tion (#31321)
  • Loading branch information
chouetz authored Nov 21, 2024
1 parent 2ca088c commit d47a69d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/libs/pipeline_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def check_for_missing_owners_slack_and_jira(print_missing_teams=True, owners_fil
def get_failed_tests(project_name, job, owners_file=".github/CODEOWNERS"):
gitlab = Gitlab(project_name=project_name, api_token=get_gitlab_token())
owners = read_owners(owners_file)
test_output = gitlab.artifact(job["id"], "test_output.json", ignore_not_found=True)
try:
test_output = gitlab.artifact(job["id"], "test_output.json", ignore_not_found=True)
except Exception as e:
print("Ignoring test fetching error", e)
test_output = None
failed_tests = {} # type: dict[tuple[str, str], Test]
if test_output:
for line in test_output.iter_lines():
Expand Down

0 comments on commit d47a69d

Please sign in to comment.