Skip to content

Commit

Permalink
Merge pull request #4995 from filecoin-project/lock-lotus-version-in-…
Browse files Browse the repository at this point in the history
…testplan

rename oni/lotus-soup imports to testplans/lotus-soup and go get lotus@master on trigger
  • Loading branch information
magik6k authored Feb 8, 2021
2 parents af45b29 + 6c045b4 commit 0afe732
Show file tree
Hide file tree
Showing 17 changed files with 321 additions and 88 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,11 @@ jobs:
name: "prepare .env.toml"
command: pushd testplans/lotus-soup && 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/lotus-soup testplans/graphsync $HOME/testground/plans/
name: "prepare testground home dir and link test plans"
command: mkdir -p $HOME/testground/plans && ln -s $(pwd)/testplans/lotus-soup $HOME/testground/plans/lotus-soup && ln -s $(pwd)/testplans/graphsync $HOME/testground/plans/graphsync
- run:
name: "go get lotus@master"
command: cd testplans/lotus-soup && go get github.com/filecoin-project/lotus@master
- run:
name: "trigger deals baseline testplan on taas"
command: ~/testground-cli run composition -f $HOME/testground/plans/lotus-soup/_compositions/baseline-k8s-3-1.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
Expand Down
15 changes: 9 additions & 6 deletions testplans/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ download-proofs:
go run github.com/filecoin-project/go-paramfetch/paramfetch 2048 ./docker-images/proof-parameters.json

build-images:
docker build -t "iptestground/oni-buildbase:v11-lotus" -f "docker-images/Dockerfile.oni-buildbase" "docker-images"
docker build -t "iptestground/oni-runtime:v5" -f "docker-images/Dockerfile.oni-runtime" "docker-images"
docker build -t "iptestground/oni-buildbase:v13-lotus" -f "docker-images/Dockerfile.oni-buildbase" "docker-images"
docker build -t "iptestground/oni-runtime:v7" -f "docker-images/Dockerfile.oni-runtime" "docker-images"
docker build -t "iptestground/oni-runtime:v8-debug" -f "docker-images/Dockerfile.oni-runtime-debug" "docker-images"

push-images:
docker push iptestground/oni-buildbase:v11-lotus
docker push iptestground/oni-runtime:v5
docker push iptestground/oni-buildbase:v13-lotus
docker push iptestground/oni-runtime:v7
docker push iptestground/oni-runtime:v8-debug

pull-images:
docker pull iptestground/oni-buildbase:v11-lotus
docker pull iptestground/oni-runtime:v5
docker pull iptestground/oni-buildbase:v13-lotus
docker pull iptestground/oni-runtime:v7
docker pull iptestground/oni-runtime:v8-debug

.PHONY: download-proofs build-images push-images pull-images
12 changes: 2 additions & 10 deletions testplans/docker-images/Dockerfile.oni-buildbase
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
ARG GO_VERSION=1.14.2
ARG GO_VERSION=1.15.6

FROM golang:${GO_VERSION}-buster

RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq gcc git pkg-config bzr libhwloc-dev

ARG FILECOIN_FFI_COMMIT=1985275547f222e8c97a8ab70b5cc26bc1fa50b1
ARG FILECOIN_FFI_COMMIT=62f89f108a6a8fe9ad6ed52fb7ffbf8594d7ae5c
ARG FFI_DIR=/extern/filecoin-ffi

ARG BLST_COMMIT=1cbb16ed9580dcd3e9593b71221fcf2a048faaef
ARG BLST_DIR=/extern/blst

RUN mkdir -p ${FFI_DIR} \
&& git clone https://github.com/filecoin-project/filecoin-ffi.git ${FFI_DIR} \
&& cd ${FFI_DIR} \
&& git checkout ${FILECOIN_FFI_COMMIT} \
&& make

RUN mkdir -p ${BLST_DIR} \
&& git clone https://github.com/supranational/blst.git ${BLST_DIR} \
&& cd ${BLST_DIR} \
&& git checkout ${BLST_COMMIT}

RUN ldconfig
4 changes: 2 additions & 2 deletions testplans/docker-images/Dockerfile.oni-runtime
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.14.2
ARG GO_VERSION=1.15.6

