From 339fb46ef5efbe4912d2c67965b0e9f76a7ccd11 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 14 May 2021 14:45:04 -0700 Subject: [PATCH 01/18] update Go to 1.16.4 on CircleCI --- .circleci/config.yml | 4 ++-- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f9fe22c40..08d280816 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ default_environment: &default_environment executors: golang: docker: - - image: circleci/golang:1.15.2 + - image: cimg/go:1.16.4 working_directory: ~/ipfs/go-ipfs environment: <<: *default_environment @@ -60,7 +60,7 @@ executors: E2E_IPFSD_TYPE: go dockerizer: docker: - - image: circleci/golang:1.15.2 + - image: cimg/go:1.16.4 environment: IMAGE_NAME: ipfs/go-ipfs WIP_IMAGE_TAG: wip diff --git a/Dockerfile b/Dockerfile index 113c6599d..9d70b0f63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Note: when updating the go minor version here, also update the go-channel in snap/snapcraft.yml -FROM golang:1.15.2-buster +FROM golang:1.16.3-buster LABEL maintainer="Steven Allen " # Install deps From bf4cf14bd93efaed4066c757c252e3acf688d835 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 14 May 2021 15:02:19 -0700 Subject: [PATCH 02/18] install specific Go version for sharness tests --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 08d280816..82683739a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -130,6 +130,11 @@ jobs: TEST_VERBOSE: 1 steps: - run: sudo apt update + - run: | + mkdir ~/localgo && cd ~/localgo + wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz + tar xfz go1.16.4.linux-amd64.tar.gz + echo "export PATH=$(pwd)/go/bin:$PATH" >> $BASH_ENV - run: sudo apt install socat net-tools - checkout From a9dfe38c4b094af254ff4aa453d2445ccf3ebb64 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 14 May 2021 17:33:42 -0700 Subject: [PATCH 03/18] stop using deprecated Go flag -i --- docs/plugins.md | 2 +- plugin/plugins/Rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins.md b/docs/plugins.md index 124f8f8b2..9bd504145 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -140,7 +140,7 @@ To build out-of-tree plugins, use the plugin's Makefile if provided. Otherwise, you can manually build the plugin by running: ```bash -myplugin$ go build -buildmode=plugin -i -o myplugin.so myplugin.go +myplugin$ go build -buildmode=plugin -o myplugin.so myplugin.go ``` Finally, as with in-tree plugins: diff --git a/plugin/plugins/Rules.mk b/plugin/plugins/Rules.mk index 80924bad2..12c7cf0b3 100644 --- a/plugin/plugins/Rules.mk +++ b/plugin/plugins/Rules.mk @@ -12,7 +12,7 @@ $($(d)_plugins_main): $($(d)_plugins_so): %.so : %/main/main.go $($(d)_plugins_so): $$(DEPS_GO) ALWAYS - $(GOCC) build -buildmode=plugin -i -pkgdir "$(GOPATH)/pkg/linux_amd64_dynlink" $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$(basename $@))/main" + $(GOCC) build -buildmode=plugin -pkgdir "$(GOPATH)/pkg/linux_amd64_dynlink" $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$(basename $@))/main" chmod +x "$@" CLEAN += $($(d)_plugins_so) From 7f2630bec264250177cb4343ca1aceb8ae7b7a01 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 14 May 2021 18:13:38 -0700 Subject: [PATCH 04/18] debug --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 82683739a..0d2d30986 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -135,6 +135,7 @@ jobs: wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz tar xfz go1.16.4.linux-amd64.tar.gz echo "export PATH=$(pwd)/go/bin:$PATH" >> $BASH_ENV + - run: go version - run: sudo apt install socat net-tools - checkout @@ -160,7 +161,9 @@ jobs: - run: echo DOCKER_HOST=$DOCKER_HOST && make -O -j 3 coverage/sharness_tests.coverprofile test/sharness/test-results/sharness.xml TEST_GENERATE_JUNIT=1 CONTINUE_ON_S_FAILURE=1 DOCKER_HOST=$DOCKER_HOST - + - run: + when: always + command: which ipfs || true - run: when: always command: bash <(curl -s https://codecov.io/bash) -cF sharness -X search -f coverage/sharness_tests.coverprofile From 9d6cbdf52137d57f9190db8a24c7596afa8d630e Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Fri, 30 Jul 2021 15:28:26 -0400 Subject: [PATCH 05/18] Use Go 1.16.6 --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0d2d30986..8384e04d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ default_environment: &default_environment executors: golang: docker: - - image: cimg/go:1.16.4 + - image: cimg/go:1.16.6 working_directory: ~/ipfs/go-ipfs environment: <<: *default_environment @@ -60,7 +60,7 @@ executors: E2E_IPFSD_TYPE: go dockerizer: docker: - - image: cimg/go:1.16.4 + - image: cimg/go:1.16.6 environment: IMAGE_NAME: ipfs/go-ipfs WIP_IMAGE_TAG: wip @@ -132,7 +132,7 @@ jobs: - run: sudo apt update - run: | mkdir ~/localgo && cd ~/localgo - wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz + wget https://golang.org/dl/go1.16.6.linux-amd64.tar.gz tar xfz go1.16.4.linux-amd64.tar.gz echo "export PATH=$(pwd)/go/bin:$PATH" >> $BASH_ENV - run: go version From b5f54198227c08dd988968296643269241913d22 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Fri, 30 Jul 2021 15:32:17 -0400 Subject: [PATCH 06/18] Fix tar cmd --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8384e04d7..d255670f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -133,7 +133,7 @@ jobs: - run: | mkdir ~/localgo && cd ~/localgo wget https://golang.org/dl/go1.16.6.linux-amd64.tar.gz - tar xfz go1.16.4.linux-amd64.tar.gz + tar xfz go1.16.6.linux-amd64.tar.gz echo "export PATH=$(pwd)/go/bin:$PATH" >> $BASH_ENV - run: go version - run: sudo apt install socat net-tools From f0ae6e34170beb724db62a50c791ee13aca08db4 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Mon, 2 Aug 2021 13:50:10 -0400 Subject: [PATCH 07/18] Disable MAKE_SKIP_PATH --- test/sharness/Rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sharness/Rules.mk b/test/sharness/Rules.mk index 49e41824c..dd59f8f6a 100644 --- a/test/sharness/Rules.mk +++ b/test/sharness/Rules.mk @@ -26,7 +26,7 @@ DEPS_$(d) += $(PLUGINS_$(d)) endif endif -export MAKE_SKIP_PATH=1 +#export MAKE_SKIP_PATH=1 $(T_$(d)): $$(DEPS_$(d)) # use second expansion so coverage can inject dependency @echo "*** $@ ***" From 98d2739f45f9ed6f2d4a3f12d63ef0aee5e814ba Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Mon, 2 Aug 2021 14:29:21 -0400 Subject: [PATCH 08/18] Remove MAKE_SKIP_PATH test --- test/sharness/lib/test-lib.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/test/sharness/lib/test-lib.sh b/test/sharness/lib/test-lib.sh index e67f56d4b..145420fa6 100644 --- a/test/sharness/lib/test-lib.sh +++ b/test/sharness/lib/test-lib.sh @@ -9,17 +9,15 @@ # use the ipfs tool to test against # add current directory to path, for ipfs tool. -if test "$MAKE_SKIP_PATH" != "1"; then - BIN=$(cd .. && echo `pwd`/bin) - BIN2=$(cd ../.. && echo `pwd`/cmd/ipfs) - PATH=${BIN2}:${BIN}:${PATH} +BIN=$(cd .. && pwd)/bin +BIN2=$(cd ../.. && pwd)/cmd/ipfs +PATH=${BIN2}:${BIN}:${PATH} - # assert the `ipfs` we're using is the right one. - if test `which ipfs` != ${BIN2}/ipfs; then - echo >&2 "Cannot find the tests' local ipfs tool." - echo >&2 "Please check test and ipfs tool installation." - exit 1 - fi +# assert the `ipfs` we're using is the right one. +if test "$(which ipfs)" != "${BIN2}/ipfs"; then + echo >&2 "Cannot find the tests' local ipfs tool." + echo >&2 "Please check test and ipfs tool installation." + exit 1 fi # set sharness verbosity. we set the env var directly as From d3468407aaddbed885abe878f80072186c33a449 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Tue, 3 Aug 2021 14:23:58 -0400 Subject: [PATCH 09/18] Remove MAKE_SKIP_PATH, update Dockerfile base image --- Dockerfile | 2 +- test/sharness/Rules.mk | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d70b0f63..6d3ef4d5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Note: when updating the go minor version here, also update the go-channel in snap/snapcraft.yml -FROM golang:1.16.3-buster +FROM golang:1.16.6-buster LABEL maintainer="Steven Allen " # Install deps diff --git a/test/sharness/Rules.mk b/test/sharness/Rules.mk index dd59f8f6a..6c9e6e633 100644 --- a/test/sharness/Rules.mk +++ b/test/sharness/Rules.mk @@ -26,8 +26,6 @@ DEPS_$(d) += $(PLUGINS_$(d)) endif endif -#export MAKE_SKIP_PATH=1 - $(T_$(d)): $$(DEPS_$(d)) # use second expansion so coverage can inject dependency @echo "*** $@ ***" ifeq ($(CONTINUE_ON_S_FAILURE),1) From 5c0061e24079a046c515461d7247deaa8e543a02 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Thu, 12 Aug 2021 11:18:16 -0400 Subject: [PATCH 10/18] Fix space constant --- mk/util.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mk/util.mk b/mk/util.mk index e761aeb21..2ce48583f 100644 --- a/mk/util.mk +++ b/mk/util.mk @@ -30,8 +30,7 @@ SUPPORTED_PLATFORMS += openbsd-amd64 SUPPORTED_PLATFORMS += netbsd-386 SUPPORTED_PLATFORMS += netbsd-amd64 -space:= -space+= +space:=$() $() comma:=, join-with=$(subst $(space),$1,$(strip $2)) From c1339c83219af671fbfd3e2b5a206531cd75760a Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Fri, 13 Aug 2021 15:28:55 -0400 Subject: [PATCH 11/18] save PATH to .bashrc instead of $BASH_ENV --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 72f4671db..0a5c6b3f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -130,7 +130,7 @@ jobs: mkdir ~/localgo && cd ~/localgo wget https://golang.org/dl/go1.16.6.linux-amd64.tar.gz tar xfz go1.16.6.linux-amd64.tar.gz - echo "export PATH=$(pwd)/go/bin:$PATH" >> $BASH_ENV + echo "export PATH=$(pwd)/go/bin:\$PATH" >> ~/.bashrc - run: go version - run: sudo apt install socat net-tools - checkout From 4ebec49985eed35263662b23f5e4fa1eb46b1672 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Fri, 13 Aug 2021 15:37:39 -0400 Subject: [PATCH 12/18] use 2xlarge resource class --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a5c6b3f4..c4f8b628b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -118,6 +118,7 @@ jobs: sharness: machine: image: ubuntu-2004:202010-01 + resource_class: 2xlarge working_directory: ~/ipfs/go-ipfs environment: <<: *default_environment From 3a7eaaf7eb2d0610711ccb3f6825272f7b706d66 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Fri, 13 Aug 2021 16:33:31 -0400 Subject: [PATCH 13/18] Revert "Remove MAKE_SKIP_PATH, update Dockerfile base image" This reverts commit d3468407aaddbed885abe878f80072186c33a449. --- Dockerfile | 2 +- test/sharness/Rules.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6d3ef4d5a..9d70b0f63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Note: when updating the go minor version here, also update the go-channel in snap/snapcraft.yml -FROM golang:1.16.6-buster +FROM golang:1.16.3-buster LABEL maintainer="Steven Allen " # Install deps diff --git a/test/sharness/Rules.mk b/test/sharness/Rules.mk index 6c9e6e633..dd59f8f6a 100644 --- a/test/sharness/Rules.mk +++ b/test/sharness/Rules.mk @@ -26,6 +26,8 @@ DEPS_$(d) += $(PLUGINS_$(d)) endif endif +#export MAKE_SKIP_PATH=1 + $(T_$(d)): $$(DEPS_$(d)) # use second expansion so coverage can inject dependency @echo "*** $@ ***" ifeq ($(CONTINUE_ON_S_FAILURE),1) From c40f8d1c805318ccd6c21b4fcf918cd15f8bf4dc Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Fri, 13 Aug 2021 16:33:55 -0400 Subject: [PATCH 14/18] Update Docker Go version to 1.16.6 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9d70b0f63..6d3ef4d5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Note: when updating the go minor version here, also update the go-channel in snap/snapcraft.yml -FROM golang:1.16.3-buster +FROM golang:1.16.6-buster LABEL maintainer="Steven Allen " # Install deps From e162f1afb35ab50f24bf3a312e7f025c92454e7c Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Fri, 13 Aug 2021 16:37:09 -0400 Subject: [PATCH 15/18] Revert "Remove MAKE_SKIP_PATH test" This reverts commit 98d2739f45f9ed6f2d4a3f12d63ef0aee5e814ba. --- test/sharness/lib/test-lib.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/sharness/lib/test-lib.sh b/test/sharness/lib/test-lib.sh index 305d3ea55..f4b3c68db 100644 --- a/test/sharness/lib/test-lib.sh +++ b/test/sharness/lib/test-lib.sh @@ -9,15 +9,17 @@ # use the ipfs tool to test against # add current directory to path, for ipfs tool. -BIN=$(cd .. && pwd)/bin -BIN2=$(cd ../.. && pwd)/cmd/ipfs -PATH=${BIN2}:${BIN}:${PATH} +if test "$MAKE_SKIP_PATH" != "1"; then + BIN=$(cd .. && echo `pwd`/bin) + BIN2=$(cd ../.. && echo `pwd`/cmd/ipfs) + PATH=${BIN2}:${BIN}:${PATH} -# assert the `ipfs` we're using is the right one. -if test "$(which ipfs)" != "${BIN2}/ipfs"; then - echo >&2 "Cannot find the tests' local ipfs tool." - echo >&2 "Please check test and ipfs tool installation." - exit 1 + # assert the `ipfs` we're using is the right one. + if test `which ipfs` != ${BIN2}/ipfs; then + echo >&2 "Cannot find the tests' local ipfs tool." + echo >&2 "Please check test and ipfs tool installation." + exit 1 + fi fi # set sharness verbosity. we set the env var directly as From b3f1d65af4d8c21eef7573b01b8ecaad84776030 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Fri, 13 Aug 2021 16:38:24 -0400 Subject: [PATCH 16/18] Revert "Disable MAKE_SKIP_PATH" This reverts commit f0ae6e34170beb724db62a50c791ee13aca08db4. --- test/sharness/Rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sharness/Rules.mk b/test/sharness/Rules.mk index dd59f8f6a..49e41824c 100644 --- a/test/sharness/Rules.mk +++ b/test/sharness/Rules.mk @@ -26,7 +26,7 @@ DEPS_$(d) += $(PLUGINS_$(d)) endif endif -#export MAKE_SKIP_PATH=1 +export MAKE_SKIP_PATH=1 $(T_$(d)): $$(DEPS_$(d)) # use second expansion so coverage can inject dependency @echo "*** $@ ***" From ef1703c07f2a548d64dac48e793e0030ca20c307 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Fri, 13 Aug 2021 21:27:41 -0400 Subject: [PATCH 17/18] Increase Make job parallelism to 10 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c4f8b628b..d2e3ba670 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -157,7 +157,7 @@ jobs: command: echo "export TEST_DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')" >> $BASH_ENV - run: echo TEST_DOCKER_HOST=$TEST_DOCKER_HOST && - make -O -j 3 coverage/sharness_tests.coverprofile test/sharness/test-results/sharness.xml TEST_GENERATE_JUNIT=1 CONTINUE_ON_S_FAILURE=1 TEST_DOCKER_HOST=$TEST_DOCKER_HOST + make -O -j 10 coverage/sharness_tests.coverprofile test/sharness/test-results/sharness.xml TEST_GENERATE_JUNIT=1 CONTINUE_ON_S_FAILURE=1 TEST_DOCKER_HOST=$TEST_DOCKER_HOST - run: when: always command: bash <(curl -s https://codecov.io/bash) -cF sharness -X search -f coverage/sharness_tests.coverprofile From 70b3882e5a9a2d7ec120c60b666f16679b264ca3 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Tue, 17 Aug 2021 12:20:50 -0400 Subject: [PATCH 18/18] Use Go 1.16.7 --- .circleci/config.yml | 4 ++-- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 73547225a..67530944a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ default_environment: &default_environment executors: golang: docker: - - image: cimg/go:1.16.6 + - image: cimg/go:1.16.7 working_directory: ~/ipfs/go-ipfs environment: <<: *default_environment @@ -58,7 +58,7 @@ executors: E2E_IPFSD_TYPE: go dockerizer: docker: - - image: cimg/go:1.16.6 + - image: cimg/go:1.16.7 environment: IMAGE_NAME: ipfs/go-ipfs WIP_IMAGE_TAG: wip diff --git a/Dockerfile b/Dockerfile index 6d3ef4d5a..9322e891b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Note: when updating the go minor version here, also update the go-channel in snap/snapcraft.yml -FROM golang:1.16.6-buster +FROM golang:1.16.7-buster LABEL maintainer="Steven Allen " # Install deps