From caf43bbcc249a5aad3831320f25eaf6abc8b66ed Mon Sep 17 00:00:00 2001 From: David Wu Date: Fri, 4 Jan 2019 11:02:57 -0800 Subject: [PATCH 1/4] default autoredirect to false Signed-off-by: David Wu --- registry/auth/token/accesscontroller.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/registry/auth/token/accesscontroller.go b/registry/auth/token/accesscontroller.go index 33d18a48..fa924f0b 100644 --- a/registry/auth/token/accesscontroller.go +++ b/registry/auth/token/accesscontroller.go @@ -162,11 +162,14 @@ func checkOptions(options map[string]interface{}) (tokenAccessOptions, error) { opts.realm, opts.issuer, opts.service, opts.rootCertBundle = vals[0], vals[1], vals[2], vals[3] - autoRedirect, ok := options["autoredirect"].(bool) - if !ok { - return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect") + autoRedirectVal, ok := options["autoredirect"] + if ok { + autoRedirect, ok := autoRedirectVal.(bool) + if !ok { + return opts, fmt.Errorf("token auth requires a valid option bool: autoredirect") + } + opts.autoRedirect = autoRedirect } - opts.autoRedirect = autoRedirect return opts, nil } From bf74e4f91d114a3fc8e8ab1249f99c15e12bef94 Mon Sep 17 00:00:00 2001 From: Ryan Abrams Date: Wed, 16 Jan 2019 11:14:22 -0800 Subject: [PATCH 2/4] Use same env var in Dockerfile and Makefile Ensures that build tags get set in the Dockerfile so that OSS and GCS drivers are built into the official registry binary. Closes #2819 Signed-off-by: Ryan Abrams --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 612e62ce..9537817c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM golang:1.11-alpine AS build ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution -ENV DOCKER_BUILDTAGS include_oss include_gcs +ENV BUILDTAGS include_oss include_gcs ARG GOOS=linux ARG GOARCH=amd64 From 445ef068dd13731d938b22e2153bd075640ea5ec Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Mon, 7 Jan 2019 10:55:40 -0800 Subject: [PATCH 3/4] Release notes for 2.7.1 Release notes for single fix release Signed-off-by: Derek McGowan --- releases/v2.7.1.toml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 releases/v2.7.1.toml diff --git a/releases/v2.7.1.toml b/releases/v2.7.1.toml new file mode 100644 index 00000000..0410ed86 --- /dev/null +++ b/releases/v2.7.1.toml @@ -0,0 +1,26 @@ +# commit to be tagged for new release +commit = "HEAD" + +project_name = "registry" +github_repo = "docker/distribution" + +# previous release +previous = "v2.7.0" + +pre_release = false + +preface = """\ +The first patch release of 2.7 addresses an upgrade issue when +using configurations from pre-2.7 registries. When upgrading from +2.6 or earlier use this patch release or newer to avoid a failure +on startup from not updating the configuration file. + +- Set default for new `autoredirect` option +- GCS driver is now included in binary builds using Dockerfile""" + +# notable prs to include in the release notes, 1234 is the pr number +[notes] + +[breaking] + +[rename_deps] From 5b98226afefa11a06ef0c652af4995177c0efda0 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Thu, 17 Jan 2019 15:16:54 -0800 Subject: [PATCH 4/4] Update version file for 2.7.1 Signed-off-by: Derek McGowan --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index d05a377e..2519fd6d 100644 --- a/version/version.go +++ b/version/version.go @@ -8,7 +8,7 @@ var Package = "github.com/docker/distribution" // the latest release tag by hand, always suffixed by "+unknown". During // build, it will be replaced by the actual version. The value here will be // used if the registry is run after a go get based install. -var Version = "v2.7.0+unknown" +var Version = "v2.7.1+unknown" // Revision is filled with the VCS (e.g. git) revision being used to build // the program at linking time.