FROM golang:${GO_VERSION}-buster as downloader

Expand All @@ -10,7 +10,7 @@ FROM golang:${GO_VERSION}-buster as downloader

RUN go get github.com/filecoin-project/go-paramfetch/paramfetch
COPY /proof-parameters.json /
RUN paramfetch 2048 /proof-parameters.json
RUN paramfetch 8388608 /proof-parameters.json

FROM ubuntu:18.04

Expand Down
14 changes: 7 additions & 7 deletions testplans/docker-images/Dockerfile.oni-runtime-debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.14.2
ARG GO_VERSION=1.15.6

FROM golang:${GO_VERSION}-buster as downloader

Expand All @@ -10,21 +10,21 @@ FROM golang:${GO_VERSION}-buster as downloader

RUN go get github.com/filecoin-project/go-paramfetch/paramfetch
COPY /proof-parameters.json /
RUN paramfetch 2048 /proof-parameters.json
RUN paramfetch 8388608 /proof-parameters.json

ARG LOTUS_COMMIT=1a170e18a
ARG LOTUS_COMMIT=b4ad2e5e93dc710d985eb9cf3ee04142efb47bf0

## for debug purposes
RUN apt update && apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl && git clone https://github.com/filecoin-project/lotus.git && cd lotus/ && git checkout ${LOTUS_COMMIT} && make clean && make all && make install
RUN apt update && apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config libhwloc-dev curl && git clone https://github.com/filecoin-project/lotus.git && cd lotus/ && git checkout ${LOTUS_COMMIT} && make clean && make all && make install

FROM ubuntu:18.04

RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq gcc pkg-config net-tools netcat traceroute iputils-ping wget vim curl telnet iproute2 dnsutils
RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq gcc pkg-config libhwloc-dev net-tools netcat traceroute iputils-ping wget vim curl telnet iproute2 dnsutils
COPY --from=downloader /var/tmp/filecoin-proof-parameters /var/tmp/filecoin-proof-parameters

## for debug purposes
COPY --from=downloader /usr/local/bin/lotus /usr/local/bin/lll
COPY --from=downloader /usr/local/bin/lotus-miner /usr/local/bin/lm

ENV FULLNODE_API_INFO="dummytoken:/ip4/127.0.0.1/tcp/1234/http"
ENV MINER_API_INFO="dummytoken:/ip4/127.0.0.1/tcp/2345/http"
ENV FULLNODE_API_INFO="/ip4/127.0.0.1/tcp/1234/http"
ENV MINER_API_INFO="/ip4/127.0.0.1/tcp/2345/http"
55 changes: 55 additions & 0 deletions testplans/lotus-soup/_compositions/baseline-docker-1-1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[metadata]
name = "lotus-soup"
author = ""

[global]
plan = "lotus-soup"
case = "deals-e2e"
total_instances = 3
builder = "docker:go"
runner = "local:docker"

[global.build]
selectors = ["testground"]

[global.run_config]
exposed_ports = { pprof = "6060", node_rpc = "1234", miner_rpc = "2345" }

[global.build_config]
enable_go_build_cache = true

[global.run.test_params]
clients = "1"
miners = "1"
genesis_timestamp_offset = "0"
balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B
sectors = "10"
random_beacon_type = "mock"
mining_mode = "natural"

[[groups]]
id = "bootstrapper"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "bootstrapper"

[[groups]]
id = "miners"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "miner"

[[groups]]
id = "clients"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "client"
67 changes: 67 additions & 0 deletions testplans/lotus-soup/_compositions/baseline-k8s-1-1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[metadata]
name = "lotus-soup"
author = ""

[global]
plan = "lotus-soup"
case = "deals-e2e"
total_instances = 3
builder = "docker:go"
runner = "cluster:k8s"

[global.build]
selectors = ["testground"]

[global.run_config]
exposed_ports = { pprof = "6060", node_rpc = "1234", miner_rpc = "2345" }

[global.build_config]
push_registry=true
go_proxy_mode="remote"
go_proxy_url="http://localhost:8081"
registry_type="aws"

[global.run.test_params]
clients = "1"
miners = "1"
genesis_timestamp_offset = "0"
balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B
sectors = "10"
random_beacon_type = "mock"
mining_mode = "natural"

