fix: add retry to curl downloads for transient network failures#210
fix: add retry to curl downloads for transient network failures#210bobcallaway merged 1 commit intosigstore:mainfrom
Conversation
|
can you rebase this please? i'll also add a couple comments (nits) in a review |
20e661d to
7299153
Compare
cpanato
left a comment
There was a problem hiding this comment.
Thanks looks cool
I would also add the following.
--retry-delay <seconds> - Wait time before each retry attempt
--retry-max-time <seconds> - Maximum time to spend on retries total
|
Thanks for the review! I dug into these. Turns out For Happy to add them if you feel strongly, but I think |
1d321f2 to
f06f3a0
Compare
|
we've been also facing this issue recently, would be great to merge this PR. |
|
I've also been running into some build failures due to this issue; it would be great if this PR could be merged. |
Transient network errors during the cosign download can cause the action to fail. This is particularly problematic when the action runs after images have been pushed to a registry, resulting in unsigned images. Add --retry 3 to all curl calls. By default, curl uses exponential backoff: it waits 1 second before the first retry, then doubles the wait time for each subsequent retry up to a maximum of 10 minutes. It also respects Retry-After headers in the response. Closes: sigstore#209 Signed-off-by: Jose Fernandez <me@jrfernandez.com>
|
@bobcallaway I applied your suggestions, PTAL. |
|
@cpanato can you clear your requested change so this can merge pls? |
|
Going to resolve @cpanato's comment so we can unblock this and cut a new release |
##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.1\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.1) #### What's Changed - chore: update default cosign-release to v3.0.5 in [#223](sigstore/cosign-installer#223) **Full Changelog**: <sigstore/cosign-installer@v4.1.0...v4.1.1> --- ##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.1\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.1) #### What's Changed - chore: update default cosign-release to v3.0.5 in [#223](sigstore/cosign-installer#223) **Full Changelog**: <sigstore/cosign-installer@v4.1.0...v4.1.1> --- ##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.1\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.1) #### What's Changed - chore: update default cosign-release to v3.0.5 in [#223](sigstore/cosign-installer#223) **Full Changelog**: <sigstore/cosign-installer@v4.1.0...v4.1.1> --- ##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.1\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.1) #### What's Changed - chore: update default cosign-release to v3.0.5 in [#223](sigstore/cosign-installer#223) **Full Changelog**: <sigstore/cosign-installer@v4.1.0...v4.1.1> --- ##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.1\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.1) #### What's Changed - chore: update default cosign-release to v3.0.5 in [#223](sigstore/cosign-installer#223) **Full Changelog**: <sigstore/cosign-installer@v4.1.0...v4.1.1> --- ##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.1\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.1) #### What's Changed - chore: update default cosign-release to v3.0.5 in [#223](sigstore/cosign-installer#223) **Full Changelog**: <sigstore/cosign-installer@v4.1.0...v4.1.1> --- ##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.1\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.1) #### What's Changed - chore: update default cosign-release to v3.0.5 in [#223](sigstore/cosign-installer#223) **Full Changelog**: <sigstore/cosign-installer@v4.1.0...v4.1.1> --- ##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
##### [\`v4.1.1\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.1) #### What's Changed - chore: update default cosign-release to v3.0.5 in [#223](sigstore/cosign-installer#223) **Full Changelog**: <sigstore/cosign-installer@v4.1.0...v4.1.1> --- ##### [\`v4.1.0\`](https://github.com/sigstore/cosign-installer/releases/tag/v4.1.0) #### What's Changed We recommend updating as soon as possible as this includes bug fixes for Cosign. We also recommend removing `with: cosign-release` and strongly discourage using `cosign-release` unless you have a specific reason to use an older version of Cosign. - Bump cosign to 3.0.5 in [#220](sigstore/cosign-installer#220) - fix: add retry to curl downloads for transient network failures in [#210](sigstore/cosign-installer#210) **Full Changelog**: <sigstore/cosign-installer@v4.0.0...v4.1.0>
Summary
Transient network errors during the cosign download can cause the action to fail. This is particularly problematic when the action runs after images have been pushed to a registry, resulting in unsigned images.
Add --retry 3 to all curl calls. By default, curl uses exponential backoff: it waits 1 second before the first retry, then doubles the wait time for each subsequent retry up to a maximum of 10 minutes. It also respects Retry-After headers in the response.
Closes: #209
Release Note
Added retry logic to curl downloads to handle transient network failures. Downloads now retry up to 3 times with exponential backoff.