fix: allow curl fetcher to properly fallback to next mirror#3546
fix: allow curl fetcher to properly fallback to next mirror#3546myml wants to merge 1 commit intoostreedev:mainfrom
Conversation
|
Hi @myml. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Code Review
This pull request effectively addresses two issues with the curl fetcher's mirror fallback logic. The first change correctly prevents max_size checks from failing on non-2xx HTTP responses, which could have large bodies (e.g., error pages). The second change properly resets request state variables and temporary files before retrying with a new mirror. I have one suggestion to improve the robustness of the state reset logic by adding error handling for file operations.
The current ostree curl fetcher has two issues that prevent proper fallback when using a mirrorlist: 1. The max_size check does not account for non-2xx responses. When a server returns 3xx, 4xx, or 5xx, the response body may exceed max_size. 2. Some state variables and temporary files are not reset when falling back to the next mirror.
The current ostree curl fetcher has two issues that prevent proper fallback when using a mirrorlist: