diff options
author | Matt Clay <matt@mystile.com> | 2023-03-28 11:50:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 11:50:47 -0700 |
commit | 2e413b74e498c25d67a72e07410b5f02617e6087 (patch) | |
tree | 0f2160ee7f42b5cde953f58738a5f53fd6ce7454 /hacking | |
parent | 9faf94468bd2e2b622908865d8e67d8dfdfccbd5 (diff) | |
download | ansible-2e413b74e498c25d67a72e07410b5f02617e6087.tar.gz |
Add work-around for old AZP jobs (#80339)
Diffstat (limited to 'hacking')
-rwxr-xr-x | hacking/azp/get_recent_coverage_runs.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hacking/azp/get_recent_coverage_runs.py b/hacking/azp/get_recent_coverage_runs.py index 25e2fa8120..1be867da1e 100755 --- a/hacking/azp/get_recent_coverage_runs.py +++ b/hacking/azp/get_recent_coverage_runs.py @@ -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() |