image-builder
image-builder copied to clipboard
internal: retry 503 errors from composer (HMS-4427)
Based on https://github.com/osbuild/image-builder/pull/1266 (thanks @mgold1234 !)
See the individual commit messages. The tests are a bit repetitive and there is room to extract more helper here i feel but it's a start :)
The PR should be complete now but it is as well tested as I would like it to be tested, e.g. postBodyWithRetryhas no test and the
getBodyWithRetry` tests are also not ideal as they pseudo test only ComposeStatus(). OTOH if this is moved into "image-builder/internal/clients/composer/client.go" the tests could be added while moving this (see the discussion down there).