mirror of https://github.com/docker/buildx.git
commit
96689e5d05
|
@ -36,7 +36,7 @@ env:
|
||||||
TEST_CACHE_SCOPE: "test"
|
TEST_CACHE_SCOPE: "test"
|
||||||
TESTFLAGS: "-v --parallel=6 --timeout=30m"
|
TESTFLAGS: "-v --parallel=6 --timeout=30m"
|
||||||
GOTESTSUM_FORMAT: "standard-verbose"
|
GOTESTSUM_FORMAT: "standard-verbose"
|
||||||
GO_VERSION: "1.22"
|
GO_VERSION: "1.23"
|
||||||
GOTESTSUM_VERSION: "v1.9.0" # same as one in Dockerfile
|
GOTESTSUM_VERSION: "v1.9.0" # same as one in Dockerfile
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
@ -17,7 +17,7 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: "1.22"
|
GO_VERSION: "1.23"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
codeql:
|
codeql:
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
run:
|
run:
|
||||||
timeout: 30m
|
timeout: 30m
|
||||||
|
|
||||||
modules-download-mode: vendor
|
modules-download-mode: vendor
|
||||||
|
# default uses Go version from the go.mod file, fallback on the env var
|
||||||
|
# `GOVERSION`, fallback on 1.17: https://golangci-lint.run/usage/configuration/#run-configuration
|
||||||
|
go: "1.23"
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
|
@ -76,6 +78,7 @@ linters-settings:
|
||||||
excludes:
|
excludes:
|
||||||
- G204 # Audit use of command execution
|
- G204 # Audit use of command execution
|
||||||
- G402 # TLS MinVersion too low
|
- G402 # TLS MinVersion too low
|
||||||
|
- G115 # integer overflow conversion (TODO: verify these)
|
||||||
config:
|
config:
|
||||||
G306: "0644"
|
G306: "0644"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG GO_VERSION=1.22
|
ARG GO_VERSION=1.23
|
||||||
ARG XX_VERSION=1.5.0
|
ARG XX_VERSION=1.5.0
|
||||||
|
|
||||||
# for testing
|
# for testing
|
||||||
|
|
|
@ -523,7 +523,7 @@ func Create(ctx context.Context, txn *store.Txn, dockerCli command.Cli, opts Cre
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelCtx, cancel := context.WithCancelCause(ctx)
|
cancelCtx, cancel := context.WithCancelCause(ctx)
|
||||||
timeoutCtx, _ := context.WithTimeoutCause(cancelCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded))
|
timeoutCtx, _ := context.WithTimeoutCause(cancelCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded)) //nolint:govet,lostcancel // no need to manually cancel this context as we already rely on parent
|
||||||
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
||||||
|
|
||||||
nodes, err := b.LoadNodes(timeoutCtx, WithData())
|
nodes, err := b.LoadNodes(timeoutCtx, WithData())
|
||||||
|
|
|
@ -36,7 +36,7 @@ func runInspect(ctx context.Context, dockerCli command.Cli, in inspectOptions) e
|
||||||
}
|
}
|
||||||
|
|
||||||
timeoutCtx, cancel := context.WithCancelCause(ctx)
|
timeoutCtx, cancel := context.WithCancelCause(ctx)
|
||||||
timeoutCtx, _ = context.WithTimeoutCause(timeoutCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded))
|
timeoutCtx, _ = context.WithTimeoutCause(timeoutCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded)) //nolint:govet,lostcancel // no need to manually cancel this context as we already rely on parent
|
||||||
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
||||||
|
|
||||||
nodes, err := b.LoadNodes(timeoutCtx, builder.WithData())
|
nodes, err := b.LoadNodes(timeoutCtx, builder.WithData())
|
||||||
|
|
|
@ -59,7 +59,7 @@ func runLs(ctx context.Context, dockerCli command.Cli, in lsOptions) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
timeoutCtx, cancel := context.WithCancelCause(ctx)
|
timeoutCtx, cancel := context.WithCancelCause(ctx)
|
||||||
timeoutCtx, _ = context.WithTimeoutCause(timeoutCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded))
|
timeoutCtx, _ = context.WithTimeoutCause(timeoutCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded)) //nolint:govet,lostcancel // no need to manually cancel this context as we already rely on parent
|
||||||
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
||||||
|
|
||||||
eg, _ := errgroup.WithContext(timeoutCtx)
|
eg, _ := errgroup.WithContext(timeoutCtx)
|
||||||
|
|
|
@ -151,7 +151,7 @@ func rmAllInactive(ctx context.Context, txn *store.Txn, dockerCli command.Cli, i
|
||||||
}
|
}
|
||||||
|
|
||||||
timeoutCtx, cancel := context.WithCancelCause(ctx)
|
timeoutCtx, cancel := context.WithCancelCause(ctx)
|
||||||
timeoutCtx, _ = context.WithTimeoutCause(timeoutCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded))
|
timeoutCtx, _ = context.WithTimeoutCause(timeoutCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded)) //nolint:govet,lostcancel // no need to manually cancel this context as we already rely on parent
|
||||||
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
||||||
|
|
||||||
eg, _ := errgroup.WithContext(timeoutCtx)
|
eg, _ := errgroup.WithContext(timeoutCtx)
|
||||||
|
|
|
@ -63,7 +63,7 @@ func NewRemoteBuildxController(ctx context.Context, dockerCli command.Cli, opts
|
||||||
|
|
||||||
// connect to buildx server if it is already running
|
// connect to buildx server if it is already running
|
||||||
ctx2, cancel := context.WithCancelCause(ctx)
|
ctx2, cancel := context.WithCancelCause(ctx)
|
||||||
ctx2, _ = context.WithTimeoutCause(ctx2, 1*time.Second, errors.WithStack(context.DeadlineExceeded))
|
ctx2, _ = context.WithTimeoutCause(ctx2, 1*time.Second, errors.WithStack(context.DeadlineExceeded)) //nolint:govet,lostcancel // no need to manually cancel this context as we already rely on parent
|
||||||
c, err := newBuildxClientAndCheck(ctx2, filepath.Join(serverRoot, defaultSocketFilename))
|
c, err := newBuildxClientAndCheck(ctx2, filepath.Join(serverRoot, defaultSocketFilename))
|
||||||
cancel(errors.WithStack(context.Canceled))
|
cancel(errors.WithStack(context.Canceled))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -92,7 +92,7 @@ func NewRemoteBuildxController(ctx context.Context, dockerCli command.Cli, opts
|
||||||
|
|
||||||
// wait for buildx server to be ready
|
// wait for buildx server to be ready
|
||||||
ctx2, cancel = context.WithCancelCause(ctx)
|
ctx2, cancel = context.WithCancelCause(ctx)
|
||||||
ctx2, _ = context.WithTimeoutCause(ctx2, 10*time.Second, errors.WithStack(context.DeadlineExceeded))
|
ctx2, _ = context.WithTimeoutCause(ctx2, 10*time.Second, errors.WithStack(context.DeadlineExceeded)) //nolint:govet,lostcancel // no need to manually cancel this context as we already rely on parent
|
||||||
c, err = newBuildxClientAndCheck(ctx2, filepath.Join(serverRoot, defaultSocketFilename))
|
c, err = newBuildxClientAndCheck(ctx2, filepath.Join(serverRoot, defaultSocketFilename))
|
||||||
cancel(errors.WithStack(context.Canceled))
|
cancel(errors.WithStack(context.Canceled))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -29,7 +29,7 @@ func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
|
||||||
func (d *Driver) Info(ctx context.Context) (*driver.Info, error) {
|
func (d *Driver) Info(ctx context.Context) (*driver.Info, error) {
|
||||||
_, err := d.DockerAPI.ServerVersion(ctx)
|
_, err := d.DockerAPI.ServerVersion(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(driver.ErrNotConnecting{}, err.Error())
|
return nil, errors.Wrap(driver.ErrNotConnecting{}, err.Error())
|
||||||
}
|
}
|
||||||
return &driver.Info{
|
return &driver.Info{
|
||||||
Status: driver.Running,
|
Status: driver.Running,
|
||||||
|
@ -39,7 +39,7 @@ func (d *Driver) Info(ctx context.Context) (*driver.Info, error) {
|
||||||
func (d *Driver) Version(ctx context.Context) (string, error) {
|
func (d *Driver) Version(ctx context.Context) (string, error) {
|
||||||
v, err := d.DockerAPI.ServerVersion(ctx)
|
v, err := d.DockerAPI.ServerVersion(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", errors.Wrapf(driver.ErrNotConnecting{}, err.Error())
|
return "", errors.Wrap(driver.ErrNotConnecting{}, err.Error())
|
||||||
}
|
}
|
||||||
if bkversion, _ := resolveBuildKitVersion(v.Version); bkversion != "" {
|
if bkversion, _ := resolveBuildKitVersion(v.Version); bkversion != "" {
|
||||||
return bkversion, nil
|
return bkversion, nil
|
||||||
|
|
|
@ -48,7 +48,7 @@ func (d *Driver) Bootstrap(ctx context.Context, l progress.Logger) error {
|
||||||
}
|
}
|
||||||
return progress.Wrap("[internal] waiting for connection", l, func(_ progress.SubLogger) error {
|
return progress.Wrap("[internal] waiting for connection", l, func(_ progress.SubLogger) error {
|
||||||
cancelCtx, cancel := context.WithCancelCause(ctx)
|
cancelCtx, cancel := context.WithCancelCause(ctx)
|
||||||
ctx, _ := context.WithTimeoutCause(cancelCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded))
|
ctx, _ := context.WithTimeoutCause(cancelCtx, 20*time.Second, errors.WithStack(context.DeadlineExceeded)) //nolint:govet,lostcancel // no need to manually cancel this context as we already rely on parent
|
||||||
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
defer func() { cancel(errors.WithStack(context.Canceled)) }()
|
||||||
return c.Wait(ctx)
|
return c.Wait(ctx)
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG GO_VERSION=1.22
|
ARG GO_VERSION=1.23
|
||||||
ARG FORMATS=md,yaml
|
ARG FORMATS=md,yaml
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-alpine AS docsgen
|
FROM golang:${GO_VERSION}-alpine AS docsgen
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
# Copyright The Buildx Authors.
|
# Copyright The Buildx Authors.
|
||||||
# Licensed under the Apache License, Version 2.0
|
# Licensed under the Apache License, Version 2.0
|
||||||
|
|
||||||
ARG GO_VERSION="1.22"
|
ARG GO_VERSION=1.23
|
||||||
ARG PROTOC_VERSION="3.11.4"
|
ARG PROTOC_VERSION=3.11.4
|
||||||
ARG PROTOC_GOOGLEAPIS_VERSION=2af421884dd468d565137215c946ebe4e245ae26
|
ARG PROTOC_GOOGLEAPIS_VERSION=2af421884dd468d565137215c946ebe4e245ae26
|
||||||
|
|
||||||
# protoc is dynamically linked to glibc so can't use alpine base
|
# protoc is dynamically linked to glibc so can't use alpine base
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG GO_VERSION="1.22"
|
ARG GO_VERSION=1.23
|
||||||
ARG GOVULNCHECK_VERSION="v1.1.3"
|
ARG GOVULNCHECK_VERSION=v1.1.3
|
||||||
ARG FORMAT="text"
|
ARG FORMAT="text"
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-alpine AS base
|
FROM golang:${GO_VERSION}-alpine AS base
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG GO_VERSION=1.22
|
ARG GO_VERSION=1.23
|
||||||
ARG XX_VERSION=1.3.0
|
ARG XX_VERSION=1.5.0
|
||||||
ARG GOLANGCI_LINT_VERSION=1.57.2
|
ARG GOLANGCI_LINT_VERSION=1.62.0
|
||||||
ARG GOPLS_VERSION=v0.20.0
|
ARG GOPLS_VERSION=v0.26.0
|
||||||
# disabled: deprecated unusedvariable simplifyrange
|
# disabled: deprecated unusedvariable simplifyrange
|
||||||
ARG GOPLS_ANALYZERS="embeddirective fillreturns infertypeargs nonewvars noresultvalues simplifycompositelit simplifyslice stubmethods undeclaredname unusedparams useany"
|
ARG GOPLS_ANALYZERS="embeddirective fillreturns infertypeargs nonewvars norangeoverfunc noresultvalues simplifycompositelit simplifyslice undeclaredname unusedparams useany"
|
||||||
|
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
|
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG GO_VERSION=1.22
|
ARG GO_VERSION=1.23
|
||||||
ARG MODOUTDATED_VERSION=v0.9.0
|
ARG MODOUTDATED_VERSION=v0.9.0
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-alpine AS base
|
FROM golang:${GO_VERSION}-alpine AS base
|
||||||
|
|
Loading…
Reference in New Issue