[[groups]]
id = "bootstrapper"
[groups.resources]
memory = "512Mi"
cpu = "1000m"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "bootstrapper"

[[groups]]
id = "miners"
[groups.resources]
memory = "4096Mi"
cpu = "1000m"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "miner"

[[groups]]
id = "clients"
[groups.resources]
memory = "1024Mi"
cpu = "1000m"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "client"
67 changes: 67 additions & 0 deletions testplans/lotus-soup/_compositions/baseline-k8s-2-1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[metadata]
name = "lotus-soup"
author = ""

[global]
plan = "lotus-soup"
case = "deals-e2e"
total_instances = 4
builder = "docker:go"
runner = "cluster:k8s"

[global.build]
selectors = ["testground"]

[global.run_config]
exposed_ports = { pprof = "6060", node_rpc = "1234", miner_rpc = "2345" }

[global.build_config]
push_registry=true
go_proxy_mode="remote"
go_proxy_url="http://localhost:8081"
registry_type="aws"

[global.run.test_params]
clients = "2"
miners = "1"
genesis_timestamp_offset = "0"
balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B
sectors = "10"
random_beacon_type = "mock"
mining_mode = "natural"

[[groups]]
id = "bootstrapper"
[groups.resources]
memory = "512Mi"
cpu = "1000m"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "bootstrapper"

[[groups]]
id = "miners"
[groups.resources]
memory = "4096Mi"
cpu = "1000m"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "miner"

[[groups]]
id = "clients"
[groups.resources]
memory = "1024Mi"
cpu = "1000m"
[groups.instances]
count = 2
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "client"
2 changes: 1 addition & 1 deletion testplans/lotus-soup/_compositions/baseline-k8s-3-2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
miners = "2"
genesis_timestamp_offset = "0"
balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B
sectors = "10"
sectors = "4"
random_beacon_type = "mock"
mining_mode = "natural"

Expand Down
67 changes: 67 additions & 0 deletions testplans/lotus-soup/_compositions/baseline-k8s-3-3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[metadata]
name = "lotus-soup"
author = ""

[global]
plan = "lotus-soup"
case = "deals-e2e"
total_instances = 7
builder = "docker:go"
runner = "cluster:k8s"

[global.build]
selectors = ["testground"]

[global.run_config]
exposed_ports = { pprof = "6060", node_rpc = "1234", miner_rpc = "2345" }

[global.build_config]
push_registry=true
go_proxy_mode="remote"
go_proxy_url="http://localhost:8081"
registry_type="aws"

[global.run.test_params]
clients = "3"
miners = "3"
genesis_timestamp_offset = "0"
balance = "20000000" # These balances will work for maximum 100 nodes, as TotalFilecoin is 2B
sectors = "10"
random_beacon_type = "mock"
mining_mode = "natural"

[[groups]]
id = "bootstrapper"
[groups.resources]
memory = "512Mi"
cpu = "1000m"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "bootstrapper"

[[groups]]
id = "miners"
[groups.resources]
memory = "4096Mi"
cpu = "1000m"
[groups.instances]
count = 3
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "miner"

[[groups]]
id = "clients"
[groups.resources]
memory = "1024Mi"
cpu = "1000m"
[groups.instances]
count = 3
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "client"
7 changes: 5 additions & 2 deletions testplans/lotus-soup/deals_e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,13 @@ func dealsE2E(t *testkit.TestEnvironment) error {
}
}

time.Sleep(12 * time.Second)
// give some time to the miner, otherwise, we get errors like:
// deal errored deal failed: (State=26) error calling node: publishing deal: GasEstimateMessageGas
// error: estimating gas used: message execution failed: exit 19, reason: failed to lock balance: failed to lock client funds: not enough balance to lock for addr t0102: escrow balance 0 < locked 0 + required 640297000 (RetCode=19)
time.Sleep(50 * time.Second)

// generate 1600 bytes of random data
data := make([]byte, 1600)
data := make([]byte, 5000000)
rand.New(rand.NewSource(time.Now().UnixNano())).Read(data)

file, err := ioutil.TempFile("/tmp", "data")
Expand Down
Loading

0 comments on commit 0afe732

Please sign in to comment.