From eec5f46257bddcb1779deec36a363d760b295380 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 18:28:44 +0200 Subject: [PATCH 01/61] add long sims --- .github/workflows/release-sims.yml | 48 ++++++++++++++++++++++++++++++ .github/workflows/sims.yml | 4 --- README.md | 1 + 3 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release-sims.yml diff --git a/.github/workflows/release-sims.yml b/.github/workflows/release-sims.yml new file mode 100644 index 00000000000..c78f47efeee --- /dev/null +++ b/.github/workflows/release-sims.yml @@ -0,0 +1,48 @@ +name: Sims +on: + push: + branches: + - /^v.*/ + pull_request: # only for testing + +jobs: + cleanup-runs: + runs-on: ubuntu-latest + steps: + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + + build: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'skip-sims')" + steps: + - uses: actions/checkout@v2 + - run: | + make build + + install-runsim: + runs-on: ubuntu-latest + needs: build + steps: + - name: install runsim + run: | + export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + + test-sim-nondeterminism: + runs-on: ubuntu-latest + needs: [build, install-runsim] + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + - name: test-sim-nondeterminism + run: | + make test-sim-nondeterminism diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 1bcaca14a45..bd7c4411e3c 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -34,7 +34,6 @@ jobs: runs-on: ubuntu-latest needs: [build, install-runsim] steps: - - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 - uses: actions/cache@v1 with: @@ -48,7 +47,6 @@ jobs: runs-on: ubuntu-latest needs: [build, install-runsim] steps: - - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 - uses: actions/cache@v1 with: @@ -62,7 +60,6 @@ jobs: runs-on: ubuntu-latest needs: [build, install-runsim] steps: - - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 - uses: actions/cache@v1 with: @@ -76,7 +73,6 @@ jobs: runs-on: ubuntu-latest needs: [build, install-runsim] steps: - - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 - uses: actions/cache@v1 with: diff --git a/README.md b/README.md index 7b9eaacf183..734548e693e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ parent: [![license](https://img.shields.io/github/license/cosmos/cosmos-sdk.svg)](https://github.com/cosmos/cosmos-sdk/blob/master/LICENSE) [![LoC](https://tokei.rs/b1/github/cosmos/cosmos-sdk)](https://github.com/cosmos/cosmos-sdk) [![API Reference](https://godoc.org/github.com/cosmos/cosmos-sdk?status.svg)](https://godoc.org/github.com/cosmos/cosmos-sdk) +[![Discord chat](https://img.shields.io/discord/669268347736686612.svg)](https://discord.gg/AzefAFd) The Cosmos-SDK is a framework for building blockchain applications in Golang. It is being used to build [`Gaia`](https://github.com/cosmos/gaia), the first implementation of the Cosmos Hub. From a3941246b2cce5572534c2aaf9ace69772ca92de Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 18:40:37 +0200 Subject: [PATCH 02/61] test git diff --- .github/workflows/sims.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index bd7c4411e3c..87acec06623 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -1,6 +1,16 @@ name: Sims on: [pull_request] jobs: + diff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: technote-space/get-diff-action@v1 + id: git_diff + with: + SUFFIX_FILTER: .go + SEPARATOR: ',' + cleanup-runs: runs-on: ubuntu-latest steps: @@ -16,7 +26,7 @@ jobs: - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 - run: | - make build + make build && go version install-runsim: runs-on: ubuntu-latest needs: build From 522e67add105943d32d553041213157abd16d381 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 18:42:55 +0200 Subject: [PATCH 03/61] test change to go file --- .github/workflows/release-sims.yml | 2 +- server/init.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-sims.yml b/.github/workflows/release-sims.yml index c78f47efeee..02d58549501 100644 --- a/.github/workflows/release-sims.yml +++ b/.github/workflows/release-sims.yml @@ -1,4 +1,4 @@ -name: Sims +name: Release Sims on: push: branches: diff --git a/server/init.go b/server/init.go index 1dd3ee8b9dc..f4d36874e78 100644 --- a/server/init.go +++ b/server/init.go @@ -17,6 +17,7 @@ func GenerateCoinKey() (sdk.AccAddress, string, error) { if err != nil { return sdk.AccAddress([]byte{}), "", err } + return sdk.AccAddress(info.GetPubKey().Address()), secret, nil } From 5bdb1eaad607a3c73429467b6588f437eb5f6164 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 18:46:47 +0200 Subject: [PATCH 04/61] remove golang change --- .github/workflows/sims.yml | 4 ++-- server/init.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 87acec06623..acfe45f25d3 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -17,11 +17,11 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && steps.git_diff.outputs.diff" build: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims')" + if: "!contains(github.event.head_commit.message, 'skip-sims') && steps.git_diff.outputs.diff" steps: - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 diff --git a/server/init.go b/server/init.go index f4d36874e78..1dd3ee8b9dc 100644 --- a/server/init.go +++ b/server/init.go @@ -17,7 +17,6 @@ func GenerateCoinKey() (sdk.AccAddress, string, error) { if err != nil { return sdk.AccAddress([]byte{}), "", err } - return sdk.AccAddress(info.GetPubKey().Address()), secret, nil } From 9b97e2325be67ae1dff742b51dc55e3b1c40b3d8 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 18:53:18 +0200 Subject: [PATCH 05/61] test out m inor if change --- .github/workflows/sims.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index acfe45f25d3..17f69c3b558 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -17,13 +17,13 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && steps.git_diff.outputs.diff" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" build: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip-sims') && steps.git_diff.outputs.diff" + needs: diff steps: - - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 - run: | make build && go version From c49e8c2bb7d0fb929f95d62e05a02d6a132629d9 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 18:54:15 +0200 Subject: [PATCH 06/61] make release sims only on releases --- .github/workflows/release-sims.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-sims.yml b/.github/workflows/release-sims.yml index 02d58549501..70e8aa22288 100644 --- a/.github/workflows/release-sims.yml +++ b/.github/workflows/release-sims.yml @@ -3,7 +3,6 @@ on: push: branches: - /^v.*/ - pull_request: # only for testing jobs: cleanup-runs: From f727f5eac0919e8d99c4fd8570c6763bcef0b8a3 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 18:57:28 +0200 Subject: [PATCH 07/61] tey jobs syntax --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 17f69c3b558..77b63b76d2a 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -21,7 +21,7 @@ jobs: build: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims') && steps.git_diff.outputs.diff" + if: "!contains(github.event.head_commit.message, 'skip-sims') && jobs.diff.outputs.diff" needs: diff steps: - uses: actions/checkout@v2 From b93e2b590faea7eef15a80d37d8c63c9a79f447b Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 19:01:24 +0200 Subject: [PATCH 08/61] better syntax --- .github/workflows/sims.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 77b63b76d2a..0185cf730db 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -2,6 +2,7 @@ name: Sims on: [pull_request] jobs: diff: + name: git-diff runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -21,7 +22,7 @@ jobs: build: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims') && jobs.diff.outputs.diff" + if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.diff.outputs.diff" needs: diff steps: - uses: actions/checkout@v2 From a7dd49f9fda624c9b12e2a9d767771fd598f288d Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 19:02:21 +0200 Subject: [PATCH 09/61] ahhh go change --- server/init.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/init.go b/server/init.go index 1dd3ee8b9dc..f4d36874e78 100644 --- a/server/init.go +++ b/server/init.go @@ -17,6 +17,7 @@ func GenerateCoinKey() (sdk.AccAddress, string, error) { if err != nil { return sdk.AccAddress([]byte{}), "", err } + return sdk.AccAddress(info.GetPubKey().Address()), secret, nil } From b4d94ad51a3a1f0ec3e27fa362b619290900d9c0 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 19:04:03 +0200 Subject: [PATCH 10/61] more go changes --- crypto/ledger_mock.go | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/ledger_mock.go b/crypto/ledger_mock.go index 20a45c158bb..4cbf85b2373 100644 --- a/crypto/ledger_mock.go +++ b/crypto/ledger_mock.go @@ -25,6 +25,7 @@ import ( func init() { discoverLedger = func() (LedgerSECP256K1, error) { return LedgerSECP256K1Mock{}, nil + } } From eaac0ff33b466b285e67f5247021a094b259bee1 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 19:07:12 +0200 Subject: [PATCH 11/61] try some env variables --- .github/workflows/sims.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 0185cf730db..3f94ce64cee 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -11,6 +11,8 @@ jobs: with: SUFFIX_FILTER: .go SEPARATOR: ',' + SET_ENV_NAME_INSERTIONS: 1 + SET_ENV_NAME_LINES: 1 cleanup-runs: runs-on: ubuntu-latest From 2da56517fe8ec2717d48c5f72b9000ecad7c6388 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Mon, 27 Apr 2020 19:13:16 +0200 Subject: [PATCH 12/61] try something janky --- .circleci/config.yml | 17 ----------------- .github/workflows/sims.yml | 3 +-- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c15f654bf27..f4a7024e8eb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,13 +87,6 @@ jobs: target: proto-gen proto-lint proto-check-breaking description: "Lint and verify Protocol Buffer definitions" - test-sim-multi-seed-long: - executor: golang - steps: - - make: - target: test-sim-multi-seed-long - description: "Test multi-seed simulation (long)" - update-swagger-docs: executor: golang steps: @@ -114,16 +107,6 @@ workflows: tags: only: - /^v.*/ - - test-sim-multi-seed-long: - requires: - - setup-dependencies - # These filters ensure that the long sim only runs during release - filters: - branches: - ignore: /.*/ - tags: - only: - - /^v.*/ - proto: requires: - setup-dependencies diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 3f94ce64cee..82d79fcfac4 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -10,7 +10,6 @@ jobs: id: git_diff with: SUFFIX_FILTER: .go - SEPARATOR: ',' SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 @@ -24,7 +23,7 @@ jobs: build: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.diff.outputs.diff" + if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.diff.outputs.diff > 1" needs: diff steps: - uses: actions/checkout@v2 From dbd77875ef870e3fea733701bb43298affff9b0b Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 08:58:44 +0200 Subject: [PATCH 13/61] some more testing --- .github/workflows/release-sims.yml | 6 +++--- .github/workflows/sims.yml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-sims.yml b/.github/workflows/release-sims.yml index 70e8aa22288..40a4040a111 100644 --- a/.github/workflows/release-sims.yml +++ b/.github/workflows/release-sims.yml @@ -33,7 +33,7 @@ jobs: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary - test-sim-nondeterminism: + test-sim-multi-seed-long: runs-on: ubuntu-latest needs: [build, install-runsim] steps: @@ -42,6 +42,6 @@ jobs: with: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary - - name: test-sim-nondeterminism + - name: test-sim-multi-seed-long run: | - make test-sim-nondeterminism + make test-sim-multi-seed-long diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 82d79fcfac4..feebdff89d5 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -12,6 +12,9 @@ jobs: SUFFIX_FILTER: .go SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 + - name: test + run: | + github.jobs.diff.outputs.diff > 1 cleanup-runs: runs-on: ubuntu-latest From 9540d871be4eadcac042a6306c2847fbcd213ba3 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 09:21:25 +0200 Subject: [PATCH 14/61] let the madness ensue --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index feebdff89d5..0025f3c0f3b 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,7 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: | - github.jobs.diff.outputs.diff > 1 + echo ${{github.jobs.diff.outputs.diff}} cleanup-runs: runs-on: ubuntu-latest From 1401c1adcb50d58cc670dcb2d188b0ee0f15d252 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 09:49:44 +0200 Subject: [PATCH 15/61] test --- .github/workflows/sims.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 0025f3c0f3b..003de22e11c 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -12,21 +12,21 @@ jobs: SUFFIX_FILTER: .go SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - - name: test - run: | - echo ${{github.jobs.diff.outputs.diff}} cleanup-runs: runs-on: ubuntu-latest + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" steps: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + - name: test + run: | + echo ${{github.jobs.diff.outputs.diff}} build: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.diff.outputs.diff > 1" + if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.diff.outputs.diff" needs: diff steps: - uses: actions/checkout@v2 From df2dc419b2e4bb37c13b31402dfd08646b09faad Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 09:53:19 +0200 Subject: [PATCH 16/61] more testing --- .github/workflows/sims.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 003de22e11c..048acac5259 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -22,7 +22,8 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - name: test run: | - echo ${{github.jobs.diff.outputs.diff}} + echo ${{github.jobs.diff.outputs.diff.env}} + echo ${{env}} build: runs-on: ubuntu-latest From d91f883b5895963995e9bb311c53d215ec249523 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 09:55:27 +0200 Subject: [PATCH 17/61] aaaahhhhh --- .github/workflows/sims.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 048acac5259..fabd41acf2e 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -12,6 +12,10 @@ jobs: SUFFIX_FILTER: .go SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 + - name: test + run: | + echo ${{github.jobs.diff}} + echo ${{env}} cleanup-runs: runs-on: ubuntu-latest @@ -22,7 +26,7 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - name: test run: | - echo ${{github.jobs.diff.outputs.diff.env}} + echo ${{github.jobs.git-diff.outputs}} echo ${{env}} build: From 12bf568003bd44010d8fe3cde788a76c38a0b5af Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 09:58:30 +0200 Subject: [PATCH 18/61] aaaaaaaaaaa --- .github/workflows/sims.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index fabd41acf2e..d09303cc6bf 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,8 +14,8 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: | - echo ${{github.jobs.diff}} - echo ${{env}} + echo ${{github.jobs.git-diff.outputs.diff}} + echo ${{env.GIT_DIFF}} cleanup-runs: runs-on: ubuntu-latest @@ -27,7 +27,7 @@ jobs: - name: test run: | echo ${{github.jobs.git-diff.outputs}} - echo ${{env}} + echo ${{env.GIT_DIFF}} build: runs-on: ubuntu-latest From 3be4bd790aa52133992326dcc2683ffbdb7be86b Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:02:56 +0200 Subject: [PATCH 19/61] aaaaaaaaaaahhhhhhhhhh --- .github/workflows/sims.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index d09303cc6bf..9f6cdcace4f 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -15,6 +15,7 @@ jobs: - name: test run: | echo ${{github.jobs.git-diff.outputs.diff}} + echo ::set-env name=action_state::yellow echo ${{env.GIT_DIFF}} cleanup-runs: @@ -26,8 +27,7 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - name: test run: | - echo ${{github.jobs.git-diff.outputs}} - echo ${{env.GIT_DIFF}} + echo ${{env.action_state}} build: runs-on: ubuntu-latest From 5d589517decfa276c5d169eb3df1b36e7313ee61 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:05:24 +0200 Subject: [PATCH 20/61] more --- .github/workflows/sims.yml | 2 +- crypto/ledger_mock.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 9f6cdcace4f..83c300d177d 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,9 +14,9 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: | - echo ${{github.jobs.git-diff.outputs.diff}} echo ::set-env name=action_state::yellow echo ${{env.GIT_DIFF}} + echo ${{env.1}} cleanup-runs: runs-on: ubuntu-latest diff --git a/crypto/ledger_mock.go b/crypto/ledger_mock.go index 4cbf85b2373..20a45c158bb 100644 --- a/crypto/ledger_mock.go +++ b/crypto/ledger_mock.go @@ -25,7 +25,6 @@ import ( func init() { discoverLedger = func() (LedgerSECP256K1, error) { return LedgerSECP256K1Mock{}, nil - } } From 3828babce884f77ee20b16c7a306ce4a5e881f7d Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:06:49 +0200 Subject: [PATCH 21/61] more --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 83c300d177d..b9e74271e97 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -16,7 +16,7 @@ jobs: run: | echo ::set-env name=action_state::yellow echo ${{env.GIT_DIFF}} - echo ${{env.1}} + echo ${{env}} cleanup-runs: runs-on: ubuntu-latest From 8cfc8a38c34cc4004c7eca58bfb93bd6b7ef393c Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:09:03 +0200 Subject: [PATCH 22/61] env --- .github/workflows/sims.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index b9e74271e97..d296e18cab0 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -16,7 +16,8 @@ jobs: run: | echo ::set-env name=action_state::yellow echo ${{env.GIT_DIFF}} - echo ${{env}} + echo ${{env.COUNT}} + echo ${{env.count}} cleanup-runs: runs-on: ubuntu-latest From 67c4d55869a9de5880875d8e7ca527ffa315faa6 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:14:00 +0200 Subject: [PATCH 23/61] too many --- .github/workflows/sims.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index d296e18cab0..4387196e96e 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -16,8 +16,6 @@ jobs: run: | echo ::set-env name=action_state::yellow echo ${{env.GIT_DIFF}} - echo ${{env.COUNT}} - echo ${{env.count}} cleanup-runs: runs-on: ubuntu-latest @@ -32,7 +30,7 @@ jobs: build: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.diff.outputs.diff" + if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.diff.outputs.diff != ' '" needs: diff steps: - uses: actions/checkout@v2 From 3ad6296a2443149f69b25e040458489ac0744b45 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:18:28 +0200 Subject: [PATCH 24/61] try another name --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 4387196e96e..840ac53a089 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -30,7 +30,7 @@ jobs: build: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.diff.outputs.diff != ' '" + if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.git-diff.outputs.diff != ' '" needs: diff steps: - uses: actions/checkout@v2 From 462c25cc477abb129450375c7937b8205773a17c Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:25:04 +0200 Subject: [PATCH 25/61] try envs --- .github/workflows/sims.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 840ac53a089..e67ea3ecc95 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,8 +14,9 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: | - echo ::set-env name=action_state::yellow - echo ${{env.GIT_DIFF}} + echo "::set-env name=action_state::yellow" + echo ${{env.GIT_DIFF}} != ' ' + # env: cleanup-runs: runs-on: ubuntu-latest From ddcb7d9857c4848404a1f7bd49c9b6d7d79303dc Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:26:43 +0200 Subject: [PATCH 26/61] some more --- .github/workflows/sims.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index e67ea3ecc95..85f223488bb 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -28,6 +28,7 @@ jobs: - name: test run: | echo ${{env.action_state}} + echo ${{github.jobs.git-diff.env}} build: runs-on: ubuntu-latest From 2fdfcd0062915113fe2a83d3d552e8c044a0ad2f Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:34:49 +0200 Subject: [PATCH 27/61] try something janky --- .github/workflows/sims.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 85f223488bb..6c6c511084f 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,9 +14,10 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: | - echo "::set-env name=action_state::yellow" - echo ${{env.GIT_DIFF}} != ' ' - # env: + if ${{env.GIT_DIFF}} == ' ' { + exit 1 + echo "Failing because no go files were touched" + } cleanup-runs: runs-on: ubuntu-latest @@ -25,14 +26,10 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - - name: test - run: | - echo ${{env.action_state}} - echo ${{github.jobs.git-diff.env}} build: runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-sims') && github.jobs.git-diff.outputs.diff != ' '" + if: "!contains(github.event.head_commit.message, 'skip-sims')" needs: diff steps: - uses: actions/checkout@v2 From 305619b1d63ed7ce3fbeff69909b2e6f3d7d62a4 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:36:42 +0200 Subject: [PATCH 28/61] fix script --- .github/workflows/sims.yml | 3 +-- crypto/ledger_real.go | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 6c6c511084f..792afa37b16 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,10 +14,9 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: | - if ${{env.GIT_DIFF}} == ' ' { + if ${{env.GIT_DIFF}} == ' ' exit 1 echo "Failing because no go files were touched" - } cleanup-runs: runs-on: ubuntu-latest diff --git a/crypto/ledger_real.go b/crypto/ledger_real.go index 93837e389ab..55c07ea91a5 100644 --- a/crypto/ledger_real.go +++ b/crypto/ledger_real.go @@ -12,6 +12,7 @@ func init() { device, err := ledger.FindLedgerCosmosUserApp() if err != nil { return nil, err + } return device, nil From 63d46db0455c05fc4cdf7371214c604f7e9b3842 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:39:05 +0200 Subject: [PATCH 29/61] testsing --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 792afa37b16..60f760360c1 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,9 +14,9 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: | - if ${{env.GIT_DIFF}} == ' ' exit 1 echo "Failing because no go files were touched" + if: steps.git_diff.outputs.diff cleanup-runs: runs-on: ubuntu-latest From 6bf9777895e87993e5c63c4d67580b4fe6568c67 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:41:00 +0200 Subject: [PATCH 30/61] undo go changes --- .github/workflows/sims.yml | 4 +--- crypto/ledger_real.go | 1 - server/init.go | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 60f760360c1..65fe33de107 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -13,9 +13,7 @@ jobs: SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - name: test - run: | - exit 1 - echo "Failing because no go files were touched" + run: exit 1 if: steps.git_diff.outputs.diff cleanup-runs: diff --git a/crypto/ledger_real.go b/crypto/ledger_real.go index 55c07ea91a5..93837e389ab 100644 --- a/crypto/ledger_real.go +++ b/crypto/ledger_real.go @@ -12,7 +12,6 @@ func init() { device, err := ledger.FindLedgerCosmosUserApp() if err != nil { return nil, err - } return device, nil diff --git a/server/init.go b/server/init.go index f4d36874e78..1dd3ee8b9dc 100644 --- a/server/init.go +++ b/server/init.go @@ -17,7 +17,6 @@ func GenerateCoinKey() (sdk.AccAddress, string, error) { if err != nil { return sdk.AccAddress([]byte{}), "", err } - return sdk.AccAddress(info.GetPubKey().Address()), secret, nil } From aa796da625d6a02e6ba208a42c6e08f6bcde71b5 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:43:36 +0200 Subject: [PATCH 31/61] idk --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 65fe33de107..55bb47dfbb3 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,7 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: exit 1 - if: steps.git_diff.outputs.diff + if: "!steps.git_diff.outputs.diff" cleanup-runs: runs-on: ubuntu-latest From 1597f1d8e9459aa60337a031c49e1ef3e2b46aa0 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:44:51 +0200 Subject: [PATCH 32/61] no run no go files --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 55bb47dfbb3..cc2be41744a 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,7 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: exit 1 - if: "!steps.git_diff.outputs.diff" + if: "steps.git_diff.outputs.diff" cleanup-runs: runs-on: ubuntu-latest From 5b76a975c5af1fed4928e19ee7a712f373250a3f Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:45:39 +0200 Subject: [PATCH 33/61] test go files change --- crypto/amino.go | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/amino.go b/crypto/amino.go index 553a4723f9d..a9204ef300a 100644 --- a/crypto/amino.go +++ b/crypto/amino.go @@ -10,6 +10,7 @@ var cdc = amino.NewCodec() func init() { RegisterAmino(cdc) cryptoAmino.RegisterAmino(cdc) + } // RegisterAmino registers all go-crypto related types in the given (amino) codec. From 21db897a953833ceb5960256ea7bcd2e3d883021 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:47:24 +0200 Subject: [PATCH 34/61] should pass --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index cc2be41744a..10e20b2e18a 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,7 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: exit 1 - if: "steps.git_diff.outputs.diff" + if: env.GIT_DIFF cleanup-runs: runs-on: ubuntu-latest From daf5711145dd578e15a57c8302817964529019d4 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:48:20 +0200 Subject: [PATCH 35/61] try in "" --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 10e20b2e18a..ed5d4470d40 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,7 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: exit 1 - if: env.GIT_DIFF + if: "env.GIT_DIFF" cleanup-runs: runs-on: ubuntu-latest From 94032bef82c96aa1c56513e19330284ef3814c40 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:49:28 +0200 Subject: [PATCH 36/61] try something else --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index ed5d4470d40..0d207965166 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,7 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: exit 1 - if: "env.GIT_DIFF" + if: "env.GIT_DIFF != []" cleanup-runs: runs-on: ubuntu-latest From 30bbf9f128b53860f8bef3294c8fb270d7fc98e5 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:50:47 +0200 Subject: [PATCH 37/61] try something else --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 0d207965166..ffa3cb13312 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,7 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: exit 1 - if: "env.GIT_DIFF != []" + if: "env.GIT_DIFF != '[]'" cleanup-runs: runs-on: ubuntu-latest From ee4a5dc990c9caac68fa1b28729cb92ffd222d71 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:51:34 +0200 Subject: [PATCH 38/61] wrong way --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index ffa3cb13312..9272478871c 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,7 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: exit 1 - if: "env.GIT_DIFF != '[]'" + if: "env.GIT_DIFF == '[]'" cleanup-runs: runs-on: ubuntu-latest From 7f86662313f0b75e17a4edc244e0fadec1279c02 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:52:33 +0200 Subject: [PATCH 39/61] no go no run --- crypto/amino.go | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/amino.go b/crypto/amino.go index a9204ef300a..553a4723f9d 100644 --- a/crypto/amino.go +++ b/crypto/amino.go @@ -10,7 +10,6 @@ var cdc = amino.NewCodec() func init() { RegisterAmino(cdc) cryptoAmino.RegisterAmino(cdc) - } // RegisterAmino registers all go-crypto related types in the given (amino) codec. From fdbf46544b9ca2386c5e9f355aee02dc6e8638c5 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:57:10 +0200 Subject: [PATCH 40/61] no go no run --- .github/workflows/sims.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 9272478871c..3d5fce3de9d 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,7 @@ jobs: SET_ENV_NAME_LINES: 1 - name: test run: exit 1 - if: "env.GIT_DIFF == '[]'" + if: "env.GIT_DIFF == ''" cleanup-runs: runs-on: ubuntu-latest From f363c18ba6f0e6660428c1ea98b9b3593a3af1c1 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 10:59:39 +0200 Subject: [PATCH 41/61] maybe --- crypto/amino.go | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/amino.go b/crypto/amino.go index 553a4723f9d..a9204ef300a 100644 --- a/crypto/amino.go +++ b/crypto/amino.go @@ -10,6 +10,7 @@ var cdc = amino.NewCodec() func init() { RegisterAmino(cdc) cryptoAmino.RegisterAmino(cdc) + } // RegisterAmino registers all go-crypto related types in the given (amino) codec. From 0dc8d268aaa63095cc8a80a616f9cb7cb01bbeae Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 11:05:05 +0200 Subject: [PATCH 42/61] its alive --- crypto/amino.go | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/amino.go b/crypto/amino.go index a9204ef300a..553a4723f9d 100644 --- a/crypto/amino.go +++ b/crypto/amino.go @@ -10,7 +10,6 @@ var cdc = amino.NewCodec() func init() { RegisterAmino(cdc) cryptoAmino.RegisterAmino(cdc) - } // RegisterAmino registers all go-crypto related types in the given (amino) codec. From 2b1245cc0fb4c374324779114898114d4ea3dc92 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 12:07:29 +0200 Subject: [PATCH 43/61] pass the feature to test-coverage --- .github/workflows/sims.yml | 1 - .github/workflows/test.yml | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 3d5fce3de9d..fa9a4f68107 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -2,7 +2,6 @@ name: Sims on: [pull_request] jobs: diff: - name: git-diff runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e0d07115b90..39065786a5c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,20 @@ on: branches: - master jobs: + diff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: technote-space/get-diff-action@v1 + id: git_diff + with: + SUFFIX_FILTER: .go + SET_ENV_NAME_INSERTIONS: 1 + SET_ENV_NAME_LINES: 1 + - name: test + run: exit 1 + if: "env.GIT_DIFF == ''" + cleanup-runs: runs-on: ubuntu-latest steps: @@ -15,6 +29,7 @@ jobs: test-coverage-upload: runs-on: ubuntu-latest + needs: diff steps: - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 From 305ee1afca4f90eafd67dbb547867e5ab632004f Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 12:22:26 +0200 Subject: [PATCH 44/61] test go mod changes --- .github/workflows/test.yml | 7 ++++--- go.mod | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39065786a5c..02b75e0d517 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,9 +12,10 @@ jobs: - uses: technote-space/get-diff-action@v1 id: git_diff with: - SUFFIX_FILTER: .go - SET_ENV_NAME_INSERTIONS: 1 - SET_ENV_NAME_LINES: 1 + SUFFIX_FILTER: | + .go + .mod + .sum - name: test run: exit 1 if: "env.GIT_DIFF == ''" diff --git a/go.mod b/go.mod index 049600965ca..bc21acf49f4 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/cosmos/cosmos-sdk +go 1.14 + require ( github.com/99designs/keyring v1.1.5 github.com/bgentry/speakeasy v0.1.0 @@ -35,5 +37,3 @@ require ( ) replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.1 - -go 1.14 From 9c6feb1307c29a21483cb792ff789b7fe35dec78 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 12:24:21 +0200 Subject: [PATCH 45/61] check for changes in go.mod --- .github/workflows/sims.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index fa9a4f68107..eea33778f24 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -8,7 +8,10 @@ jobs: - uses: technote-space/get-diff-action@v1 id: git_diff with: - SUFFIX_FILTER: .go + SUFFIX_FILTER: | + .go + .mod + .sum SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - name: test From 5442797508c5c8c63480f0743e86f6a5a8653b12 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 12:39:29 +0200 Subject: [PATCH 46/61] migrate proto to GA --- .circleci/config.yml | 13 ------------- .github/workflows/proto.yml | 21 +++++++++++++++++++++ Makefile | 9 +++++++++ 3 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/proto.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index f4a7024e8eb..921f556a8d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,16 +77,6 @@ jobs: paths: - ".git" - proto: - executor: protoc - steps: - - make: - target: protoc-gen-gocosmos - description: "Generate go plugin for protoc" - - make: - target: proto-gen proto-lint proto-check-breaking - description: "Lint and verify Protocol Buffer definitions" - update-swagger-docs: executor: golang steps: @@ -107,9 +97,6 @@ workflows: tags: only: - /^v.*/ - - proto: - requires: - - setup-dependencies - build-docs: context: docs-deployment-master filters: diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml new file mode 100644 index 00000000000..aebcbfabff9 --- /dev/null +++ b/.github/workflows/proto.yml @@ -0,0 +1,21 @@ +name: Proto check +on: [pull_request] +jobs: + proto-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: technote-space/get-diff-action@v1 + id: git_diff + with: + SUFFIX_FILTER: .proto + SET_ENV_NAME_INSERTIONS: 1 + SET_ENV_NAME_LINES: 1 + - uses: docker-practice/actions-setup-docker@master + if: "env.GIT_DIFF != ''" + - name: lint + run: make proto-lint + if: "env.GIT_DIFF != ''" + - name: check-breakage + run: make proto-check-breaking-ci + if: "env.GIT_DIFF != ''" diff --git a/Makefile b/Makefile index 367ae9d5845..61be4d153c5 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ LEDGER_ENABLED ?= true BINDIR ?= $(GOPATH)/bin SIMAPP = ./simapp MOCKS_DIR = $(CURDIR)/tests/mocks +DOCKER_BUF := docker run -v $(shell pwd):/workspace --workdir /workspace bufbuild/buf export GO111MODULE = on @@ -255,6 +256,14 @@ proto-lint: proto-check-breaking: @buf check breaking --against-input '.git#branch=master' +proto-lint-docker: + @$(DOCKER_BUF) check lint --error-format=json +.PHONY: proto-lint + +proto-check-breaking-docker: + @$(DOCKER_BUF) check breaking --against-input .git#branch=master +.PHONY: proto-check-breaking + TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.33.1 GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master From c6710c19ba52af2bfc13335d0226c5669c17e027 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 12:40:13 +0200 Subject: [PATCH 47/61] test proto ci --- .github/workflows/proto.yml | 4 ++-- codec/testdata/proto.proto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index aebcbfabff9..c24ca50f311 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -11,8 +11,8 @@ jobs: SUFFIX_FILTER: .proto SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - - uses: docker-practice/actions-setup-docker@master - if: "env.GIT_DIFF != ''" + # - uses: docker-practice/actions-setup-docker@master + # if: "env.GIT_DIFF != ''" - name: lint run: make proto-lint if: "env.GIT_DIFF != ''" diff --git a/codec/testdata/proto.proto b/codec/testdata/proto.proto index ed8c0418dbc..3616484b8a2 100644 --- a/codec/testdata/proto.proto +++ b/codec/testdata/proto.proto @@ -9,6 +9,6 @@ message Dog { } message Cat { - string moniker = 1; - int32 lives = 2; + string moniker = 1; + int32 lives = 2; } From 8918757fbbdd7e619b8ca0f2056d4d8905799fa3 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 12:42:15 +0200 Subject: [PATCH 48/61] fix make cmd --- .github/workflows/proto.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index c24ca50f311..ee71de38f3d 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -14,8 +14,8 @@ jobs: # - uses: docker-practice/actions-setup-docker@master # if: "env.GIT_DIFF != ''" - name: lint - run: make proto-lint + run: make proto-lint-docker if: "env.GIT_DIFF != ''" - name: check-breakage - run: make proto-check-breaking-ci + run: make proto-check-breaking-docker if: "env.GIT_DIFF != ''" From 8b42b978e909c34b838dc920fe33f52cd503f036 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 12:46:08 +0200 Subject: [PATCH 49/61] try docker setup --- .github/workflows/proto.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index ee71de38f3d..e279664f4e3 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -11,8 +11,8 @@ jobs: SUFFIX_FILTER: .proto SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - # - uses: docker-practice/actions-setup-docker@master - # if: "env.GIT_DIFF != ''" + - uses: docker-practice/actions-setup-docker@master + if: "env.GIT_DIFF != ''" - name: lint run: make proto-lint-docker if: "env.GIT_DIFF != ''" From 16f61a6b4d084ec55bb4df5f2dc6287b4cfb8b8f Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 13:21:40 +0200 Subject: [PATCH 50/61] tests exit 0 --- .github/workflows/proto.yml | 2 -- .github/workflows/sims.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index e279664f4e3..5794ae0b59e 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -11,8 +11,6 @@ jobs: SUFFIX_FILTER: .proto SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - - uses: docker-practice/actions-setup-docker@master - if: "env.GIT_DIFF != ''" - name: lint run: make proto-lint-docker if: "env.GIT_DIFF != ''" diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index eea33778f24..ac09a0c1d42 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -15,7 +15,7 @@ jobs: SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - name: test - run: exit 1 + run: exit 0 if: "env.GIT_DIFF == ''" cleanup-runs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02b75e0d517..407e6c0abe9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: .mod .sum - name: test - run: exit 1 + run: exit 0 if: "env.GIT_DIFF == ''" cleanup-runs: From 98e104572be7045577b169585801cf1aff6881ba Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 13:23:41 +0200 Subject: [PATCH 51/61] remove go.mod change --- go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index bc21acf49f4..049600965ca 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,5 @@ module github.com/cosmos/cosmos-sdk -go 1.14 - require ( github.com/99designs/keyring v1.1.5 github.com/bgentry/speakeasy v0.1.0 @@ -37,3 +35,5 @@ require ( ) replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.1 + +go 1.14 From d61f8212f49441f8dddbe30cb0afd777a0cce95c Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 13:25:08 +0200 Subject: [PATCH 52/61] bring back exit 1 --- .github/workflows/sims.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index ac09a0c1d42..eea33778f24 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -15,7 +15,7 @@ jobs: SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - name: test - run: exit 0 + run: exit 1 if: "env.GIT_DIFF == ''" cleanup-runs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 407e6c0abe9..02b75e0d517 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: .mod .sum - name: test - run: exit 0 + run: exit 1 if: "env.GIT_DIFF == ''" cleanup-runs: From f17dd971fbb82dcd2580c0e98d21489c8832564e Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 14:38:22 +0200 Subject: [PATCH 53/61] test one liner --- .github/workflows/test.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02b75e0d517..645ade37824 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,21 +5,6 @@ on: branches: - master jobs: - diff: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: technote-space/get-diff-action@v1 - id: git_diff - with: - SUFFIX_FILTER: | - .go - .mod - .sum - - name: test - run: exit 1 - if: "env.GIT_DIFF == ''" - cleanup-runs: runs-on: ubuntu-latest steps: @@ -30,13 +15,15 @@ jobs: test-coverage-upload: runs-on: ubuntu-latest - needs: diff steps: - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 - name: build run: | make build + - name: check diff + run: | + git diff-tree --no-commit-id --name-only -r HEAD~1..HEAD | grep '.go' &>/dev/null || ( echo "skipping" ; exit 0 ) - name: test & coverage report creation run: | go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' From ba619cc186ac9ce2cb7916eeb953150a046b9037 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 14:42:13 +0200 Subject: [PATCH 54/61] make it pass and not skip --- .github/workflows/test.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 645ade37824..4b4f7e0da1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,12 +21,17 @@ jobs: - name: build run: | make build - - name: check diff - run: | - git diff-tree --no-commit-id --name-only -r HEAD~1..HEAD | grep '.go' &>/dev/null || ( echo "skipping" ; exit 0 ) + - uses: technote-space/get-diff-action@v1 + id: git_diff + with: + SUFFIX_FILTER: | + .go + .mod + .sum - name: test & coverage report creation run: | go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' + if: "env.GIT_DIFF != ''" - name: filter out DONTCOVER run: | excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" @@ -37,7 +42,9 @@ jobs: echo "Excluding ${filename} from coverage report..." sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done + if: "env.GIT_DIFF != ''" - uses: codecov/codecov-action@v1 with: file: ./coverage.txt # optional fail_ci_if_error: true + if: "env.GIT_DIFF != ''" From 9bbb38f65c860ce4fa7481db729b55ce6052458f Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 14:53:19 +0200 Subject: [PATCH 55/61] test some changes --- .github/workflows/proto.yml | 4 ++-- .github/workflows/sims.yml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 5794ae0b59e..1dd36a79b17 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -15,5 +15,5 @@ jobs: run: make proto-lint-docker if: "env.GIT_DIFF != ''" - name: check-breakage - run: make proto-check-breaking-docker - if: "env.GIT_DIFF != ''" + # run: make proto-check-breaking-docker + # if: "env.GIT_DIFF != ''" diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index eea33778f24..a798a004636 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -29,14 +29,14 @@ jobs: build: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip-sims')" - needs: diff steps: - uses: actions/checkout@v2 - run: | - make build && go version + make build + install-runsim: runs-on: ubuntu-latest - needs: build + needs: [build, diff] steps: - uses: actions/setup-go@v2-beta - name: install runsim @@ -49,7 +49,7 @@ jobs: test-sim-nondeterminism: runs-on: ubuntu-latest - needs: [build, install-runsim] + needs: [build, install-runsim, diff] steps: - uses: actions/checkout@v2 - uses: actions/cache@v1 @@ -62,7 +62,7 @@ jobs: test-sim-import-export: runs-on: ubuntu-latest - needs: [build, install-runsim] + needs: [build, install-runsim, diff] steps: - uses: actions/checkout@v2 - uses: actions/cache@v1 @@ -75,7 +75,7 @@ jobs: test-sim-after-import: runs-on: ubuntu-latest - needs: [build, install-runsim] + needs: [build, install-runsim, diff] steps: - uses: actions/checkout@v2 - uses: actions/cache@v1 @@ -88,7 +88,7 @@ jobs: test-sim-multi-seed-short: runs-on: ubuntu-latest - needs: [build, install-runsim] + needs: [build, install-runsim, diff] steps: - uses: actions/checkout@v2 - uses: actions/cache@v1 From f47b0aec9dbc37d7e606cc92b70beee8641ae684 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 14:55:18 +0200 Subject: [PATCH 56/61] no build on no changes --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b4f7e0da1f..e3ff42eea49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,9 +18,6 @@ jobs: steps: - uses: actions/setup-go@v2-beta - uses: actions/checkout@v2 - - name: build - run: | - make build - uses: technote-space/get-diff-action@v1 id: git_diff with: @@ -28,6 +25,10 @@ jobs: .go .mod .sum + - name: build + run: | + make build + if: "env.GIT_DIFF != ''" - name: test & coverage report creation run: | go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' From 66dc73a6371ddb6c2f106e3dd7d526aa03c264c9 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 15:10:58 +0200 Subject: [PATCH 57/61] proto-breakage on circle --- .circleci/config.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 921f556a8d9..3e1a44b8f72 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,6 +77,16 @@ jobs: paths: - ".git" + proto: + executor: protoc + steps: + - make: + target: protoc-gen-gocosmos + description: "Generate go plugin for protoc" + - make: + target: proto-check-breaking + description: "Lint and verify Protocol Buffer definitions" + update-swagger-docs: executor: golang steps: @@ -97,6 +107,9 @@ workflows: tags: only: - /^v.*/ + - proto: + requires: + - setup-dependencies - build-docs: context: docs-deployment-master filters: From 389a770e500a2eb27270576ce7c8ba8f77c98a36 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 15:18:23 +0200 Subject: [PATCH 58/61] fix proto docker --- .github/workflows/proto.yml | 4 ++-- Makefile | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 1dd36a79b17..5794ae0b59e 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -15,5 +15,5 @@ jobs: run: make proto-lint-docker if: "env.GIT_DIFF != ''" - name: check-breakage - # run: make proto-check-breaking-docker - # if: "env.GIT_DIFF != ''" + run: make proto-check-breaking-docker + if: "env.GIT_DIFF != ''" diff --git a/Makefile b/Makefile index 61be4d153c5..573e0a8b6af 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ LEDGER_ENABLED ?= true BINDIR ?= $(GOPATH)/bin SIMAPP = ./simapp MOCKS_DIR = $(CURDIR)/tests/mocks +HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git DOCKER_BUF := docker run -v $(shell pwd):/workspace --workdir /workspace bufbuild/buf export GO111MODULE = on @@ -261,8 +262,8 @@ proto-lint-docker: .PHONY: proto-lint proto-check-breaking-docker: - @$(DOCKER_BUF) check breaking --against-input .git#branch=master -.PHONY: proto-check-breaking + @$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=master +.PHONY: proto-check-breaking-ci TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.33.1 GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos From 81727549e3e49b00a88be6297bd88d08062fdb76 Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 15:27:22 +0200 Subject: [PATCH 59/61] remove proto from circle --- .circleci/config.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e1a44b8f72..921f556a8d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,16 +77,6 @@ jobs: paths: - ".git" - proto: - executor: protoc - steps: - - make: - target: protoc-gen-gocosmos - description: "Generate go plugin for protoc" - - make: - target: proto-check-breaking - description: "Lint and verify Protocol Buffer definitions" - update-swagger-docs: executor: golang steps: @@ -107,9 +97,6 @@ workflows: tags: only: - /^v.*/ - - proto: - requires: - - setup-dependencies - build-docs: context: docs-deployment-master filters: From 80405fb7dbec202f80f39a9dad27b4967ec2ed1c Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 15:34:10 +0200 Subject: [PATCH 60/61] add comment for failure --- .github/workflows/sims.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index a798a004636..5faefe9d96f 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -14,7 +14,8 @@ jobs: .sum SET_ENV_NAME_INSERTIONS: 1 SET_ENV_NAME_LINES: 1 - - name: test + - name: Fail if no changes + # this is used to notify the other jobs that there are no changes and so they should not run run: exit 1 if: "env.GIT_DIFF == ''" From 0b567c8dfd116c3fbdaeb7c8eaa62bd03b8045be Mon Sep 17 00:00:00 2001 From: Marko Baricevic Date: Tue, 28 Apr 2020 15:59:30 +0200 Subject: [PATCH 61/61] add protobuf section to contributing --- CONTRIBUTING.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 34789be8e24..27804172b50 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,8 +35,8 @@ contributors, the general procedure for contributing has been established: 4. Follow standard Github best practices: fork the repo, branch from the HEAD of `master`, make some commits, and submit a PR to `master` - For core developers working within the cosmos-sdk repo, to ensure a clear - ownership of branches, branches must be named with the convention - `{moniker}/{issue#}-branch-name` + ownership of branches, branches must be named with the convention + `{moniker}/{issue#}-branch-name` 5. Be sure to submit the PR in `Draft` mode submit your PR early, even if it's incomplete as this indicates to the community you're working on something and allows them to provide comments early in the development process @@ -124,7 +124,7 @@ Please don't make Pull Requests from `master`. ## Dependencies -We use [Go 1.11 Modules](https://github.com/golang/go/wiki/Modules) to manage +We use [Go 1.14 Modules](https://github.com/golang/go/wiki/Modules) to manage dependency versions. The master branch of every Cosmos repository should just build with `go get`, @@ -134,6 +134,14 @@ get away with telling people they can just `go get` our software. Since some dependencies are not under our control, a third party may break our build, in which case we can fall back on `go mod tidy -v`. +## Protobuf + +We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/gogo/protobuf) to generate code for use in Cosmos-SDK. + +For linting and checking breaking changes, we use [buf](https://buf.build/). There are two options for linting and to check if your changes will cause a break. The first is that you can install [buf](https://buf.build/docs/installation) locally, the commands for running buf after installing are `make proto-lint` and the breaking changes check will be `make proto-check-breaking`. If you do not want to install buf and have docker installed already then you can use these commands `make proto-lint-docker` and `make proto-check-breaking-docker`. + +To generate the protobuf stubs you must have `protoc` and `protoc-gen-gocosmos` installed. To install these tools run `make protoc` & `make protoc-gen-gocosmos`. After this step you will be able to run `make proto-gen` to generate the protobuf stubs. + ## Testing All repos should be hooked up to [CircleCI](https://circleci.com/). @@ -232,11 +240,11 @@ releases will be based off of that release. - create a PR into `master` containing ONLY the CHANGELOG.md updates - tag and release `release/vX.XX.X` -## Code Owner Membership +## Code Owner Membership In the ethos of open source projects, and out of necessity to keep the code alive, the core contributor team will strive to permit special repo privileges -to developers who show an aptitude towards developing with this code base. +to developers who show an aptitude towards developing with this code base. Several different kinds of privileges may be granted however most common privileges to be granted are merge rights to either part of, or the entire the @@ -247,7 +255,7 @@ potential new candidates as well as the potential for existing code-owners to exit or "pass on the torch". This private meeting is to be a held as a phone/video meeting. Subsequently at the end of the meeting, one of the existing code owners should open a PR modifying the `CODEOWNERS` file. The other code -owners should then all approve this PR to publicly display their support. +owners should then all approve this PR to publicly display their support. Only if unanimous consensus is reached among all the existing code-owners will an invitation be extended to a new potential-member. Likewise, when an existing @@ -255,9 +263,8 @@ member is suggested to be removed/or have their privileges reduced, the member in question must agree on the decision for their removal or else no action should be taken. If however, a code-owner is verifiably shown to intentionally have had acted maliciously or grossly negligent, code-owner privileges may be -stripped with no prior warning or consent from the member in question. +stripped with no prior warning or consent from the member in question. Earning this privilege should be considered to be no small feat and is by no means guaranteed by any quantifiable metric. It is a symbol of great trust of -the community of this project. - +the community of this project.