Skip to content

Commit

Permalink
Add work-around for old AZP jobs (ansible#80339)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclay authored Mar 28, 2023
1 parent 9faf944 commit 2e413b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hacking/azp/get_recent_coverage_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ def get_coverage_runs():
coverage_runs = []
for run_summary in runs["value"][0:1000]:
run_response = requests.get(run_summary['url'])

if run_response.status_code == 500 and 'Cannot serialize type Microsoft.Azure.Pipelines.WebApi.ContainerResource' in run_response.json()['message']:
# This run used a container resource, which AZP can no longer serialize for anonymous requests.
# Assume all older requests have this issue as well and stop further processing of runs.
# The issue was reported here: https://developercommunity.visualstudio.com/t/Pipelines-API-serialization-error-for-an/10294532
# A work-around for this issue was applied in: https://github.com/ansible/ansible/pull/80299
break

run_response.raise_for_status()
run = run_response.json()

Expand Down

0 comments on commit 2e413b7

Please sign in to comment.