Skip to content

Fix download-frozen-image-v2#50662

Merged
thaJeztah merged 2 commits intomoby:masterfrom
vvoland:fix-frozen
Aug 7, 2025
Merged

Fix download-frozen-image-v2#50662
thaJeztah merged 2 commits intomoby:masterfrom
vvoland:fix-frozen

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Aug 7, 2025

download-frozen-image-v2: Use curl -L

Passing the Auth to the redirected location was fixed in curl 7.58: https://curl.se/changes.html#7_58_0 so we no longer need the extra handling and can just use -L to let curl handle redirects.

download-frozen-image-v2: handle 307 responses without decimal

Correctly parse HTTP response that doesn't contain an HTTP version with a decimal place:

< HTTP/2 307

The previous version would only match strings like HTTP/2.0 307.

@vvoland vvoland self-assigned this Aug 7, 2025
vvoland added 2 commits August 7, 2025 20:51
Correctly parse HTTP response that doesn't contain an HTTP version with a decimal place:

```
< HTTP/2 307
```

The previous version would only match strings like `HTTP/2.0 307`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Passing the Auth to the redirected location was fixed in curl 7.58:
https://curl.se/changes.html#7_58_0 so we no longer need the extra
handling and can just use `-L` to let curl handle redirects.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland added area/contrib kind/bugfix PR's that fix bugs labels Aug 7, 2025
@vvoland vvoland marked this pull request as ready for review August 7, 2025 19:03
@vvoland vvoland added this to the 29.0.0 milestone Aug 7, 2025
@vvoland vvoland added the release-blocker PRs we want to block a release on label Aug 7, 2025
@crazy-max
Copy link
Copy Markdown
Member

@vvoland vvoland requested review from crazy-max and thaJeztah August 7, 2025 19:42
"$blobRedirect" \
-o "$targetFile"
fi
curl -L -S "${curlArgs[@]}" \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use -fsSL now then I think? (like the other ones); doing so prevents capturing garbage if there's a failure (-f does a "fail fast" - preventing output to be captured on failure, and -s runs "silent" (but prints errors if they happen due to the other ones).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(fine for a follow-up though)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably also drop the -D- to not dump headers to stdout.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was eyeing some of that as well, and got confused "are we capturing stdout here, or are we outputting to a file?

But it was a long day, and this fixed the immediate problem, so I left that for "let's look into that later; we now know the cause of the problem, and it's for our own CI only, so let's fix that first".

(contributions welcome though if you want to dig in! <3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/contrib kind/bugfix PR's that fix bugs process/cherry-picked release-blocker PRs we want to block a release on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI is broken on loading / using frozen images on x86

6 participants