Skip to content

Return direct image for durable (freeze/mirror) requests on the V1 endpoint#1090

Merged
pditommaso merged 1 commit into
ge/fix/freeze-wt-token-pullfrom
ge/fix/freeze-wt-token-pull-v1
Jul 17, 2026
Merged

Return direct image for durable (freeze/mirror) requests on the V1 endpoint#1090
pditommaso merged 1 commit into
ge/fix/freeze-wt-token-pullfrom
ge/fix/freeze-wt-token-pull-v1

Conversation

@pditommaso

Copy link
Copy Markdown
Collaborator

Summary

Stacked on top of #1087.

#1087 makes the /v2/wt/<token> proxy path reject durable (freeze/mirror) requests with a 404 — those images are meant to be pulled directly from the target registry. But the two response builders were asymmetric:

  • makeResponseV2 already returns the direct target-registry image for durable requests (target = data.durable() ? data.containerImage : waveImage), so V2 clients never receive a wt/<token> freeze url.
  • makeResponseV1 returned targetImage = waveImage unconditionally, so a V1 (/container-token) freeze client is handed the proxy url — which Bugfix: do not serve freeze/mirror images via the Wave proxy token path #1087 now 404s.

Freeze is not v2-gated (only mirror is), and /container-token is still live (@Deprecated), so a pre-24.04 Nextflow client (or any other V1 freeze client) would break.

Impact assessment

  • Current Nextflow: unaffected. The Wave client is V2-only since #4906 (Nextflow v24.04.0, Apr 2024) and resolves the run image from targetImage, which V2 already returns as the direct image.
  • Pre-24.04 Nextflow / other V1 freeze clients: would 404 on the proxy pull after Bugfix: do not serve freeze/mirror images via the Wave proxy token path #1087. This change fixes them — they now receive the direct image in targetImage and pull it directly (the correct freeze behavior).

Changes

  • ContainerHelper.makeResponseV1: resolve targetImage to the direct image (data.containerImage) for durable() requests, matching makeResponseV2. The token is intentionally retained in the V1 response to avoid surprising legacy parsers — only targetImage changes.
  • ContainerHelperTest: add V1 freeze + mirror cases asserting the direct image is returned.

🤖 Generated with Claude Code

makeResponseV2 already returns the direct target-registry image for
freeze/mirror (durable) requests, but makeResponseV1 kept handing back
the Wave proxy token url. Since durable images are no longer served via
the proxy token path (see RouteHandler), V1 freeze clients pulling via
targetImage would 404. Resolve targetImage to the direct image for
durable requests on V1 too, matching V2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pditommaso
pditommaso requested a review from gavinelder July 17, 2026 09:22

@gavinelder gavinelder left a comment

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.

Thank you I was weighing up this approach and was unsure how best to proceed.

@pditommaso
pditommaso merged commit 25f0fb7 into ge/fix/freeze-wt-token-pull Jul 17, 2026
4 checks passed
@pditommaso
pditommaso deleted the ge/fix/freeze-wt-token-pull-v1 branch July 17, 2026 09:32
pditommaso added a commit that referenced this pull request Jul 17, 2026
…th (#1087)

* fix: do not serve freeze/mirror images via the Wave proxy token path

Freeze and mirror requests publish the image to the caller's target registry
and return a direct registry reference; they are meant to be pulled directly
from that registry. However the ephemeral /v2/wt/<token>/ proxy route still
resolved and served them for the token TTL. Reject durable (freeze/mirror)
requests on the proxy token path so the image can only be pulled directly
from the target registry. Status/detail lookups by request id are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Make freeze/mirror rejection message actionable; tighten test

Point the caller to the direct image reference in the NotFoundException
message, and assert the message carries that reference in the test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Return direct image for durable requests on the V1 endpoint (#1090)

makeResponseV2 already returns the direct target-registry image for
freeze/mirror (durable) requests, but makeResponseV1 kept handing back
the Wave proxy token url. Since durable images are no longer served via
the proxy token path (see RouteHandler), V1 freeze clients pulling via
targetImage would 404. Resolve targetImage to the direct image for
durable requests on V1 too, matching V2.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants