Skip to content

Commit fb422db

Browse files
tamirdgvisor-bot
authored andcommitted
Update go-tools to 2020.2.1
...and a bunch of other things as I worked through the rot. Notably: - Upgrade to bazel 4.0.0 - Upgrade to Go 1.15.7 Remove go_branch stderr suppression; this made it quite difficult to see what was failing while developing this patch. PiperOrigin-RevId: 355257833
1 parent ff8b308 commit fb422db

File tree

11 files changed

+454
-262
lines changed

11 files changed

+454
-262
lines changed

WORKSPACE

+161-148
Large diffs are not rendered by default.

go.mod

+17-26
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,42 @@ go 1.15
55
replace github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.6.0
66

77
require (
8-
cloud.google.com/go v0.52.1-0.20200122224058-0482b626c726 // indirect
9-
github.com/Microsoft/go-winio v0.4.15-0.20200908182639-5b44b70ab3ab // indirect
10-
github.com/Microsoft/hcsshim v0.8.6 // indirect
8+
cloud.google.com/go v0.75.0 // indirect
9+
github.com/Microsoft/go-winio v0.4.16 // indirect
10+
github.com/Microsoft/hcsshim v0.8.14 // indirect
1111
github.com/cenkalti/backoff v1.1.1-0.20190506075156-2146c9339422 // indirect
12-
github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3 // indirect
13-
github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327
12+
github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327 // indirect
13+
github.com/containerd/console v1.0.1 // indirect
1414
github.com/containerd/containerd v1.3.9 // indirect
15-
github.com/containerd/continuity v0.0.0-20200928162600-f2cc35102c2a // indirect
15+
github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 // indirect
1616
github.com/containerd/fifo v0.0.0-20191213151349-ff969a566b00 // indirect
1717
github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 // indirect
18+
github.com/containerd/ttrpc v1.0.2 // indirect
1819
github.com/containerd/typeurl v0.0.0-20200205145503-b45ef1f1f737 // indirect
19-
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
20-
github.com/coreos/go-systemd/v22 v22.0.0 // indirect
21-
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
2220
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible // indirect
2321
github.com/docker/docker v1.4.2-0.20191028175130-9e7d5ac5ea55 // indirect
2422
github.com/docker/go-connections v0.3.0 // indirect
2523
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
26-
github.com/docker/go-units v0.4.0 // indirect
27-
github.com/dpjacques/clockwork v0.1.1-0.20200827220843-c1f524b839be // indirect
28-
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e // indirect
2924
github.com/gofrs/flock v0.6.1-0.20180915234121-886344bea079 // indirect
3025
github.com/gogo/googleapis v1.4.0 // indirect
31-
github.com/google/go-cmp v0.5.3-0.20201020212313-ab46b8bd0abd // indirect
32-
github.com/google/go-github/v28 v28.1.2-0.20191108005307-e555eab49ce8 // indirect
26+
github.com/google/go-github/v32 v32.1.0 // indirect
27+
github.com/google/pprof v0.0.0-20210115211752-39141e76b647 // indirect
3328
github.com/google/subcommands v1.0.2-0.20190508160503-636abe8753b8 // indirect
34-
github.com/hashicorp/go-multierror v1.0.0 // indirect
29+
github.com/hashicorp/go-multierror v1.1.0 // indirect
3530
github.com/kr/pty v1.1.4-0.20190131011033-7dc38fb350b1 // indirect
36-
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a
31+
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a // indirect
3732
github.com/mohae/deepcopy v0.0.0-20170308212314-bb9b5e7adda9 // indirect
3833
github.com/opencontainers/image-spec v1.0.1 // indirect
3934
github.com/opencontainers/runc v0.1.1 // indirect
40-
github.com/opencontainers/runtime-spec v1.0.2-0.20181111125026-1722abf79c2f // indirect
4135
github.com/pborman/uuid v1.2.0 // indirect
4236
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 // indirect
43-
github.com/urfave/cli v1.22.2 // indirect
4437
github.com/vishvananda/netlink v1.0.1-0.20190930145447-2ec5bdc52b86 // indirect
45-
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae // indirect
38+
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
39+
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
4640
go.uber.org/multierr v1.6.0 // indirect
47-
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
48-
golang.org/x/tools v0.0.0-20201021000207-d49c4edd7d96 // indirect
49-
google.golang.org/grpc v1.29.0 // indirect
41+
google.golang.org/grpc v1.36.0-dev.0.20210122012134-2c42474aca0c // indirect
5042
google.golang.org/protobuf v1.25.1-0.20201020201750-d3470999428b // indirect
51-
gotest.tools v2.2.0+incompatible // indirect
52-
k8s.io/api v0.16.13
53-
k8s.io/apimachinery v0.16.14-rc.0
54-
k8s.io/client-go v0.16.13
43+
honnef.co/go/tools v0.1.1 // indirect
44+
k8s.io/apimachinery v0.16.14-rc.0 // indirect
45+
k8s.io/client-go v0.16.13 // indirect
5546
)

go.sum

+260-72
Large diffs are not rendered by default.

images/default/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud
2424
ln -s /google-cloud-sdk/bin/gcloud /usr/bin/gcloud
2525

