go.mod: update minimum go version to go1.23

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi committed 2025-03-18 17:58:45 -07:00
1 parent ca8d22becc
commit 910c4c3ec6
9 files changed
+19 -34

No files matched your search

+3 -6
View File
@@ -3,6 +3,7 @@ package cache
import (
"context"
"fmt"
"maps"
"sort"
"strings"
"sync"
@@ -742,9 +743,7 @@ func (cm *cacheManager) Merge(ctx context.Context, inputParents []ImmutableRef,
default:
parents.mergeParents = append(parents.mergeParents, parent.clone())
}
for dgst, handler := range parent.descHandlers {
dhs[dgst] = handler
}
maps.Copy(dhs, parent.descHandlers)
}
// On success, createMergeRef takes ownership of parents
@@ -868,9 +867,7 @@ func (cm *cacheManager) Diff(ctx context.Context, lower, upper ImmutableRef, pg
} else {
dps.upper = parent.clone()
}
for dgst, handler := range parent.descHandlers {
dhs[dgst] = handler
}
maps.Copy(dhs, parent.descHandlers)
}
// Check to see if lower is an ancestor of upper. If so, define the diff as a merge
+2 -6
View File
@@ -142,9 +142,7 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG
}
contentStores := map[string]content.Store{}
for key, store := range cacheOpt.contentStores {
contentStores[key] = store
}
maps.Copy(contentStores, cacheOpt.contentStores)
for key, store := range opt.OCIStores {
key2 := "oci:" + key
if _, ok := contentStores[key2]; ok {
@@ -538,9 +536,7 @@ func parseCacheOptions(ctx context.Context, isGateway bool, opt SolveOpt) (*cach
func prepareMounts(opt *SolveOpt) (map[string]fsutil.FS, error) {
// merge local mounts and fallback local directories together
mounts := make(map[string]fsutil.FS)
for k, mount := range opt.LocalMounts {
mounts[k] = mount
}
maps.Copy(mounts, opt.LocalMounts)
for k, dir := range opt.LocalDirs {
mount, err := fsutil.NewFS(dir)
if err != nil {
+2 -3
View File
@@ -5,6 +5,7 @@ package main
import (
"context"
"fmt"
"maps"
"os"
"os/exec"
"path/filepath"
@@ -190,9 +191,7 @@ func applyOCIFlags(c *cli.Context, cfg *config.Config) error {
if cfg.Workers.OCI.Labels == nil {
cfg.Workers.OCI.Labels = make(map[string]string)
}
for k, v := range labels {
cfg.Workers.OCI.Labels[k] = v
}
maps.Copy(cfg.Workers.OCI.Labels, labels)
if c.GlobalIsSet("oci-worker-snapshotter") {
cfg.Workers.OCI.Snapshotter = c.GlobalString("oci-worker-snapshotter")
}
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/moby/buildkit
go 1.22.0
go 1.23.0
require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0
+2 -3
View File
@@ -1,6 +1,7 @@
package solver
import (
"maps"
"slices"
"sync"
@@ -101,9 +102,7 @@ func (ck *CacheKey) clone() *CacheKey {
output: ck.output,
ids: make(map[*cacheManager]string, len(ck.ids)),
}
for cm, id := range ck.ids {
nk.ids[cm] = id
}
maps.Copy(nk.ids, ck.ids)
ck.mu.RUnlock()
return nk
}
+2 -3
View File
@@ -3,6 +3,7 @@ package solver
import (
"context"
"fmt"
"maps"
"sync"
"time"
@@ -568,9 +569,7 @@ func (jl *Solver) loadUnlocked(ctx context.Context, v, parent Vertex, j *Job, ca
}
parentState.childVtx[dgst] = struct{}{}
for id, c := range parentState.cache {
st.cache[id] = c
}
maps.Copy(st.cache, parentState.cache)
}
}
+3 -6
View File
@@ -2,6 +2,7 @@ package cdidevices
import (
"context"
"maps"
"strconv"
"strings"
@@ -268,13 +269,9 @@ func deviceAnnotations(dev *cdi.Device) map[string]string {
}
out := make(map[string]string)
// spec annotations
for k, v := range dev.GetSpec().Annotations {
out[k] = v
}
maps.Copy(out, dev.GetSpec().Annotations)
// device annotations
for k, v := range dev.Device.Annotations {
out[k] = v
}
maps.Copy(out, dev.Device.Annotations)
return out
}
+2 -3
View File
@@ -2,6 +2,7 @@ package containerd
import (
"context"
"maps"
"os"
"path/filepath"
"strconv"
@@ -100,9 +101,7 @@ func newContainerd(client *ctd.Client, workerOpts WorkerOptions) (base.WorkerOpt
}
xlabels[wlabel.ContainerdNamespace] = workerOpts.Namespace
xlabels[wlabel.ContainerdUUID] = serverInfo.UUID
for k, v := range workerOpts.Labels {
xlabels[k] = v
}
maps.Copy(xlabels, workerOpts.Labels)
lm := leaseutil.WithNamespace(client.LeasesService(), workerOpts.Namespace)
+2 -3
View File
@@ -4,6 +4,7 @@ package runc
import (
"context"
"maps"
"os"
"path/filepath"
"strconv"
@@ -128,9 +129,7 @@ func NewWorkerOpt(root string, snFactory SnapshotterFactory, rootless bool, proc
xlabels[wlabel.ApparmorProfile] = apparmorProfile
}
for k, v := range labels {
xlabels[k] = v
}
maps.Copy(xlabels, labels)
lm := leaseutil.WithNamespace(ctdmetadata.NewLeaseManager(mdb), "buildkit")
snap := containerdsnapshot.NewSnapshotter(snFactory.Name, mdb.Snapshotter(snFactory.Name), "buildkit", idmap)
if err := cache.MigrateV2(