The events table in the notifications documentation listed length,
repository, fromRepository, url and tag as fields of the event itself,
while they are fields of the event target, as the example below the
table shows. The table also did not mention the size and mediaType
fields the target carries, nor the references field set when
notifications.events.includereferences is enabled.
Split the table into the event fields and the target fields, and note
that the target embeds an OCI descriptor whose mediaType, digest and
size are always serialized. Update the delete event example to match
what the registry sends, and point the godoc links at the v3 module.
Fixes#4650
Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
Motivation: the Dockerfiles pin GO_VERSION=1.26.8, so release and edge
images are built with a Go toolchain that predates the 1.26.9 and 1.26.10
security releases (including a mime/multipart memory limit bypass and
crypto/x509 intermediate certificate distrust). Rebuilds still produce
go1.26.8 binaries because of the pin.
Approach: bump the GO_VERSION ARG from 1.26.8 to 1.26.10 in Dockerfile and
dockerfiles/{docs,git,lint,vendor}.Dockerfile, as was done for the previous
bump. The CI matrix in build.yml uses 1.26.x and needs no change. No source
changes. This does not cut a patch release; that is a maintainer decision.
Validation: Docker is not available on this machine, so I did not build the
images. I confirmed the golang:1.26.10-alpine tag exists on Docker Hub and
grepped that no other 1.26.8 pin remains. The change only alters a base
image tag; no Go code or tests are affected.
Report: https://github.com/distribution/distribution/issues/5040
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Assisted-by: claude-sonnet-5-5 (via Claude Code)
Relay cache-miss blob Range requests to the upstream when
proxy.rangepassthrough is enabled, without populating the blob cache.
Preserve upstream 200, 206 and 416 responses while keeping ordinary GET
cache fills and cache-hit handling unchanged.
Reuse the authenticated client, abort interrupted streams, and exclude
416 responses from blob transfer metrics and pull notifications.
Document the option and cover the HTTP and cache behavior in tests.
Signed-off-by: jeongho-kim <jeongho.kim@toss.im>
Cancel removes the upload directory, but the handler then closes the
writer, and Close stores the hash state again. That recreates the
upload directory without a startedat file, so the upload purger can
never remove it, and Close reports "already closed". Skip storing the
hash state once the upload has been cancelled.
Signed-off-by: YoungjuKim <fjvbn2003@gmail.com>
The GCS driver reads three parameters that the parameters table in
docs/content/storage-drivers/gcs.md does not list:
- `credentials`: an inline service account key, used when `keyfile` is
not set. It already appears in the configuration.md example, but not
in the driver page.
- `maxconcurrency`: the limit passed to base.NewRegulator. It defaults
to 50 (defaultMaxConcurrency) and is raised to 25 (minConcurrency)
when set lower.
- `useragent`: passed to the storage client with option.WithUserAgent.
Add a row for each.
Signed-off-by: ump45nose <52391318+ump45nose@users.noreply.github.com>
The GCS storage driver parameters table documents `chunksize` as
defaulting to 5242880 (5 MiB). The driver does not use that value:
`registry/storage/driver/gcs/gcs.go` defines
defaultChunkSize = 16 * 1024 * 1024
and applies it when the `chunksize` parameter is absent, so the documented
default understates the actual chunk size by a factor of three and a third.
Correct the table to 16777216 (16 MiB).
Signed-off-by: yuwk <1729065730@qq.com>
Run make test across Ubuntu and Windows with the latest Go 1.26 and 1.27
patch releases. This includes filesystem driver tests, which the existing
coverage target excludes, and catches Windows regressions before release.
Keep coverage and the Docker-backed S3 and Azure tests in a Linux-only job,
and require both test jobs before building artifacts.
Make the file health checks portable by using temporary directories and
closing the marker file before removing it. Check removal errors so a
failed deletion is reported directly.
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Since v3.1.0, the filesystem driver has tried to rename an open temporary
file when creating an upload session, causing every blob upload on Windows
to fail with HTTP 500. Closing the file exposes a second failure when the
driver tries to sync the parent directory.
Close the temporary file before renaming it and make directory syncing a
no-op on Windows. Preserve file syncing, replacement semantics, and the
existing writer lifecycle contract. Return slash-separated storage keys
from List so callers can use them on every platform.
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
PathNotFoundError previously printed a storage-driver-relative path that callers treated as an absolute OS path. Include the filesystem driver's rootdirectory in the error message so the configured storage root is visible. Fixes#1793.
Signed-off-by: yusheng.wang <yusheng.wang@chaitin.com>
When the final path component resolves to a directory, `q = q[i+1:]` with `i == -1` leaves `q` unchanged and recurses into the child -- going one level deeper than intended. That is normally harmless, because the repeated lookup finds nothing and returns the directory it is already in, but it returns the wrong node when that directory has a child with the same name.
Guard with `i >= 0` so the found directory is returned directly.
Fixes an intermittent flake (~3-7% of runs) in `TestDeleteOnlyDeletesSubpaths`, which constructs `dirname/dirname` to deliberately trigger the ambiguous case.
Assisted-By: "claude my eyes right out"
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
A repository name whose path is longer than 255 characters fails
reference.WithName in the dispatcher. That branch appended a bare
distribution.ErrRepositoryNameInvalid to context.Errors, and since it
is not an errcode.ErrorCoder, errcode.ServeJSON answered 500 UNKNOWN.
Wrap it in errcode.ErrorCodeNameInvalid, as the Repository() branch
right below already does for the same error type.
Since a811c1bb moved the automatic error response into a deferred call
at the top of the dispatcher, the early returns for an invalid name, a
failed Repository() call and a failed repository middleware have each
written the error envelope twice: net/http drops the second WriteHeader
as superfluous and the body ends up with two JSON documents. Remove the
explicit ServeJSON calls and leave the response to the deferred handler.
The Repository() switch gains a default case, so an error of any other
type still gets a 500, now with an UNKNOWN entry instead of an empty
envelope.
Fixes#4699
Assisted-by: Claude Opus 5.5 (via Claude Code)
Signed-off-by: somaz <genius5711@gmail.com>