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

[ci] build + release with go1.12 (again) #1674

Merged
merged 2 commits into from
Jun 6, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
command: make clean install-vendor test-all-gen
env:
CGO_ENABLED: 0
GIMME_GO_VERSION: 1.10.x
GIMME_GO_VERSION: 1.12.x
plugins:
gopath-checkout#v1.0.1:
import: github.com/m3db/m3
Expand Down Expand Up @@ -46,7 +46,7 @@ steps:
command: make clean install-vendor docker-integration-test
env:
CGO_ENABLED: 0
GIMME_GO_VERSION: 1.10.x
GIMME_GO_VERSION: 1.12.x
Copy link

@bai bai May 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious: is there any reason for keeping make clean install-vendor docs-test on 1.10?

plugins:
gopath-checkout#v1.0.1:
import: github.com/m3db/m3
Expand Down Expand Up @@ -79,7 +79,7 @@ steps:
command: make clean install-vendor docs-test
env:
CGO_ENABLED: 0
GIMME_GO_VERSION: 1.10.x
GIMME_GO_VERSION: 1.12.x
plugins:
gopath-checkout#v1.0.1:
import: github.com/m3db/m3
Expand Down
2 changes: 1 addition & 1 deletion .ci
Submodule .ci updated 1 files
+3 −1 metalint.sh
26 changes: 14 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $(SELF_DIR)/.ci/common.mk:
include $(SELF_DIR)/.ci/common.mk

SHELL=/bin/bash -o pipefail
GOPATH=$(shell eval $$(go env | grep GOPATH) && echo $$GOPATH)