2626
# Download the official bazel binary. The APT repository isn't used because there is not packages for arm64.
27-
RUN sh -c 'curl -o /usr/local/bin/bazel https://releases.bazel.build/3.5.1/release/bazel-3.5.1-linux-$(uname -m | sed s/aarch64/arm64/) && chmod ugo+x /usr/local/bin/bazel'
27+
RUN sh -c 'curl -o /usr/local/bin/bazel https://releases.bazel.build/4.0.0/release/bazel-4.0.0-linux-$(uname -m | sed s/aarch64/arm64/) && chmod ugo+x /usr/local/bin/bazel'
2828
WORKDIR /workspace
2929
ENTRYPOINT ["/usr/local/bin/bazel"]

nogo.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,6 @@ analyzers:
155155
SA5011:
156156
internal:
157157
exclude:
158-
- pkg/sentry/fs/fdpipe/pipe_opener_test.go # False positive.
159-
- pkg/tcpip/tests/integration/link_resolution_test.go # False positive.
158+
# https://github.com/dominikh/go-tools/issues/924
159+
- pkg/sentry/fs/fdpipe/pipe_opener_test.go
160+
- pkg/tcpip/tests/integration/link_resolution_test.go

tools/bazel.mk

+3-4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ UID := $(shell id -u ${USER})
7575
GID := $(shell id -g ${USER})
7676
USERADD_OPTIONS :=
7777
DOCKER_RUN_OPTIONS :=
78+
DOCKER_RUN_OPTIONS += --rm
7879
DOCKER_RUN_OPTIONS += --user $(UID):$(GID)
7980
DOCKER_RUN_OPTIONS += --entrypoint ""
8081
DOCKER_RUN_OPTIONS += --init
@@ -160,15 +161,13 @@ bazel-image: load-default ## Ensures that the local builder exists.
160161
@docker commit $(BUILDER_NAME) gvisor.dev/images/builder >&2
161162
.PHONY: bazel-image
162163

163-
# Note: when starting the bazel server, we tie the life of the container to the
164-
# bazel server's life, so that the container disappears naturally.
165164
ifneq (true,$(shell $(wrapper echo true)))
166165
bazel-server: bazel-image ## Ensures that the server exists.
167166
@$(call header,DOCKER RUN)
168167
@docker rm -f $(DOCKER_NAME) 2>/dev/null || true
169-
@mkdir -p $(GCLOUD_CONFIG)
170168
@mkdir -p $(BAZEL_CACHE)
171-
@docker run -d --rm --name $(DOCKER_NAME) \
169+
@mkdir -p $(GCLOUD_CONFIG)
170+
@docker run -d --name $(DOCKER_NAME) \
172171
-v "$(CURDIR):$(CURDIR)" \
173172
--workdir "$(CURDIR)" \
174173
$(DOCKER_RUN_OPTIONS) \

tools/github/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ go_binary(
99
deps = [
1010
"//tools/github/nogo",
1111
"//tools/github/reviver",
12-
"@com_github_google_go_github_v28//github:go_default_library",
12+
"@com_github_google_go_github_v32//github:go_default_library",
1313
"@org_golang_x_oauth2//:go_default_library",
1414
],
1515
)

tools/github/nogo/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ go_library(
1111
],
1212
deps = [
1313
"//tools/nogo",
14-
"@com_github_google_go_github_v28//github:go_default_library",
14+
"@com_github_google_go_github_v32//github:go_default_library",
1515
],
1616
)

tools/github/reviver/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ go_library(
1212
visibility = [
1313
"//tools/github:__subpackages__",
1414
],
15-
deps = ["@com_github_google_go_github_v28//github:go_default_library"],
15+
deps = ["@com_github_google_go_github_v32//github:go_default_library"],
1616
)
1717

1818
go_test(

tools/go_branch.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ readonly module origpwd othersrc
4848
# Build an amd64 & arm64 gopath.
4949
declare -r go_amd64="${tmp_dir}/amd64"
5050
declare -r go_arm64="${tmp_dir}/arm64"
51-
make build BAZEL_OPTIONS="" TARGETS="//:gopath" 2>/dev/null
51+
make build BAZEL_OPTIONS="" TARGETS="//:gopath"
5252
rsync --recursive --delete --copy-links bazel-bin/gopath/ "${go_amd64}"
5353
make build BAZEL_OPTIONS=--config=cross-aarch64 TARGETS="//:gopath" 2>/dev/null
5454
rsync --recursive --delete --copy-links bazel-bin/gopath/ "${go_arm64}"

tools/rules_go_symbols.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ diff --git a/go/private/rules/test.bzl b/go/private/rules/test.bzl
22
index 17516ad7..76b6c68c 100644
33
--- a/go/private/rules/test.bzl
44
+++ b/go/private/rules/test.bzl
5-
@@ -121,9 +121,6 @@ def _go_test_impl(ctx):
5+
@@ -117,9 +117,6 @@ def _go_test_impl(ctx):
66
)
7-
7+
88
test_gc_linkopts = gc_linkopts(ctx)
99
- if not go.mode.debug:
1010
- # Disable symbol table and DWARF generation for test binaries.
1111
- test_gc_linkopts.extend(["-s", "-w"])
12-
13-
# Now compile the test binary itself
14-
test_library = GoLibrary(
12+
13+
# Link in the run_dir global for bzltestutil
14+
test_gc_linkopts.extend(["-X", "github.com/bazelbuild/rules_go/go/tools/bzltestutil.RunDir=" + run_dir])

0 commit comments

Comments
 (0)