Skip to content
This repository was archived by the owner on Jul 30, 2026. It is now read-only.

fix: resolve layer URLs at fetch time - #286

Merged
github-actions[bot] merged 1 commit into
quay:mainfrom
BradLugo:fetch-time-layer-urls
Jul 23, 2026
Merged

fix: resolve layer URLs at fetch time#286
github-actions[bot] merged 1 commit into
quay:mainfrom
BradLugo:fetch-time-layer-urls

Conversation

@BradLugo

@BradLugo BradLugo commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

ManifestFromRemote captured presigned blob URLs for every layer before any downloading began; on images with large layers the URLs for later layers expired (typically after 10 minutes) before the fetcher reached them. Store the registry's stable blob URL instead and hand the authenticated transport to the fetch arena, so each layer GET authenticates fresh and follows the storage redirect immediately.

Fixes #275

Comment thread image/manifest.go
URI: res.Request.URL.String(),
Headers: res.Request.Header,
Hash: ccd,
URI: u.String(),

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.

To do this, you need add the auth headers. The point of "resolving" the URL is to not have to do that, but it does start any URL auth timer ticking when that's done.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The auth headers are set in http client's transport. Is that a problem? Maybe there's something I'm not seeing (security issue perhaps?)

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.

Ah, okay.

@BradLugo
BradLugo requested a review from hdonnay July 11, 2026 05:04
@BradLugo
BradLugo marked this pull request as ready for review July 13, 2026 16:01
@BradLugo
BradLugo requested review from a team as code owners July 13, 2026 16:02
@BradLugo

Copy link
Copy Markdown
Contributor Author

OBE

@BradLugo BradLugo closed this Jul 16, 2026
@hdonnay hdonnay reopened this Jul 23, 2026
ManifestFromRemote captured presigned blob URLs for every layer
before any downloading began; on images with large layers the URLs
for later layers expired (typically after 10 minutes) before the
fetcher reached them. Store the registry's stable blob URL instead
and hand the authenticated transport to the fetch arena, so each
layer GET authenticates fresh and follows the storage redirect
immediately.

Fixes quay#275

Signed-off-by: Brad Lugo <brad@bradlugo.com>
@hdonnay
hdonnay force-pushed the fetch-time-layer-urls branch from 1f00a6c to 855cb2f Compare July 23, 2026 21:25
@hdonnay

hdonnay commented Jul 23, 2026

Copy link
Copy Markdown
Member

/fast-forward

@github-actions
github-actions Bot merged commit 855cb2f into quay:main Jul 23, 2026
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Presigned layer URLs expire before fetch when images have large layers

2 participants