9922 Commits
Author SHA1 Message Date
Tõnis Tiigi 1d510a3097 Merge pull request #7374 from crazy-max/fix-gha-close-layer-readers
cache(gha): close layer readers after uploading
2026-11-05 16:52:18 -08:00
Tõnis Tiigi 744e134b6d Merge pull request #7377 from thaJeztah/bump_x_sys
vendor: golang.org/x/sys f5cb0306ac0e (fix for go1.27)
2026-11-05 16:36:50 -08:00
Sebastiaan van Stijn 50ecb1d4be vendor: golang.org/x/sys f5cb0306ac0e (fix for go1.27)
includes a fix for https://go.dev/issue/82324

full diff: https://github.com/golang/sys/compare/v0.49.0...f5cb0306ac0e4b93b83ddd53c36d6693af3214e3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-11-06 00:12:49 +01:00
CrazyMax e3fd147d88 cache(gha): close layer readers after uploading
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-11-05 16:58:17 +01:00
CrazyMax d2de460241 Merge pull request #7371 from moby/dependabot/github_actions/github/codeql-action/upload-sarif-4.39.2
build(deps): bump github/codeql-action/upload-sarif from 4.39.1 to 4.39.2
2026-11-05 16:34:48 +01:00
Tõnis Tiigi b9d02e6eba Merge pull request #7372 from tonistiigi/dockerd-skip-diffid
client: skip testImageCacheRejectsUnverifiedDiffIDs on dockerd graphdriver
dockerfile/1.29.0-rc1-labs dockerfile/1.29.0-rc1 v0.35.0-rc1
2026-11-04 17:01:41 -08:00
Tonis Tiigi b1edf2f502 client: skip testImageCacheRejectsUnverifiedDiffIDs on dockerd graphdriver
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-11-04 16:47:06 -08:00
dependabot[bot] dc07fdc006 build(deps): bump github/codeql-action/upload-sarif
Bumps [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) from 4.39.1 to 4.39.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/9b3254085494b55a0f7c4c2b3d2d52cc712ce370...1fc58d04a4d4374f921bdac573c3811c240f9c26)

---
updated-dependencies:
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.39.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-05 00:25:07 +00:00
Tõnis Tiigi 9fab863340 Merge pull request #7355 from tonistiigi/solver-ref-fixes
solver: fix ref counting issues on cancellation cases
2026-11-04 14:01:20 -08:00
Tõnis Tiigi 56eec58930 Merge pull request #7323 from thaJeztah/grpcnotrace
build: disable gRPC tracing to reduce binary size
2026-11-04 12:44:42 -08:00
Tõnis Tiigi 85a6674b73 Merge pull request #7351 from ggjulio/fix-cache-export-partial-chain
remotecache: never export a partial layer chain
2026-11-04 11:54:59 -08:00
Tonis Tiigi 11bc14ad70 solver: release results of builds outliving Discard
A build still running when its job was discarded stored its results
in states that were already released, leaking them. Keep the states
until the last running build returns, and reject new builds on a
discarded job. Release refs of a gateway solve that returns after the
forwarder was discarded.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-11-04 11:27:58 -08:00
Tonis Tiigi 8a2f77bc30 solver: fix cancel race in respondToIncoming
A request canceled while respondToIncoming was running could finish
the last incoming request while outgoing work was still active, so a
build returned before its exec completed. Decide on one snapshot of
the cancel state per call.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-11-04 11:27:56 -08:00
Tõnis Tiigi 45d200f121 Merge pull request #7346 from ump45nose/fix-llb-chown-uid-range
llb: parse chown IDs across the whole uid_t range
2026-11-04 11:10:54 -08:00
Tõnis Tiigi 6b0d3c3203 Merge pull request #7345 from crazy-max/refactor-remote-cache-signing
cache: extract shared remote cache signing
2026-11-04 11:10:09 -08:00
Tõnis Tiigi 30785d7cd4 Merge pull request #7344 from tonistiigi/dockerfile-reset
dockerfile: add `--unset`, `FROM --reset` and `BUILDKIT_DISABLE_ONBUILD`
2026-11-04 09:49:10 -08:00
Tõnis Tiigi 0a00f5965d Merge pull request #7367 from crazy-max/http-retry-jitter-retry-after
source/http: add retry jitter and Retry-After handling
2026-11-04 09:48:29 -08:00
Tõnis Tiigi 36e7c1fb72 Merge pull request #7363 from crazy-max/fix-s3-reader-partial-reads
s3: fix partial reads in the cache reader
2026-11-04 09:09:00 -08:00
CrazyMax d9b10fd5d4 source/http: honor Retry-After for rate limits and outages
Retry HTTP 429 and 503 responses through the shared retry loop, honoring
Retry-After seconds and HTTP dates without extending the attempt limit.
Allow server-requested delays up to 30 seconds independently of the
exponential backoff limit. Stop when the requested delay exceeds this
limit instead of retrying earlier than the server requested.