auto_gen := scripts/auto-gen.sh
process_coverfile := scripts/process-cover.sh
Expand All @@ -16,6 +17,7 @@ m3_package := github.com/m3db/m3
m3_package_path := $(gopath_prefix)/$(m3_package)
mockgen_package := github.com/golang/mock/mockgen
retool_bin_path := $(m3_package_path)/_tools/bin
combined_bin_paths := $(retool_bin_path):$(gopath_bin_path)
retool_src_prefix := $(m3_package_path)/_tools/src
retool_package := github.com/twitchtv/retool
metalint_check := .ci/metalint.sh
Expand Down Expand Up @@ -267,45 +269,45 @@ ifeq ($(SUBDIR), kube)
all-gen-kube: install-tools
@echo "--- Generating kube bundle"
@./kube/scripts/build_bundle.sh
find kube -name '*.yaml' -print0 | PATH=$(retool_bin_path):$(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

else

.PHONY: mock-gen-$(SUBDIR)
mock-gen-$(SUBDIR): install-tools
@echo "--- Generating mocks $(SUBDIR)"
@[ ! -d src/$(SUBDIR)/$(mocks_rules_dir) ] || \
PATH=$(retool_bin_path):$(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=$(retool_bin_path):$(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=$(retool_bin_path):$(PATH) PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(proto_output_dir) 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=$(retool_bin_path):$(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=$(retool_bin_path):$(PATH) make -f $(SELF_DIR)/src/$(SUBDIR)/generated-source-files.mk genny-all
@PATH=$(retool_bin_path):$(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-all
@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=$(retool_bin_path):$(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 @@ -363,7 +365,7 @@ test-ci-integration-$(SUBDIR):
.PHONY: metalint-$(SUBDIR)
metalint-$(SUBDIR): install-gometalinter install-linter-badtime install-linter-importorder
@echo "--- metalinting $(SUBDIR)"
@(PATH=$(retool_bin_path):$(PATH) $(metalint_check) \
@(PATH=$(combined_bin_paths):$(PATH) $(metalint_check) \
$(metalint_config) $(metalint_exclude) src/$(SUBDIR))

endif
Expand Down Expand Up @@ -436,7 +438,7 @@ endif
metalint: install-gometalinter install-linter-badtime install-linter-importorder
@echo "--- metalinting src/"
@(PATH=$(retool_bin_path):$(PATH) $(metalint_check) \
$(metalint_config) $(metalint_exclude) src/)
$(metalint_config) $(metalint_exclude) $(m3_package_path)/src/)

# Tests that all currently generated types match their contents if they were regenerated
.PHONY: test-all-gen
Expand All @@ -447,12 +449,12 @@ test-all-gen: all-gen
# Runs a fossa license report
.PHONY: fossa
fossa: install-tools
PATH=$(retool_bin_path):$(PATH) fossa --option allow-nested-vendor:true --option allow-deep-vendor:true
PATH=$(combined_bin_paths):$(PATH) fossa --option allow-nested-vendor:true --option allow-deep-vendor:true

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

.PHONY: clean
clean:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app:
image: golang:1.10.4-stretch
image: golang:1.12-stretch
volumes:
- .:/go/src/github.com/m3db/m3
- /usr/bin/buildkite-agent:/usr/bin/buildkite-agent
Expand Down
2 changes: 1 addition & 1 deletion docker/m3aggregator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# stage 1: build
FROM golang:1.10-alpine AS builder
FROM golang:1.12-alpine AS builder
LABEL maintainer="The M3DB Authors <[email protected]>"

# Install Glide
Expand Down
2 changes: 1 addition & 1 deletion docker/m3collector/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# stage 1: build
FROM golang:1.10-alpine AS builder
FROM golang:1.12-alpine AS builder
LABEL maintainer="The M3DB Authors <[email protected]>"

# Install Glide
Expand Down
2 changes: 1 addition & 1 deletion docker/m3coordinator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# stage 1: build
FROM golang:1.10-alpine AS builder
FROM golang:1.12-alpine AS builder
LABEL maintainer="The M3DB Authors <[email protected]>"

# Install Glide
Expand Down
4 changes: 2 additions & 2 deletions docker/m3dbnode/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: build
FROM golang:1.10-alpine AS builder
# stage 1: build
FROM golang:1.12-alpine AS builder
LABEL maintainer="The M3DB Authors <[email protected]>"

# Install Glide
Expand Down
2 changes: 1 addition & 1 deletion docker/m3nsch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# stage 1: build
FROM golang:1.10-alpine AS builder
FROM golang:1.12-alpine AS builder
LABEL maintainer="The M3DB Authors <[email protected]>"

# Install Glide
Expand Down
2 changes: 1 addition & 1 deletion docker/m3query/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# stage 1: build
FROM golang:1.10-alpine AS builder
FROM golang:1.12-alpine AS builder
LABEL maintainer="The M3DB Authors <[email protected]>"

# Install Glide
Expand Down
2 changes: 1 addition & 1 deletion scripts/thriftgen.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# built artifacts maintained externally at https://quay.io/repository/m3db/thrift-gen

# stage 1: build thrift-gen binary
FROM golang:1.10-alpine AS thriftgen
FROM golang:1.12-alpine AS thriftgen
LABEL maintainer="The M3DB Authors <[email protected]>"

# install git
Expand Down
6 changes: 4 additions & 2 deletions src/query/util/logging/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func TestPanicErrorResponder(t *testing.T) {
}
}

assert.Equal(t, 4, count)
assert.Equal(t, 3, count)

// `log_test` should appear in the output twice, once for the call in the
// deadbeef method, and once for the ServeHttp call.
Expand Down Expand Up @@ -187,7 +187,7 @@ func assertPanicLogsWritten(t *testing.T, stdout, stderr *os.File) {
}
}

assert.Equal(t, 5, count)
assert.Equal(t, 4, count)

// `log_test` should appear in the output twice, once for the call in the
// deadbeef method, and once for the ServeHttp call.
Expand All @@ -197,6 +197,8 @@ func assertPanicLogsWritten(t *testing.T, stdout, stderr *os.File) {
count++
}
}

assert.Equal(t, 2, count)
}

func TestPanicErrorResponderOnlyIfNotWrittenRequest(t *testing.T) {
Expand Down