Skip to content
Draft
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/.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
type: string

env:
GO_VERSION: "1.24"
GO_VERSION: "1.25"
SETUP_BUILDX_VERSION: "edge"
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildkit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
- 'frontend/dockerfile/docs/**'

env:
GO_VERSION: "1.24"
GO_VERSION: "1.25"
SETUP_BUILDX_VERSION: "edge"
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"
SCOUT_VERSION: "1.13.0"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
- 'frontend/dockerfile/docs/**'

env:
GO_VERSION: "1.24"
GO_VERSION: "1.25"
SETUP_BUILDX_VERSION: "edge"
SETUP_BUILDKIT_TAG: "moby/buildkit:latest"
SCOUT_VERSION: "1.13.0"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
- 'frontend/dockerfile/docs/**'

env:
GO_VERSION: "1.24"
GO_VERSION: "1.25"
SETUP_BUILDX_VERSION: "edge"
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"
DESTDIR: "./bin"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARG AZURITE_VERSION=3.33.0
ARG GOTESTSUM_VERSION=v1.9.0
ARG DELVE_VERSION=v1.23.1

ARG GO_VERSION=1.24
ARG GO_VERSION=1.25
ARG ALPINE_VERSION=3.22
ARG XX_VERSION=1.6.1
ARG BUILDKIT_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion cache/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2783,7 +2783,7 @@ func mapToSystemTarBlob(t *testing.T, m map[string]string) ([]byte, ocispecs.Des
}
}

