Skip to content

Commit

Permalink
Update Dockerfile to use 1.18-bullseye (#4229)
Browse files Browse the repository at this point in the history
* Update Dockerfile to use 1.18-bullseye

* Update `.ci` submodule to include python3 change
  • Loading branch information
justinjc authored May 11, 2023
1 parent 69e3675 commit a6f2420
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .ci
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM golang:1.18-stretch
FROM golang:1.18-bullseye

RUN apt-get update && apt-get install -y lsof
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -287,37 +287,37 @@ define SUBDIR_RULES
mock-gen-$(SUBDIR): install-tools
@echo "--- Generating mocks $(SUBDIR)"
@[ ! -d src/$(SUBDIR)/$(mocks_rules_dir) ] || \
PATH=$(combined_bin_paths):$(PATH) PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(mocks_output_dir) src/$(SUBDIR)/$(mocks_rules_dir)
PATH="$(combined_bin_paths):$(PATH)" PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(mocks_output_dir) src/$(SUBDIR)/$(mocks_rules_dir)

.PHONY: thrift-gen-$(SUBDIR)
thrift-gen-$(SUBDIR): install-tools
@echo "--- Generating thrift files $(SUBDIR)"
@[ ! -d src/$(SUBDIR)/$(thrift_rules_dir) ] || \
PATH=$(combined_bin_paths):$(PATH) PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(thrift_output_dir) src/$(SUBDIR)/$(thrift_rules_dir)
PATH="$(combined_bin_paths):$(PATH)" PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(thrift_output_dir) src/$(SUBDIR)/$(thrift_rules_dir)

.PHONY: proto-gen-$(SUBDIR)
proto-gen-$(SUBDIR): install-tools
@echo "--- Generating protobuf files $(SUBDIR)"
@[ ! -d src/$(SUBDIR)/$(proto_rules_dir) ] || \
PATH=$(combined_bin_paths):$(PATH) PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(proto_output_dir) src/$(SUBDIR)/$(proto_rules_dir)
[ ! -d src/$(SUBDIR)/$(proto_rules_dir) ] || \
PATH="$(combined_bin_paths):$(PATH)" PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(proto_output_dir) src/$(SUBDIR)/$(proto_rules_dir)

.PHONY: asset-gen-$(SUBDIR)
asset-gen-$(SUBDIR): install-tools
@echo "--- Generating asset files $(SUBDIR)"
@[ ! -d src/$(SUBDIR)/$(assets_rules_dir) ] || \
PATH=$(combined_bin_paths):$(PATH) PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(assets_output_dir) src/$(SUBDIR)/$(assets_rules_dir)
PATH="$(combined_bin_paths):$(PATH)" PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(assets_output_dir) src/$(SUBDIR)/$(assets_rules_dir)

.PHONY: genny-gen-$(SUBDIR)
genny-gen-$(SUBDIR): install-tools
@echo "--- Generating genny files $(SUBDIR)"
@[ ! -f $(SELF_DIR)/src/$(SUBDIR)/generated-source-files.mk ] || \
PATH=$(combined_bin_paths):$(PATH) make -f $(SELF_DIR)/src/$(SUBDIR)/generated-source-files.mk $(genny_target)
@PATH=$(combined_bin_paths):$(PATH) bash -c "source ./scripts/auto-gen-helpers.sh && gen_cleanup_dir '*_gen.go' $(SELF_DIR)/src/$(SUBDIR)/ && gen_cleanup_dir '*_gen_test.go' $(SELF_DIR)/src/$(SUBDIR)/"
PATH="$(combined_bin_paths):$(PATH)" make -f $(SELF_DIR)/src/$(SUBDIR)/generated-source-files.mk $(genny_target)
@PATH="$(combined_bin_paths):$(PATH)" bash -c "source ./scripts/auto-gen-helpers.sh && gen_cleanup_dir '*_gen.go' $(SELF_DIR)/src/$(SUBDIR)/ && gen_cleanup_dir '*_gen_test.go' $(SELF_DIR)/src/$(SUBDIR)/"

.PHONY: license-gen-$(SUBDIR)
license-gen-$(SUBDIR): install-tools
@echo "--- Updating license in files $(SUBDIR)"
@find $(SELF_DIR)/src/$(SUBDIR) -name '*.go' | PATH=$(combined_bin_paths):$(PATH) xargs -I{} update-license {}
@find $(SELF_DIR)/src/$(SUBDIR) -name '*.go' | PATH="$(combined_bin_paths):$(PATH)" xargs -I{} update-license {}

.PHONY: all-gen-$(SUBDIR)
# NB(prateek): order matters here, mock-gen needs to be after proto/thrift because we sometimes
Expand Down Expand Up @@ -404,7 +404,7 @@ $(foreach SUBDIR_TARGET, $(SUBDIR_TARGETS), $(eval $(SUBDIR_TARGET_RULE)))
kube-gen-all: install-tools
@echo "--- Generating kube bundle"
@./kube/scripts/build_bundle.sh
find kube -name '*.yaml' -print0 | PATH=$(combined_bin_paths):$(PATH) xargs -0 kubeval -v=1.12.0
find kube -name '*.yaml' -print0 | PATH="$(combined_bin_paths):$(PATH)" xargs -0 kubeval -v=1.12.0

.PHONY: go-mod-tidy
go-mod-tidy:
Expand Down Expand Up @@ -474,12 +474,12 @@ test-all-gen: all-gen
# Runs a fossa license report
.PHONY: fossa
fossa: install-tools
PATH=$(combined_bin_paths):$(PATH) fossa analyze --verbose --no-ansi
PATH="$(combined_bin_paths):$(PATH)" fossa analyze --verbose --no-ansi

# Waits for the result of a fossa test and exits success if pass or fail if fails
.PHONY: fossa-test
fossa-test: fossa
PATH=$(combined_bin_paths):$(PATH) fossa test
PATH="$(combined_bin_paths):$(PATH)" fossa test

.PHONY: clean-build
clean-build:
Expand Down
4 changes: 2 additions & 2 deletions scripts/proto-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -e
PROTOC_IMAGE_VERSION=${PROTOC_IMAGE_VERSION:-"znly/protoc:0.2.0"}

# ensure docker is running
docker run --rm hello-world >/dev/null
docker run --platform linux/amd64 --rm hello-world >/dev/null

UID_FLAGS="-u $(id -u)"
if [[ -n "$BUILDKITE" ]]; then
Expand All @@ -29,7 +29,7 @@ for i in "${GOPATH}/src/${PROTO_SRC}"/*; do
m3db_path=$(realpath $GOPATH/src/github.com/m3db/m3)
resolve_protos="Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types"

docker run --rm -w /src -v $GOPATH/src:/src -v ${m3db_path}:/src/github.com/m3db/m3 \
docker run --platform linux/amd64 --rm -w /src -v $GOPATH/src:/src -v ${m3db_path}:/src/github.com/m3db/m3 \
$UID_FLAGS $PROTOC_IMAGE_VERSION \
--gogofaster_out=${resolve_protos},plugins=grpc:/src \
-I/src -I/src/github.com/m3db/m3/vendor ${proto_files}
Expand Down
2 changes: 1 addition & 1 deletion src/aggregator/aggregator/counter_elem_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/aggregator/aggregator/gauge_elem_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/aggregator/aggregator/timer_elem_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/cluster/generated/proto/kvtest/kvtest.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/dbnode/generated/thrift/rpc/rpc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 Uber Technologies, Inc.
// Copyright (c) 2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit a6f2420

Please sign in to comment.