From 1216b93d737873b222ae9efdcf6f33e3c428c8a6 Mon Sep 17 00:00:00 2001 From: "Jason E. Aten" Date: Tue, 20 Oct 2020 11:07:07 -0500 Subject: [PATCH 1/4] rbf is the default Tx type. Dogfood it. --- txfactory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/txfactory.go b/txfactory.go index 09f80e44a..da0b9497b 100644 --- a/txfactory.go +++ b/txfactory.go @@ -44,7 +44,7 @@ const ( // DefaultTxsrc is set here. pilosa/server/config.go references it // to set the default for pilosa server exeutable. // Can be overridden with env variable PILOSA_TXSRC for testing. -const DefaultTxsrc = RoaringTxn +const DefaultTxsrc = RBFTxn // DetectMemAccessPastTx true helps us catch places in api and executor // where mmapped memory is being accessed after the point in time From 996b2ccb2307780cb5b1d03555b36610a0ddd5e1 Mon Sep 17 00:00:00 2001 From: "Jason E. Aten" Date: Tue, 20 Oct 2020 11:58:12 -0500 Subject: [PATCH 2/4] go1.13.15 -> go1.15.3 as our supported versions --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d3699778f..18cc7b954 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -192,9 +192,9 @@ workflows: requires: - setup - test: - name: test-golang-1.13 + name: test-golang-1.15 resource_class: xlarge - golang_version: 1.13.15 + golang_version: 1.15.3 requires: - setup filters: @@ -216,7 +216,7 @@ workflows: # name: test-golang-<< matrix.golang_version >> # matrix: # parameters: - # golang_version: ["1.14.9", "1.13.15"] + # golang_version: ["1.14.9", "1.15.3"] - test: name: test-race test_make_target: test-race From 275779173d82e67f032701042147b4bc62c1d603 Mon Sep 17 00:00:00 2001 From: "Jason E. Aten" Date: Tue, 20 Oct 2020 12:23:35 -0500 Subject: [PATCH 3/4] go1.15.3 support with GODEBUG=x509ignoreCN=0 --- Dockerfile | 2 +- Makefile | 16 ++++++++-------- server/testdata/certs/README.md | 2 ++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index a0950ffed..33df2d063 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.13.0 as builder +FROM golang:1.15.3 as builder ARG BUILD_FLAGS ARG MAKE_FLAGS diff --git a/Makefile b/Makefile index b1b7d567c..6d9afe8d0 100644 --- a/Makefile +++ b/Makefile @@ -38,11 +38,11 @@ vendor: go.mod # Run test suite test: - go test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v + GODEBUG=x509ignoreCN=0 go test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v # Run test suite with race flag test-race: - go test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -race -timeout 60m -v + GODEBUG=x509ignoreCN=0 go test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -race -timeout 60m -v testv: topt testvsub @@ -57,7 +57,7 @@ testvsub: set -e; for i in boltdb ctl http pg pql rbf roaring server sql txkey; do \ echo; echo "___ testing subpkg $$i"; \ cd $$i; pwd; \ - go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -timeout 60m || break; \ + GODEBUG=x509ignoreCN=0 go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -timeout 60m || break; \ echo; echo "999 done testing subpkg $$i"; \ cd ..; \ done @@ -66,7 +66,7 @@ testvsub-race: set -e; for i in boltdb ctl http pg pql rbf roaring server sql txkey; do \ echo; echo "___ testing subpkg $$i -race"; \ cd $$i; pwd; \ - go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -race -timeout 60m || break; \ + GODEBUG=x509ignoreCN=0 go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v -race -timeout 60m || break; \ echo; echo "999 done testing subpkg $$i -race"; \ cd ..; \ done @@ -75,7 +75,7 @@ tour: ./tournament.sh bench: - go test ./... -bench=. -run=NoneZ -timeout=127m $(TESTFLAGS) + GODEBUG=x509ignoreCN=0 go test ./... -bench=. -run=NoneZ -timeout=127m $(TESTFLAGS) # Run test suite with coverage enabled cover: @@ -205,20 +205,20 @@ pilosa-fsck: # Run Pilosa tests inside Docker container docker-test: - docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) golang:$(GO_VERSION) go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) ./... + docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) golang:$(GO_VERSION) GODEBUG=x509ignoreCN=0 go test -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) ./... # Must use bash in order to -o pipefail; otherwise the tee will hide red tests. # run top tests, not subdirs. print summary red/green after. # The \-\-\- FAIL avoids counting the extra two FAIL strings at then bottom of log.topt. topt: mv log.topt.roar log.topt.roar.prev || true - $(eval SHELL:=/bin/bash) set -o pipefail; go test -v -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) 2>&1 | tee log.topt.roar + $(eval SHELL:=/bin/bash) set -o pipefail; GODEBUG=x509ignoreCN=0 go test -v -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) 2>&1 | tee log.topt.roar @echo " log.topt.roar green: \c"; cat log.topt.roar | grep PASS |wc -l @echo " log.topt.roar red: \c"; cat log.topt.roar | grep '\-\-\- FAIL' | wc -l topt-race: mv log.topt.race log.topt.race.prev || true - $(eval SHELL:=/bin/bash) set -o pipefail; go test -race -v -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) 2>&1 | tee log.topt.race + $(eval SHELL:=/bin/bash) set -o pipefail; GODEBUG=x509ignoreCN=0 go test -race -v -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) 2>&1 | tee log.topt.race @echo " log.topt.race green: \c"; cat log.topt.race | grep PASS |wc -l @echo " log.topt.race red: \c"; cat log.topt.race | grep '\-\-\- FAIL' | wc -l diff --git a/server/testdata/certs/README.md b/server/testdata/certs/README.md index 6e1a23d30..98f685f56 100644 --- a/server/testdata/certs/README.md +++ b/server/testdata/certs/README.md @@ -10,3 +10,5 @@ certstrap --depot-path certs sign "localhost" --CA pilosa-ca --expires "100 year dev-25ea708a (built with go 1.13) + +`GODEBUG=x509ignoreCN=0` is needed to run server tests since go 1.15 to avoid certificate errors. From 18ad4a8230f03a08a0c8bf1230c0856e627cc04c Mon Sep 17 00:00:00 2001 From: "Jason E. Aten" Date: Tue, 20 Oct 2020 13:37:13 -0500 Subject: [PATCH 4/4] rename test-golang-1.14 -> test-golang-1.14.9 --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 18cc7b954..8789fa1fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -201,7 +201,7 @@ workflows: tags: only: /^v.*/ - test: - name: test-golang-1.14 + name: test-golang-1.14.9 resource_class: xlarge golang_version: 1.14.9 requires: @@ -248,7 +248,7 @@ workflows: requires: - linter - check-license-headers - - test-golang-1.14 + - test-golang-1.14.9 - dockerhub-upload-unstable: context: molecula requires: