Skip to content
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

chore: update to go 1.22 #2330

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
# Run benchmark with `go test -bench` and stores the output to a file
- name: Run benchmark
run: make BENCH_OUTPUT=ci-cd run-bench
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/branch-cov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Cache go dependencies
id: cache-go-dependencies
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cloc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Check out source code
uses: actions/checkout@v4
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compare-binary-size.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Checkout zot (main branch)
run: |
mkdir -p $GITHUB_WORKSPACE/zot_main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ecosystem-tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/gc-stress-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x

- name: Run zb
id: bench
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x

- name: Run zb
id: bench
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- uses: ./.github/actions/setup-localstack
- name: Setup minio service
run: |
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- uses: ./.github/actions/setup-localstack
- name: Setup minio service
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: '1.21'
go-version: '1.22'
- uses: actions/checkout@v4
- name: Run linter with GH action
uses: golangci/golangci-lint-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gqlgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Install go-licenses
run: go install github.com/google/go-licenses@latest
- name: Check for forbidden licenses
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
Expand All @@ -85,7 +85,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- uses: ./.github/actions/setup-localstack

- name: Run zb
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- uses: ./.github/actions/setup-localstack

- name: Run zb
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/oci-conformance-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install go 1.21
- name: Install go 1.22
uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Checkout this PR
uses: actions/checkout@v4
- name: Start zot server
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-3rdparty-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
golang_version:
- "1.21"
- "1.22"
runs-on: ubuntu-latest
steps:
- name: Log in to GitHub Docker Registry
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Cache go dependencies
id: cache-go-dependencies
uses: actions/cache@v4
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Cache go dependencies
id: cache-go-dependencies
uses: actions/cache@v4
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Cache go dependencies
id: cache-go-dependencies
uses: actions/cache@v4
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: download all workflow coverage files
uses: actions/download-artifact@v4
- name: merge code coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/setup-go@v5
with:
cache: false
go-version: 1.21.x
go-version: 1.22.x
- name: Checkout
uses: actions/checkout@v4
- name: Build zot
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ BENCH_OUTPUT ?= stdout
ALL_EXTENSIONS = debug,imagetrust,lint,metrics,mgmt,profile,scrub,search,sync,ui,userprefs
EXTENSIONS ?= sync,search,scrub,metrics,lint,ui,mgmt,profile,userprefs,imagetrust
UI_DEPENDENCIES := search,mgmt,userprefs
# freebsd/arm64 not supported for pie builds
# freebsd is not supported for pie builds if CGO is disabled
# see supported platforms at https://cs.opensource.google/go/go/+/master:src/internal/platform/supported.go;l=222-231;drc=d7fcb5cf80953f1d63246f1ae9defa60c5ce2d76
BUILDMODE_FLAGS := -buildmode=pie
ifeq ($(OS),freebsd)
ifeq ($(ARCH),arm64)
BUILDMODE_FLAGS=
endif
BUILDMODE_FLAGS=
endif
comma:= ,
space := $(null) #
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# Stage 1: Install certs, build binary, create default config file
# ---
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.21 AS builder
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.22 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile-conformance
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# Stage 1: Install certs, build binary, create default config file
# ---
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.21 AS builder
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.22 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile-minimal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# Stage 1: Install certs, build binary, create default config file
# ---
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.21 AS builder
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.22 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile-zb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# Stage 1: Install certs, build binary, create default config file
# ---
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.21 AS builder
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.22 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile-zxp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---
# Stage 1: Build binary, create default config file
# ---
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.21 AS builder
FROM --platform=$BUILDPLATFORM ghcr.io/project-zot/golang:1.22 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion build/stacker-conformance.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build:
from:
type: docker
url: docker://ghcr.io/project-zot/golang:1.21
url: docker://ghcr.io/project-zot/golang:1.22
binds:
- ../. -> /zotcopy
run: |
Expand Down
2 changes: 1 addition & 1 deletion build/stacker-minimal.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build:
from:
type: docker
url: docker://ghcr.io/project-zot/golang:1.21
url: docker://ghcr.io/project-zot/golang:1.22
binds:
- ../. -> /zotcopy
run: |
Expand Down
2 changes: 1 addition & 1 deletion build/stacker-zb.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build:
from:
type: docker
url: docker://ghcr.io/project-zot/golang:1.21
url: docker://ghcr.io/project-zot/golang:1.22
binds:
- ../. -> /zotcopy
run: |
Expand Down
2 changes: 1 addition & 1 deletion build/stacker-zxp.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build:
from:
type: docker
url: docker://ghcr.io/project-zot/golang:1.21
url: docker://ghcr.io/project-zot/golang:1.22
binds:
- ../. -> /zotcopy
run: |
Expand Down
2 changes: 1 addition & 1 deletion build/stacker.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build:
from:
type: docker
url: docker://ghcr.io/project-zot/golang:1.21
url: docker://ghcr.io/project-zot/golang:1.22
binds:
- ../. -> /zotcopy
run: |
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module zotregistry.dev/zot

go 1.21

toolchain go1.21.4
toolchain go1.22.1

require (
github.com/99designs/gqlgen v0.17.45
Expand Down
Loading