-
Notifications
You must be signed in to change notification settings - Fork 45
[Fix] Pin Modal base image tags to their current digest #2474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
98a58e2
c65ae5b
0339028
9fd8267
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ import type { | |
| } from '../types'; | ||
| import { unsupported } from '../errors'; | ||
| import { sleepWithSignal, throwIfAborted, toAbortError } from '../modal/abort'; | ||
| import { pinModalBaseImageRef } from '../modal/registry-digest'; | ||
| import { RoomoteBrokerExec } from './roomote-broker-exec'; | ||
| import { | ||
| BrokerRequestError, | ||
|
|
@@ -283,10 +284,16 @@ export class RoomoteBrokerClient implements ComputeProviderClient { | |
| throwIfAborted(input.signal); | ||
|
|
||
| const idempotencyKey = input.idempotencyKey ?? randomUUID(); | ||
| // Same mutable-tag pitfall as the direct Modal adapter: the broker keys | ||
| // its image cache on the ref string, so pin the tag to its digest first. | ||
| const imageRef = sourceSnapshotId | ||
| ? undefined | ||
| : await pinModalBaseImageRef({ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The broker client deliberately has no registry credentials ( |
||
| ref: this.config.baseImageRef, | ||
| signal: input.signal, | ||
| }); | ||
| const body = JSON.stringify({ | ||
| ...(sourceSnapshotId | ||
| ? { snapshotId: sourceSnapshotId } | ||
| : { imageRef: this.config.baseImageRef }), | ||
| ...(sourceSnapshotId ? { snapshotId: sourceSnapshotId } : { imageRef }), | ||
| ...(input.ports?.length ? { ports: input.ports } : {}), | ||
| ...(input.tags && Object.keys(input.tags).length > 0 | ||
| ? { tags: input.tags } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
responseTextis redacted only in the thrown error, but the precedingthis.logger.warnstill writes its first 500 raw characters toharness.log. That log is exposed through the Logs sidebar, so a response body containing credentials can still leak despite this change's redaction goal. Redact the logger's body value as well (before logging it).