cmd := exec.Command("tar", "-C", tmpdir, "-c", ".")
cmd := exec.CommandContext(t.Context(), "tar", "-C", tmpdir, "-c", ".")
tarout, err := cmd.Output()
if err != nil {
return nil, ocispecs.Descriptor{}, err
Expand Down
2 changes: 1 addition & 1 deletion cache/util/fsutil.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package util
package cacheutil

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cache/util/fsutil_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package util
package cacheutil

import (
"path"
Expand Down
4 changes: 2 additions & 2 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ func testRawSocketMount(t *testing.T, sb integration.Sandbox) {

dir := t.TempDir()
sockPath := filepath.Join(dir, "test.sock")
l, err := net.Listen("unix", sockPath)
l, err := (&net.ListenConfig{}).Listen(t.Context(), "unix", sockPath)
require.NoError(t, err)
defer l.Close()

Expand Down Expand Up @@ -11239,7 +11239,7 @@ func makeSSHAgentSock(t *testing.T, agent agent.Agent) (p string, err error) {
tmpDir := integration.Tmpdir(t)
sockPath := filepath.Join(tmpDir.Name, "ssh_auth_sock")

l, err := net.Listen("unix", sockPath)
l, err := (&net.ListenConfig{}).Listen(t.Context(), "unix", sockPath)
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/buildctl/common/common.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package common
package cmdcommon

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion cmd/buildctl/common/common_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package common
package cmdcommon

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion cmd/buildctl/common/trace.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package common
package cmdcommon

import (
"context"
Expand Down
7 changes: 4 additions & 3 deletions cmd/buildctl/dialstdio.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"context"
"io"
"net"
"os"
Expand All @@ -22,7 +23,7 @@ var dialStdioCommand = cli.Command{
func dialStdioAction(clicontext *cli.Context) error {
addr := clicontext.GlobalString("addr")
timeout := time.Duration(clicontext.GlobalInt("timeout")) * time.Second
conn, err := dialer(addr, timeout)
conn, err := dialer(context.TODO(), addr, timeout) // use appcontext?
if err != nil {
return err
}
Expand Down Expand Up @@ -60,15 +61,15 @@ func dialStdioAction(clicontext *cli.Context) error {
return err
}

func dialer(address string, timeout time.Duration) (net.Conn, error) {
func dialer(ctx context.Context, address string, timeout time.Duration) (net.Conn, error) {
addrParts := strings.SplitN(address, "://", 2)
if len(addrParts) != 2 {
return nil, errors.Errorf("invalid address %s", address)
}
if addrParts[0] != "unix" {
return nil, errors.Errorf("invalid address %s (expected unix://, got %s://)", address, addrParts[0])
}
return net.DialTimeout(addrParts[0], addrParts[1], timeout)
return (&net.Dialer{Timeout: timeout}).DialContext(ctx, addrParts[0], addrParts[1])
}

func copier(to halfWriteCloser, from halfReadCloser, debugDescription string) error {
Expand Down
4 changes: 2 additions & 2 deletions cmd/buildkitd/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

var cacheStoreForDebug solver.CacheKeyStorage

func setupDebugHandlers(addr string) error {
func setupDebugHandlers(ctx context.Context, addr string) error {
m := http.NewServeMux()
m.Handle("/debug/vars", expvar.Handler())
m.Handle("/debug/pprof/", http.HandlerFunc(pprof.Index))
Expand Down Expand Up @@ -62,7 +62,7 @@ func setupDebugHandlers(addr string) error {
if !strings.Contains(addr, "://") {
addr = "tcp://" + addr
}
l, err := getListener(addr, os.Getuid(), os.Getgid(), "", nil, false)
l, err := getListener(ctx, addr, os.Getuid(), os.Getgid(), "", nil, false)
if err != nil {
return err
}
Expand Down
12 changes: 6 additions & 6 deletions cmd/buildkitd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func main() {
}

if cfg.GRPC.DebugAddress != "" {
if err := setupDebugHandlers(cfg.GRPC.DebugAddress); err != nil {
if err := setupDebugHandlers(ctx, cfg.GRPC.DebugAddress); err != nil {
return err
}
}
Expand Down Expand Up @@ -345,7 +345,7 @@ func main() {

// listeners have to be initialized before the controller
// https://github.com/moby/buildkit/issues/4618
listeners, err := newGRPCListeners(cfg.GRPC)
listeners, err := getGRPCListeners(ctx, cfg.GRPC)
if err != nil {
return err
}
Expand Down Expand Up @@ -432,7 +432,7 @@ func main() {
}
}

func newGRPCListeners(cfg config.GRPCConfig) ([]net.Listener, error) {
func getGRPCListeners(ctx context.Context, cfg config.GRPCConfig) ([]net.Listener, error) {
addrs := cfg.Address
if len(addrs) == 0 {
return nil, errors.New("--addr cannot be empty")
Expand All @@ -452,7 +452,7 @@ func newGRPCListeners(cfg config.GRPCConfig) ([]net.Listener, error) {

listeners := make([]net.Listener, 0, len(addrs))
for _, addr := range addrs {
l, err := getListener(addr, *cfg.UID, *cfg.GID, sd, tlsConfig, true)
l, err := getListener(ctx, addr, *cfg.UID, *cfg.GID, sd, tlsConfig, true)
if err != nil {
for _, l := range listeners {
l.Close()
Expand Down Expand Up @@ -686,7 +686,7 @@ func groupToGID(group string) (int, error) {
return strconv.Atoi(group)
}

func getListener(addr string, uid, gid int, secDescriptor string, tlsConfig *tls.Config, warnTLS bool) (net.Listener, error) {
func getListener(ctx context.Context, addr string, uid, gid int, secDescriptor string, tlsConfig *tls.Config, warnTLS bool) (net.Listener, error) {
addrSlice := strings.SplitN(addr, "://", 2)
if len(addrSlice) < 2 {
return nil, errors.Errorf("address %s does not contain proto, you meant unix://%s ?",
Expand All @@ -706,7 +706,7 @@ func getListener(addr string, uid, gid int, secDescriptor string, tlsConfig *tls
case "fd":
return listenFD(listenAddr, tlsConfig)
case "tcp":
l, err := net.Listen("tcp", listenAddr)
l, err := (&net.ListenConfig{}).Listen(ctx, "tcp", listenAddr)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit0/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.24-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.25-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit1/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.24-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.25-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit2/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.24-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.25-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit3/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.24-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.25-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion examples/buildkit4/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.24-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.25-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion examples/nested-llb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.24-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.25-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix).
AddEnv("GOPATH", "/go").
Expand Down
2 changes: 1 addition & 1 deletion executor/resources/types/systypes.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package types
package resourcestypes

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion executor/resources/types/types.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package types
package resourcestypes

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile-upstream:master

ARG GO_VERSION=1.24
ARG GO_VERSION=1.25
ARG ALPINE_VERSION=3.22
ARG XX_VERSION=1.6.1

Expand Down
20 changes: 10 additions & 10 deletions frontend/dockerfile/dockerfile_addgit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ func testAddGit(t *testing.T, sb integration.Sandbox, format string) {
gitCommands = append(gitCommands, makeCommit("v0.0.2")...)
gitCommands = append(gitCommands, makeCommit("v0.0.3")...)
gitCommands = append(gitCommands, "git update-server-info")
err = runShell(gitDir, gitCommands...)
err = runShell(sb.Context(), gitDir, gitCommands...)
require.NoError(t, err)

revParseCmd := exec.Command("git", "rev-parse", "v0.0.2")
revParseCmd := exec.CommandContext(sb.Context(), "git", "rev-parse", "v0.0.2")
revParseCmd.Dir = gitDir
commitHashB, err := revParseCmd.Output()
require.NoError(t, err)
commitHashV2 := strings.TrimSpace(string(commitHashB))

revParseCmd = exec.Command("git", "rev-parse", "v0.0.3")
revParseCmd = exec.CommandContext(sb.Context(), "git", "rev-parse", "v0.0.3")
revParseCmd.Dir = gitDir
commitHashB, err = revParseCmd.Output()
require.NoError(t, err)
Expand Down Expand Up @@ -283,10 +283,10 @@ func testAddGitChecksumCache(t *testing.T, sb integration.Sandbox) {
gitCommands = append(gitCommands, makeCommit("v0.0.1")...)
gitCommands = append(gitCommands, makeCommit("v0.0.2")...)
gitCommands = append(gitCommands, "git update-server-info")
err = runShell(gitDir, gitCommands...)
err = runShell(sb.Context(), gitDir, gitCommands...)
require.NoError(t, err)

revParseCmd := exec.Command("git", "rev-parse", "v0.0.2")
revParseCmd := exec.CommandContext(sb.Context(), "git", "rev-parse", "v0.0.2")
revParseCmd.Dir = gitDir
commitHashB, err := revParseCmd.Output()
require.NoError(t, err)
Expand Down Expand Up @@ -370,7 +370,7 @@ func testGitQueryString(t *testing.T, sb integration.Sandbox) {
f := getFrontend(t, sb)

subModDir := t.TempDir()
err := runShell(subModDir, []string{
err := runShell(sb.Context(), subModDir, []string{
"git init",
"git config --local user.email test",
"git config --local user.name test",
Expand All @@ -386,7 +386,7 @@ func testGitQueryString(t *testing.T, sb integration.Sandbox) {
submodServerURL := subModServer.URL

gitDir := t.TempDir()
err = runShell(gitDir, []string{
err = runShell(sb.Context(), gitDir, []string{
"git init",
"git config --local user.email test",
"git config --local user.name test",
Expand All @@ -406,7 +406,7 @@ COPY foo out
`), 0600)
require.NoError(t, err)

err = runShell(gitDir, []string{
err = runShell(sb.Context(), gitDir, []string{
"git submodule add " + submodServerURL + "/.git submod",
"git add Dockerfile foo submod",
"git commit -m initial",
Expand All @@ -433,15 +433,15 @@ COPY foo out
require.NoError(t, err)

// get commit SHA for v0.0.2
cmd := exec.Command("git", "rev-parse", "v0.0.2")
cmd := exec.CommandContext(sb.Context(), "git", "rev-parse", "v0.0.2")
cmd.Dir = gitDir
dt, err := cmd.CombinedOutput()
require.NoError(t, err)
commitHashV2 := strings.TrimSpace(string(dt))
require.Len(t, commitHashV2, 40)

// get commit SHA for latest
cmd = exec.Command("git", "rev-parse", "latest")
cmd = exec.CommandContext(sb.Context(), "git", "rev-parse", "latest")
cmd.Dir = gitDir
dt, err = cmd.CombinedOutput()
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions frontend/dockerfile/dockerfile_provenance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ COPY myapp.Dockerfile /
if format == "sha256" {
initOptions = " --object-format=sha256"
}
err = runShell(dir.Name,
err = runShell(ctx, dir.Name,
"git init"+initOptions,
"git config --local user.email test",
"git config --local user.name test",
Expand All @@ -447,7 +447,7 @@ COPY myapp.Dockerfile /
)
require.NoError(t, err)

cmd := exec.Command("git", "rev-parse", "v1")
cmd := exec.CommandContext(ctx, "git", "rev-parse", "v1")
cmd.Dir = dir.Name
expectedGitSHA, err := cmd.Output()
require.NoError(t, err)
Expand Down
Loading
Loading