Skip to content

Commit

Permalink
Revert "[ci] build + release m3db with go1.12 (#1505)" (#1673)
Browse files Browse the repository at this point in the history
We need to cut a patch release within the 0.9.x series to fix a Docker
issue. I'd rather release a patch release with the fix rather than have
folks have to pull in a new runtime to get the docker fix.

This reverts commit c753f13.
  • Loading branch information
schallert authored May 29, 2019
1 parent b59ff4c commit 3c4fd5a
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 32 deletions.
4 changes: 2 additions & 2 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.12.x
GIMME_GO_VERSION: 1.10.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.12.x
GIMME_GO_VERSION: 1.10.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
+1 −3 metalint.sh
26 changes: 12 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ $(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 @@ -17,7 +16,6 @@ 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 @@ -269,45 +267,45 @@ ifeq ($(SUBDIR), kube)
all-gen-kube: 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=$(retool_bin_path):$(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=$(combined_bin_paths):$(PATH) PACKAGE=$(m3_package) $(auto_gen) src/$(SUBDIR)/$(mocks_output_dir) 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)

.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=$(retool_bin_path):$(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)
PATH=$(retool_bin_path):$(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=$(retool_bin_path):$(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-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)/"
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)/"

.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=$(retool_bin_path):$(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 @@ -365,7 +363,7 @@ test-ci-integration-$(SUBDIR):
.PHONY: metalint-$(SUBDIR)
metalint-$(SUBDIR): install-gometalinter install-linter-badtime install-linter-importorder
@echo "--- metalinting $(SUBDIR)"
@(PATH=$(combined_bin_paths):$(PATH) $(metalint_check) \
@(PATH=$(retool_bin_path):$(PATH) $(metalint_check) \
$(metalint_config) $(metalint_exclude) src/$(SUBDIR))

endif
Expand Down Expand Up @@ -438,7 +436,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) $(m3_package_path)/src/)
$(metalint_config) $(metalint_exclude) src/)

# Tests that all currently generated types match their contents if they were regenerated
.PHONY: test-all-gen
Expand All @@ -449,12 +447,12 @@ test-all-gen: all-gen
# Runs a fossa license report
.PHONY: fossa
fossa: install-tools
PATH=$(combined_bin_paths):$(PATH) fossa --option allow-nested-vendor:true --option allow-deep-vendor:true
PATH=$(retool_bin_path):$(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=$(combined_bin_paths):$(PATH) fossa test
PATH=$(retool_bin_path):$(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.12.1-stretch
image: golang:1.10.4-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.12-alpine AS builder
FROM golang:1.10-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.12-alpine AS builder
FROM golang:1.10-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.12-alpine AS builder
FROM golang:1.10-alpine AS builder
LABEL maintainer="The M3DB Authors <[email protected]>"

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

# Install Glide
Expand All @@ -26,8 +26,8 @@ COPY --from=builder /go/src/github.com/m3db/m3/bin/m3dbnode /bin/
COPY --from=builder /go/src/github.com/m3db/m3/src/dbnode/config/m3dbnode-local-etcd.yml /etc/m3dbnode/m3dbnode.yml
COPY --from=builder /go/src/github.com/m3db/m3/scripts/m3dbnode_bootstrapped.sh /bin/

# Use setcap to set +e "effective" and +p "permitted" to adjust the
# SYS_RESOURCE so the process can raise the hard file limit with
# Use setcap to set +e "effective" and +p "permitted" to adjust the
# SYS_RESOURCE so the process can raise the hard file limit with
# setrlimit
RUN apk add libcap && \
setcap cap_sys_resource=+ep /bin/m3dbnode
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.12-alpine AS builder
FROM golang:1.10-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.12-alpine AS builder
FROM golang:1.10-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.12-alpine AS thriftgen
FROM golang:1.10-alpine AS thriftgen
LABEL maintainer="The M3DB Authors <[email protected]>"

# install git
Expand Down
6 changes: 2 additions & 4 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, 3, 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 Down Expand Up @@ -187,7 +187,7 @@ func assertPanicLogsWritten(t *testing.T, stdout, stderr *os.File) {
}
}

assert.Equal(t, 4, count)
assert.Equal(t, 5, 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,8 +197,6 @@ func assertPanicLogsWritten(t *testing.T, stdout, stderr *os.File) {
count++
}
}

assert.Equal(t, 2, count)
}

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

0 comments on commit 3c4fd5a

Please sign in to comment.