aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api/src
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2025-03-12 23:00:02 +1000
committerThomas Huth <thuth@redhat.com>2025-03-12 18:20:50 +0100
commit28adad0a4d9f1f64f9f04748c6348a64ba7ad990 (patch)
tree5d8268611ecab3edd496514dc474f59bf64a2210 /rust/qemu-api/src
parent7524e1b33679dc1356e8bb4efdd18e83fc50f5cc (diff)
downloadqemu-28adad0a4d9f1f64f9f04748c6348a64ba7ad990.zip
qemu-28adad0a4d9f1f64f9f04748c6348a64ba7ad990.tar.gz
qemu-28adad0a4d9f1f64f9f04748c6348a64ba7ad990.tar.bz2
tests/functional/asset: Add AssetError exception class
Assets are uniquely identified by human-readable-ish url, so make an AssetError exception class that prints url with error message. A property 'transient' is used to capture whether the client may retry or try again later, or if it is a serious and likely permanent error. This is used to retain the existing behaviour of treating HTTP errors other than 404 as 'transient' and not causing precache step to fail. Additionally, partial-downloads and stale asset caches that fail to resolve after the retry limit are now treated as transient and do not cause precache step to fail. For background: The NetBSD archive is, at the time of writing, failing with short transfer. Retrying the fetch at that position (as wget does) results in a "503 backend unavailable" error. We would like to get that error code directly, but I have not found a way to do that with urllib, so treating the short-copy as a transient failure covers that case (and seems like a reasonable way to handle it in general). Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-ID: <20250312130002.945508-4-npiggin@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'rust/qemu-api/src')
0 files changed, 0 insertions, 0 deletions