Close failed response bodies before waiting and preserve cancellation.
Keep the cached HEAD probe best-effort, with retries applied to GET.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-11-04 14:17:53 +01:00
CrazyMax 9cc194f9d2 resolver: jitter exponential retry delays
Spread concurrent retries, including the first retry, by waiting between
half and all of each exponential delay. Keep the unjittered backoff as
the stopping condition so the attempt limit remains unchanged.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-11-04 13:54:19 +01:00
CrazyMax 2fb041c053 Merge pull request #7364 from tonistiigi/imagerefchecker-missing-blob
imagerefchecker: don't match chains with missing blobs
2026-11-04 13:38:46 +01:00
CrazyMax d765939aae Merge pull request #7366 from tonistiigi/v0.35-deps-updates
deps updates for v0.35
2026-11-04 11:43:56 +01:00
CrazyMax 72de76a46a Merge pull request #7334 from crazy-max/fix-image-cache-attestation-changes
source: preserve image cache across attestation changes
2026-11-04 10:05:33 +01:00
Tonis Tiigi 7281e97ffb vendor: update deps to match moby
- github.com/Microsoft/hcsshim v0.15.0-rc.4 -> v0.15.0
- google.golang.org/grpc v1.84.0 -> v1.85.0
- golang.org/x/net v0.61.0 -> v0.62.0
- go.opentelemetry.io/otel v1.46.0 -> v1.47.0
- go.opentelemetry.io/contrib v0.71.0 -> v0.72.0
- github.com/prometheus/client_golang v1.24.1 -> v1.25.0
- github.com/prometheus/procfs v0.21.1 -> v0.22.0
- github.com/go-openapi/* to moby versions

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-11-04 00:44:46 -08:00
Tonis Tiigi a2b271198f vendor: update go-winio, aws-sdk-go-v2, smithy-go
- github.com/Microsoft/go-winio v0.6.3 -> v0.6.4
- github.com/aws/aws-sdk-go-v2 v1.47.0 -> v1.47.5
- github.com/aws/aws-sdk-go-v2/config v1.33.4 -> v1.33.13
- github.com/aws/aws-sdk-go-v2/credentials v1.20.4 -> v1.20.13
- github.com/aws/smithy-go v1.28.2 -> v1.28.8

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-11-04 00:29:11 -08:00
Tonis Tiigi 5ca8f9cc67 vendor: update docker/cli, moby/profiles, moby/sys
- github.com/docker/cli v29.8.2 -> v29.9.3
- github.com/moby/profiles/seccomp v0.2.4 -> v0.3.0
- github.com/moby/sys/mountinfo v0.7.2 -> v0.7.3
- github.com/moby/sys/user v0.4.1 -> v0.5.0

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-11-04 00:17:09 -08:00
Tonis Tiigi 559537d3f7 cache: only memoize complete layer digest chains
A chain computed before its blobs existed stayed memoized after export,
so the record was never matched to its image. Return nil until every
layer has a blob, and memoize only complete chains.

Diff chains now match the layers export creates for them.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-11-04 00:10:22 -08:00
CrazyMax 8c2d0611b6 source: preserve image cache across attestation changes
Rebuilding an unchanged image can change its index digest through provenance
attestations, invalidating downstream cache despite an unchanged platform
manifest. Use the selected platform manifest as an alternate source cache
key while retaining the root manifest key for existing caches.

Capture the image manifest during the existing platform-filtered traversal,
including nested indexes and embedded manifests. Preserve the first image
manifest so malformed config or layer descriptors cannot replace its cache
identity.

Keep checksum validation and provenance pins tied to the root manifest.
Both cache keys use verified manifest digests, without restoring the
unverified DiffID fallback removed for GHSA-f2v9-hprr-32q3.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-11-04 09:05:16 +01:00
CrazyMax a5858950dd s3: fix partial reads in the cache reader
Keep reading until the buffer is full or an error occurs. Comparing the
last read count with the remaining buffer length could return a short
read without an error and perform an extra read after filling the buffer.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-11-04 08:55:44 +01:00
Tõnis Tiigi 1e10fe4235 Merge pull request #7339 from crazy-max/auth-refresh-rejected-credentials
authprovider: refresh rejected credentials before retrying tokens
2026-11-03 23:55:12 -08:00
Tõnis Tiigi 3b75145436 Merge pull request #7340 from crazy-max/status-response-batching
client: batch solve status by encoded size
2026-11-03 23:07:56 -08:00
Tõnis Tiigi 7c3b6ba69e Merge pull request #7348 from tonistiigi/fix-ref-release
gateway: fix double release of failed exec refs
2026-11-03 22:59:47 -08:00
Tõnis Tiigi 5fb98cee48 Merge pull request #7300 from Zaczero/fix-exec-stream-failure
grpcclient: unblock processes when exec stream ends
2026-11-03 22:37:15 -08:00
Tõnis Tiigi c5e6cf05d1 Merge pull request #7337 from tonistiigi/fix-fd-races
gateway: close frontend stdio after exec returns
2026-11-03 20:56:08 -08:00
Tõnis Tiigi 86cdec9ddc Merge pull request #7258 from astokes-docker/source-http-retry
source/http: retry transient request failures
2026-11-03 19:59:29 -08:00
Tõnis Tiigi 54ab11c4dc Merge pull request #7361 from gajohnson/s3-resume-invalid-range
s3: fix resuming interrupted cache downloads
2026-11-03 16:57:31 -08:00
Tõnis Tiigi 513ad39ae8 Merge pull request #7264 from janwaleed09/fix-contenthash-orphans
cache: fix content hash leak for removed records
2026-11-03 15:53:50 -08:00
Tõnis Tiigi 37e92c7720 Merge pull request #7187 from crazy-max/fix-local-cache-ingest-locking
solve: lock local cache ingests across clients
2026-11-03 12:20:20 -08:00
Adam Stokes ec5a999673 source/http: do not retry the best-effort HEAD request
The HEAD request in resolveMetadataRef is an optimization that servers
are not required to support. Its error is already ignored and the code
falls through to the GET, which is retried.

Retrying the HEAD adds nothing, since the GET covers the same failures,
and costs up to ~7s of backoff before the GET even starts.

Signed-off-by: Adam Stokes <adam.stokes@docker.com>
2026-11-03 15:19:10 -05:00
Tõnis Tiigi 0013c35917 Merge pull request #6806 from okhowang/feat/volatile
fix: remove volatile flag in temp mount
2026-11-03 12:17:29 -08:00
Tõnis Tiigi e4f8ad903e Merge pull request #7354 from tonistiigi/fix-release-error-handling
llbsolver: fix resultProxy.Release error handling
2026-11-03 11:22:30 -08:00
CrazyMax 454ff1b0ed cache: extract shared remote cache signing
Move signing commands, signature verification, and policy configuration into
cache/remotecache/signing so other remote cache backends can reuse them.
Keep GHA cache keys, signature storage, and TOML configuration unchanged.

Initialize the verifier for signing-only configurations and report signing
failures through the progress callback. Cover command execution, policy
matching, GHA import verification, cache namespaces, and config loading.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-11-03 19:16:30 +01:00
CrazyMax b3f8dfd5da Merge pull request #7304 from crazy-max/gha-cache-tlog-threshold
remotecache: honor gha cache transparency log threshold
2026-11-03 19:11:43 +01:00
Geoff Johnson 080366b31e Fix s3 InvalidRange error on canceled and resumed layer downloads
Signed-off-by: Geoff Johnson <gjohnson@seatgeek.com>
2026-11-03 13:11:18 -05:00
CrazyMax 68162560a9 solve: lock local cache ingests across clients
Independent local content stores only coordinate writers within each
store instance. Concurrent cache exports to the same directory can open
the same ingest files, causing rename failures or incomplete writes.

Acquire a filesystem lock per ingest reference before opening a writer
or aborting an ingest. Release it when the writer closes or commits,
including error paths, and report contention as unavailable so existing
retry logic can wait. Preserve references so interrupted uploads remain
resumable, and retain lock files to avoid races with replacement inodes.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-11-03 19:10:11 +01:00
CrazyMax 9eb05c68b3 client: batch solve status by encoded size
Status batching only counted log bytes, allowing other fields and protobuf
overhead to push responses beyond the gRPC limit. Account for every field
against a 1 MiB encoded-size target, reset the counter between batches,
emit warnings once, and leave the input unchanged.

Split large log payloads into fixed 512 KiB chunks, preserving their bytes
and metadata. This favors simple splitting over filling each batch exactly
and applies to live status, history recording, and replay of older records.

Keep indivisible metadata entries intact. These can exceed the batch target
and still fail to send if they exceed the configured gRPC message limit.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-11-03 18:30:19 +01:00
CrazyMax cbae181dd9 Merge pull request #7358 from crazy-max/test-git-submodule-file-protocol
source/git: test rejection of file-backed submodules
2026-11-03 15:01:08 +01:00
CrazyMax 9b33bb61c6 Merge pull request #7359 from crazy-max/forward-0.34.2-patches
forward v0.34.2 patches
2026-11-03 14:47:51 +01:00
CrazyMax 4f4579ee6f vendor: update fsutil to e075fd9305eb
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-11-03 14:03:34 +01:00
Tonis Tiigi 38693adac8 source/git: fix daemon panic on resolver cache poisoning
resolveMetadata stored its result into the resolver cache through
release(v) where v was a *Metadata. On a failed resolve or a cache
hit it set the pointer to nil, but passing a typed nil pointer as an
interface stores a non-nil value, so a nil *Metadata was cached for
that remote#ref. A later resolve of the same key read it back and
dereferenced nil, crashing buildkitd. Because the cache is shared
across the jobs on a solve state, an untrusted Dockerfile or frontend
could crash the daemon, and one build could poison another's.

Store an untyped nil instead, matching the HTTP source, so only a
successfully resolved Metadata is ever cached.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 4dd98355a71d79bdf93bd3456fda3a64847ce1de)
(cherry picked from commit c1399f7266310397f5615f4751147f886afff6d2)
(cherry picked from commit 16c6856432)
2026-11-03 14:01:52 +01:00