image-builder icon indicating copy to clipboard operation
image-builder copied to clipboard

internal: retry 503 errors from composer (HMS-4427)

Open mvo5 opened this issue 7 months ago • 3 comments

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 thegetBodyWithRetry` 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).

mvo5 avatar Jul 12 '24 10:07 mvo5