Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(notify): [agent6] Wide try..except to prevent crash in notification #31321

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading