From 17b3762ba00d28fb9958cc3deff5c9918d6e1d47 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:11:27 -0500 Subject: [PATCH 01/15] try to run test plan on ci --- .circleci/config.yml | 22 ++++++++++++++++++++++ testplans/graphsync/env-ci.toml | 1 + 2 files changed, 23 insertions(+) create mode 100644 testplans/graphsync/env-ci.toml diff --git a/.circleci/config.yml b/.circleci/config.yml index 3b31955f..3c637339 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,29 @@ workflows: - ci-go/test: race: true name: "ci-go/test/race" + - trigger-testplans #- ci-go/benchmark: # tolerance: 50 # requires: # - ci-go/test +trigger-testplans: + description: | + Trigger `graphsync` test cases on TaaS + parameters: + <<: *test-params + executor: << parameters.executor >> + steps: + - install-deps + - prepare + - run: + name: "download testground" + command: wget https://gist.github.com/nonsense/5fbf3167cac79945f658771aed32fc44/raw/2e17eb0debf7ec6bdf027c1bdafc2c92dd97273b/testground-d3e9603 -O ~/testground-cli && chmod +x ~/testground-cli + - run: + name: "prepare .env.toml" + command: pushd testplans/graphsync && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml + - run: + name: "prepare testground home dir" + command: mkdir -p $HOME/testground/plans && mv testplans/graphsync $HOME/testground/plans/ + - run: + name: "trigger graphsync testplan on taas" + command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/_compositions/stress.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=ipfs/go-graphsync --metadata-branch=$CIRCLE_BRANCH diff --git a/testplans/graphsync/env-ci.toml b/testplans/graphsync/env-ci.toml new file mode 100644 index 00000000..7d95e5e4 --- /dev/null +++ b/testplans/graphsync/env-ci.toml @@ -0,0 +1 @@ +[client] \ No newline at end of file From 5aa29650f55aa1934f47e86d587573c8f2d40324 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:14:40 -0500 Subject: [PATCH 02/15] remove broken parameters option --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c637339..23e83ffa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,8 +20,6 @@ workflows: trigger-testplans: description: | Trigger `graphsync` test cases on TaaS - parameters: - <<: *test-params executor: << parameters.executor >> steps: - install-deps From 6ecad80c543c6ce453bdf3299b67a075661d7f53 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:15:47 -0500 Subject: [PATCH 03/15] move workflow definition to bottom --- .circleci/config.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23e83ffa..048e50fd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,21 +2,6 @@ version: 2.1 orbs: ci-go: ipfs/ci-go@0.2.9 -workflows: - version: 2 - test: - jobs: - - ci-go/build - - ci-go/lint - - ci-go/test - - ci-go/test: - race: true - name: "ci-go/test/race" - - trigger-testplans - #- ci-go/benchmark: - # tolerance: 50 - # requires: - # - ci-go/test trigger-testplans: description: | Trigger `graphsync` test cases on TaaS @@ -36,3 +21,19 @@ trigger-testplans: - run: name: "trigger graphsync testplan on taas" command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/_compositions/stress.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=ipfs/go-graphsync --metadata-branch=$CIRCLE_BRANCH + +workflows: + version: 2 + test: + jobs: + - ci-go/build + - ci-go/lint + - ci-go/test + - ci-go/test: + race: true + name: "ci-go/test/race" + - trigger-testplans + #- ci-go/benchmark: + # tolerance: 50 + # requires: + # - ci-go/test From bae301d48d6e66b3cab61b88b2ecba446f36f975 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:17:35 -0500 Subject: [PATCH 04/15] put job definition in jobs group --- .circleci/config.yml | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 048e50fd..51dbcc17 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,25 +2,26 @@ version: 2.1 orbs: ci-go: ipfs/ci-go@0.2.9 -trigger-testplans: - description: | - Trigger `graphsync` test cases on TaaS - executor: << parameters.executor >> - steps: - - install-deps - - prepare - - run: - name: "download testground" - command: wget https://gist.github.com/nonsense/5fbf3167cac79945f658771aed32fc44/raw/2e17eb0debf7ec6bdf027c1bdafc2c92dd97273b/testground-d3e9603 -O ~/testground-cli && chmod +x ~/testground-cli - - run: - name: "prepare .env.toml" - command: pushd testplans/graphsync && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml - - run: - name: "prepare testground home dir" - command: mkdir -p $HOME/testground/plans && mv testplans/graphsync $HOME/testground/plans/ - - run: - name: "trigger graphsync testplan on taas" - command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/_compositions/stress.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=ipfs/go-graphsync --metadata-branch=$CIRCLE_BRANCH +jobs: + trigger-testplans: + description: | + Trigger `graphsync` test cases on TaaS + executor: << parameters.executor >> + steps: + - install-deps + - prepare + - run: + name: "download testground" + command: wget https://gist.github.com/nonsense/5fbf3167cac79945f658771aed32fc44/raw/2e17eb0debf7ec6bdf027c1bdafc2c92dd97273b/testground-d3e9603 -O ~/testground-cli && chmod +x ~/testground-cli + - run: + name: "prepare .env.toml" + command: pushd testplans/graphsync && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml + - run: + name: "prepare testground home dir" + command: mkdir -p $HOME/testground/plans && mv testplans/graphsync $HOME/testground/plans/ + - run: + name: "trigger graphsync testplan on taas" + command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/_compositions/stress.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=ipfs/go-graphsync --metadata-branch=$CIRCLE_BRANCH workflows: version: 2 From 65d108f836e4e7cfb2fdb8124c3b5189c338d167 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:23:20 -0500 Subject: [PATCH 05/15] remove undefined executor configuration --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 51dbcc17..a56716d2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: trigger-testplans: description: | Trigger `graphsync` test cases on TaaS - executor: << parameters.executor >> +# executor: << parameters.executor >> steps: - install-deps - prepare From c4e28491d46ff43eec20827b141c640814bd7755 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:25:58 -0500 Subject: [PATCH 06/15] use go-test tools and restore parameterization --- .circleci/config.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a56716d2..0c532ed0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,12 +1,23 @@ version: 2.1 orbs: - ci-go: ipfs/ci-go@0.2.9 + go: gotest/tools@0.0.13 + +executors: + golang: + docker: + - image: circleci/golang:1.15.5 + resource_class: 2xlarge + ubuntu: + docker: + - image: ubuntu:19.10 jobs: trigger-testplans: description: | Trigger `graphsync` test cases on TaaS -# executor: << parameters.executor >> + parameters: + <<: *test-params + executor: << parameters.executor >> steps: - install-deps - prepare From 7c0071c61623c16808d4b8b2a4dbef4e3318868a Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:31:17 -0500 Subject: [PATCH 07/15] define executor explicitly --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0c532ed0..735e4a76 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,9 +15,9 @@ jobs: trigger-testplans: description: | Trigger `graphsync` test cases on TaaS - parameters: - <<: *test-params - executor: << parameters.executor >> + executor: + type: executor + default: golang steps: - install-deps - prepare From 5be8207a882f3e15697749305a15ea7f6f0ee205 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:33:26 -0500 Subject: [PATCH 08/15] define executor through parameters --- .circleci/config.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 735e4a76..803f1270 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,9 +15,11 @@ jobs: trigger-testplans: description: | Trigger `graphsync` test cases on TaaS - executor: - type: executor - default: golang + parameters: &test-params + executor: + type: executor + default: golang + executor: << parameters.executor >> steps: - install-deps - prepare From 021abfbab78438e508dc217f8ad00f90484fb850 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:35:23 -0500 Subject: [PATCH 09/15] back to ci-go --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 803f1270..1e6bf3b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 orbs: - go: gotest/tools@0.0.13 + ci-go: ipfs/ci-go@0.2.9 executors: golang: From c5d75df4d13c6118c236a4a041b946d17b34e640 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:37:21 -0500 Subject: [PATCH 10/15] remove extraneous steps --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e6bf3b2..d509527a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,8 +21,6 @@ jobs: default: golang executor: << parameters.executor >> steps: - - install-deps - - prepare - run: name: "download testground" command: wget https://gist.github.com/nonsense/5fbf3167cac79945f658771aed32fc44/raw/2e17eb0debf7ec6bdf027c1bdafc2c92dd97273b/testground-d3e9603 -O ~/testground-cli && chmod +x ~/testground-cli From ea33308d85e1004807219f338dbbc2f0b5cd8eae Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:42:58 -0500 Subject: [PATCH 11/15] add prepare step --- .circleci/config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d509527a..0b2bb112 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,19 @@ executors: docker: - image: ubuntu:19.10 +commands: + prepare: + steps: + - checkout + - git_fetch_all_tags + - checkout + git_fetch_all_tags: + steps: + - run: + name: fetch all tags + command: | + git fetch --all + jobs: trigger-testplans: description: | @@ -21,6 +34,7 @@ jobs: default: golang executor: << parameters.executor >> steps: + - prepare - run: name: "download testground" command: wget https://gist.github.com/nonsense/5fbf3167cac79945f658771aed32fc44/raw/2e17eb0debf7ec6bdf027c1bdafc2c92dd97273b/testground-d3e9603 -O ~/testground-cli && chmod +x ~/testground-cli From f5c43439aa0a9406c977246a38c0ba1b3896f985 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:44:24 -0500 Subject: [PATCH 12/15] fix path to test definition --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b2bb112..a9a21220 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: command: mkdir -p $HOME/testground/plans && mv testplans/graphsync $HOME/testground/plans/ - run: name: "trigger graphsync testplan on taas" - command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/_compositions/stress.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=ipfs/go-graphsync --metadata-branch=$CIRCLE_BRANCH + command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/stress.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=ipfs/go-graphsync --metadata-branch=$CIRCLE_BRANCH workflows: version: 2 From aa8d99eb1823ccc0003588ae49808dafffa3960d Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:45:54 -0500 Subject: [PATCH 13/15] fix whitespace --- testplans/graphsync/env-ci.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testplans/graphsync/env-ci.toml b/testplans/graphsync/env-ci.toml index 7d95e5e4..bd651c46 100644 --- a/testplans/graphsync/env-ci.toml +++ b/testplans/graphsync/env-ci.toml @@ -1 +1 @@ -[client] \ No newline at end of file +[client] From bdbb497dce921f44eac9ecccd171381506695698 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 16:54:01 -0500 Subject: [PATCH 14/15] add k8s test and use it in ci --- .circleci/config.yml | 2 +- testplans/graphsync/stress-k8s.toml | 35 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 testplans/graphsync/stress-k8s.toml diff --git a/.circleci/config.yml b/.circleci/config.yml index a9a21220..862d2a59 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: command: mkdir -p $HOME/testground/plans && mv testplans/graphsync $HOME/testground/plans/ - run: name: "trigger graphsync testplan on taas" - command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/stress.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=ipfs/go-graphsync --metadata-branch=$CIRCLE_BRANCH + command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=ipfs/go-graphsync --metadata-branch=$CIRCLE_BRANCH workflows: version: 2 diff --git a/testplans/graphsync/stress-k8s.toml b/testplans/graphsync/stress-k8s.toml new file mode 100644 index 00000000..59fe89bf --- /dev/null +++ b/testplans/graphsync/stress-k8s.toml @@ -0,0 +1,35 @@ +[metadata] +name = "stress" + +[global] +plan = "graphsync" +case = "stress" +total_instances = 2 +builder = "docker:go" +runner = "cluster:k8s" + +[global.build_config] +push_registry=true +go_proxy_mode="remote" +go_proxy_url="http://localhost:8081" +registry_type="aws" + +[global.run.test_params] +size = "10MB" +latencies = '["50ms", "100ms", "200ms"]' +bandwidths = '["32MiB", "16MiB", "8MiB", "4MiB", "1MiB"]' +concurrency = "10" + +[[groups]] +id = "providers" +instances = { count = 1 } +[groups.resources] +memory = "4096Mi" +cpu = "1000m" + +[[groups]] +id = "requestors" +instances = { count = 1 } +[groups.resources] +memory = "4096Mi" +cpu = "1000m" \ No newline at end of file From 4291e139779d5d3c47e68503db0a173c5024eca5 Mon Sep 17 00:00:00 2001 From: acruikshank Date: Thu, 17 Dec 2020 17:31:33 -0500 Subject: [PATCH 15/15] trigger testplan only on merge to master --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 862d2a59..645cb5d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,7 +58,11 @@ workflows: - ci-go/test: race: true name: "ci-go/test/race" - - trigger-testplans + - trigger-testplans: + filters: + branches: + only: + - master #- ci-go/benchmark: # tolerance: 50 # requires: