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

update Go to 1.11 #626

Merged
merged 1 commit into from
Sep 17, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ DESTDIR=/usr/local
binaries: $(BINARIES)
binaries-all: $(BINARIES) $(BINARIES_EXTRA)

bin/buildctl-darwin: FORCE
mkdir -p bin
docker build --build-arg GOOS=darwin -t buildkit:buildctl-darwin --target buildctl -f ./hack/dockerfiles/test.Dockerfile --force-rm .
( containerID=$$(docker create buildkit:buildctl-darwin noop); \
docker cp $$containerID:/usr/bin/buildctl $@; \
docker rm $$containerID )
chmod +x $@

bin/%.exe: FORCE
mkdir -p bin
docker build -t buildkit:$*.exe --target $*.exe -f ./hack/dockerfiles/test.Dockerfile --force-rm .
Expand Down
2 changes: 1 addition & 1 deletion cache/contenthash/checksum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ func parseChange(str string) *change {
st.Mode |= 0777
}

c.fi = &fsutil.StatInfo{st}
c.fi = &fsutil.StatInfo{Stat: st}
return c
}

Expand Down
2 changes: 1 addition & 1 deletion client/llb/llbbuild/llbbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (b *build) Marshal(c *llb.Constraints) (digest.Digest, []byte, *pb.OpMetada
pbo := &pb.BuildOp{
Builder: pb.LLBBuilder,
Inputs: map[string]*pb.BuildInput{
pb.LLBDefinitionInput: {pb.InputIndex(0)}},
pb.LLBDefinitionInput: {Input: pb.InputIndex(0)}},
}

pbo.Attrs = map[string]string{}
Expand Down
2 changes: 1 addition & 1 deletion client/llb/llbbuild/llbbuild_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestMarshal(t *testing.T) {
require.Equal(t, len(op.Inputs), 1)
require.Equal(t, buildop.Builder, pb.LLBBuilder)
require.Equal(t, len(buildop.Inputs), 1)
require.Equal(t, buildop.Inputs[pb.LLBDefinitionInput], &pb.BuildInput{pb.InputIndex(0)})
require.Equal(t, buildop.Inputs[pb.LLBDefinitionInput], &pb.BuildInput{Input: pb.InputIndex(0)})

require.Equal(t, buildop.Attrs[pb.AttrLLBDefinitionFilename], "myfilename")
}
Expand Down
2 changes: 1 addition & 1 deletion control/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (c *Controller) Prune(req *controlapi.PruneRequest, stream controlapi.Contr
ReleaseUnreferenced() error
}); ok {
if err := c.ReleaseUnreferenced(); err != nil {
logrus.Errorf("failed to release cache metadata: %+v")
logrus.Errorf("failed to release cache metadata: %+v", 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 @@ -32,7 +32,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
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 @@ -32,7 +32,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
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 @@ -32,7 +32,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
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 @@ -33,7 +33,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
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 @@ -31,7 +31,7 @@ func main() {
}

func goBuildBase() llb.State {
goAlpine := llb.Image("docker.io/library/golang:1.10-alpine")
goAlpine := llb.Image("docker.io/library/golang:1.11-alpine")
return goAlpine.
AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnv).
AddEnv("GOPATH", "/go").
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,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.10-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.11-alpine AS builder
ARG BUILDTAGS=""
COPY . /go/src/github.com/moby/buildkit
ARG TARGETOS
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/generated-files.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# protoc is dynamically linked to glibc to can't use golang:1.10-alpine
FROM golang:1.10 AS gobuild-base
# protoc is dynamically linked to glibc to can't use golang:1.11-alpine
FROM golang:1.11 AS gobuild-base
ARG PROTOC_VERSION=3.1.0
ARG GOGO_VERSION=master
RUN apt-get update && apt-get install -y \
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/lint.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.10-alpine
FROM golang:1.11-alpine
RUN apk add --no-cache git
RUN go get -u gopkg.in/alecthomas/gometalinter.v1 \
&& mv /go/bin/gometalinter.v1 /go/bin/gometalinter \
Expand Down
10 changes: 8 additions & 2 deletions hack/dockerfiles/test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG ROOTLESSKIT_VERSION=20b0fc24b305b031a61ef1a1ca456aadafaf5e77
# The `buildkitd` stage and the `buildctl` stage are placed here
# so that they can be built quickly with legacy DAG-unaware `docker build --target=...`

FROM golang:1.10-alpine AS gobuild-base
FROM golang:1.11-alpine AS gobuild-base
RUN apk add --no-cache g++ linux-headers
RUN apk add --no-cache git libseccomp-dev make

Expand All @@ -23,9 +23,15 @@ RUN mkdir .tmp; \

FROM buildkit-base AS buildctl
ENV CGO_ENABLED=0
ARG GOOS=linux
RUN go build -ldflags "$(cat .tmp/ldflags) -d" -o /usr/bin/buildctl ./cmd/buildctl

FROM buildkit-base AS buildctl-darwin
ENV CGO_ENABLED=0
ENV GOOS=darwin
RUN go build -ldflags "$(cat .tmp/ldflags)" -o /usr/bin/buildctl-darwin ./cmd/buildctl
# reset GOOS for legacy builder
ENV GOOS=linux

FROM buildkit-base AS buildkitd
ENV CGO_ENABLED=1
RUN go build -installsuffix netgo -ldflags "$(cat .tmp/ldflags) -w -extldflags -static" -tags 'seccomp netgo cgo static_build' -o /usr/bin/buildkitd ./cmd/buildkitd
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/vendor.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.10-alpine AS vndr
FROM golang:1.11-alpine AS vndr
RUN apk add --no-cache git
# NOTE: hack scripts override VNDR_VERSION to a specific revision
ARG VNDR_VERSION=master
Expand Down
2 changes: 1 addition & 1 deletion solver/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ func debugSchedulerPreUnpark(e *edge, inc []pipe.Sender, updates, allPipes []pip
if dep.req != nil {
des = dep.req.Request().(*edgeRequest).desiredState
}
logrus.Debugf(":: dep%d %s state=%s des=%s keys=%s hasslowcache=%v", i, e.edge.Vertex.Inputs()[i].Vertex.Name(), dep.state, des, len(dep.keys), e.slowCacheFunc(dep) != nil)
logrus.Debugf(":: dep%d %s state=%s des=%s keys=%d hasslowcache=%v", i, e.edge.Vertex.Inputs()[i].Vertex.Name(), dep.state, des, len(dep.keys), e.slowCacheFunc(dep) != nil)
}

for i, in := range inc {
Expand Down