8000 Revert modularization of the test infra (#1488) by thanethomson · Pull Request #1676 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Revert modularization of the test infra (#1488) #1676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

13 changes: 2 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ jobs:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 8
strategy:
matrix:
# One entry per distinct Go module/submodule.
workdir:
- ''
- 'test/e2e'
- 'test/e2e/app'
- 'test/loadtime'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
Expand All @@ -36,12 +28,11 @@ jobs:
with:
PATTERNS: |
**/**.go
**/go.mod
**/go.sum
go.mod
go.sum
Comment on lines +31 to +32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a match for api/go.{mod,sum} as well, or should this rule be modified again before merging #1672?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That change should land on the feature/proto-upgrade branch.

- uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 10m
github-token: ${{ secrets.github_token }}
working-directory: ${{ matrix.workdir }}
if: env.GIT_DIFF
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,3 @@ proto/spec/**/*.pb.go
*.dvi
# Python virtual environments
.venv
go.work
go.work.sum
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@ format:
lint:
@echo "--> Running linter"
@go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run
@$(MAKE) -C ./test/e2e/ lint
@$(MAKE) -C ./test/e2e/app/ lint
@$(MAKE) -C ./test/loadtime/ lint
.PHONY: lint

vulncheck:
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ numbering our ADRs from 100 onwards.

- [ADR-103: Protobuf definition versioning](./adr-103-proto-versioning.md)
- [ADR-105: Refactor list of senders in mempool](./adr-105-refactor-mempool-senders.md)
- [ADR-109: Reduce CometBFT Go API Surface Area](./adr-109-reduce-go-api-surface.md)

### Accepted

- [ADR-101: Data companion pull API](./adr-101-data-companion-pull-api.md)
- [ADR-104: State sync from local snapshot](./adr-104-out-of-band-state-sync.md)
- [ADR-107: Rename protobuf versions of 0.x releases to pre-v1 betas](./adr-107-betaize-proto-versions.md)
- [ADR-109: Reduce CometBFT Go API Surface Area](./adr-109-reduce-go-api-surface.md)
- [ADR-111: `nop` Mempool](./adr-111-nop-mempool.md)

### Implemented
Expand Down
15 changes: 2 additions & 13 deletions docs/architecture/adr-109-reduce-go-api-surface.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Status

Accepted | Rejected | Deprecated | Superseded by
Accepted ([\#1484])

## Context

Expand All @@ -28,8 +28,6 @@ In order to mitigate this, several changes are proposed:
along similar lines to that proposed in [ADR 060]. This involves moving these
packages under the `/internal/` path in the repository, making those packages
only accessible to the CometBFT codebase.
3. Turn certain public packages into their own Go modules, allowing them to be
versioned independently of the rest of the CometBFT codebase.

## Alternative Approaches

Expand Down Expand Up @@ -192,16 +190,6 @@ remain publicly exported. All other packages in CometBFT should be moved under
| `types` | Cosmos SDK, IBC Go, Gaia | ✅ | |
| `version` | Cosmos SDK, IBC Go | ✅ | |

### Modularization

The following packages are to have their own `go.mod` files defined, turning
them into Go modules in their own right. This reduces pollution of the core
CometBFT `go.mod` file with non-core dependencies, and reduces the Go API
surface area of the core codebase.

- `test/loadtime` - The `loadtime` tool, used in testing and QA
- `test/e2e` - The CometBFT end-to-end testing framework

## Consequences

### Positive
Expand All @@ -216,6 +204,7 @@ surface area of the core codebase.
can be moved back out of the `internal` directory in subsequent minor
releases.

[\#1484]: https://github.com/cometbft/cometbft/issues/1484
[ADR 060]: ./tendermint-core/adr-060-go-api-stability.md
[Cosmos SDK]: https://github.com/cosmos/cosmos-sdk/
[Cosmos Hub]: https://github.com/cosmos/gaia
Expand Down
31 changes: 25 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ module github.com/cometbft/cometbft
go 1.21

require (
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/BurntSushi/toml v1.3.2
github.com/adlio/schema v1.3.4
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cometbft/cometbft/test/e2e/app v0.38.0
github.com/fortytw2/leaktest v1.3.0
github.com/go-kit/kit v0.13.0
github.com/go-kit/log v0.2.1
Expand Down Expand Up @@ -42,15 +41,22 @@ require (
)

require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/btcsuite/btcd/btcec/v2 v2.3.2
github.com/btcsuite/btcd/btcutil v1.1.3
github.com/cometbft/cometbft-db v0.7.0
github.com/cosmos/gogoproto v1.4.11
github.com/go-git/go-git/v5 v5.9.0
github.com/goccmack/goutil v1.2.3
github.com/gofrs/uuid v4.4.0+incompatible
github.com/google/ 10000 uuid v1.3.1
github.com/informalsystems/tm-load-test v1.3.0
github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae
github.com/vektra/mockery/v2 v2.37.1
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
golang.org/x/sync v0.5.0
gonum.org/v1/gonum v0.14.0
google.golang.org/protobuf v1.31.1-0.20231027082548-f4a6c1f6e5c1
)

require (
Expand All @@ -60,6 +66,7 @@ require (
buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.31.0-20231111212044-1119bf4b707e.2 // indirect
connectrpc.com/connect v1.12.0 // indirect
connectrpc.com/otelconnect v0.6.0 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/4meepo/tagalign v1.3.3 // indirect
github.com/Abirdcfly/dupword v0.0.13 // indirect
github.com/Antonboom/errname v0.1.12 // indirect
Expand All @@ -72,6 +79,8 @@ require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/alecthomas/go-check-sumtype v0.1.3 // indirect
github.com/alexkohler/nakedret/v2 v2.0.2 // indirect
github.com/alexkohler/prealloc v1.0.0 // indirect
Expand All @@ -96,10 +105,12 @@ require (
github.com/charithe/durationcheck v0.0.10 // indirect
github.com/chavacava/garif v0.1.0 // indirect
github.com/chigopher/pathlib v1.0.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/curioswitch/go-reassign v0.2.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/daixiang0/gci v0.11.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
Expand All @@ -115,6 +126,7 @@ require (
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/esimonov/ifshort v1.0.4 // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect
Expand All @@ -129,6 +141,8 @@ require (
github.com/ghostiam/protogetter v0.2.3 // indirect
github.com/go-chi/chi/v5 v5.0.10 // indirect
github.com/go-critic/go-critic v0.9.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-toolsmith/astcast v1.1.0 // indirect
Expand All @@ -144,6 +158,7 @@ require (
github.com/gofrs/uuid/v5 v5.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
Expand Down Expand Up @@ -174,13 +189,15 @@ require (
github.com/iancoleman/strcase v0.2.0 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jdx/go-netrc v1.0.0 // indirect
github.com/jgautheron/goconst v1.6.0 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jinzhu/copier v0.3.5 // indirect
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/julz/importas v0.1.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/kisielk/errcheck v1.6.3 // indirect
github.com/kisielk/gotool v1.0.0 // indirect
github.com/kkHAIKE/contextcheck v1.1.4 // indirect
Expand Down Expand Up @@ -219,6 +236,7 @@ require (
github.com/opencontainers/runc v1.1.5 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
Expand All @@ -230,7 +248,6 @@ require (
github.com/quasilyte/gogrep v0.5.0 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/zerolog v1.29.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/ryancurrah/gomodguard v1.3.0 // indirect
Expand All @@ -240,12 +257,15 @@ require (
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.24.0 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/securego/gosec/v2 v2.18.2 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sivchari/containedctx v1.0.3 // indirect
github.com/sivchari/nosnakecase v1.7.0 // indirect
github.com/sivchari/tenv v1.7.1 // indirect
github.com/skeema/knownhosts v1.2.0 // indirect
github.com/sonatard/noctx v0.0.2 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/sourcegraph/go-diff v0.7.0 // indirect
Expand All @@ -270,6 +290,7 @@ require (
github.com/ultraware/whitespace v0.0.5 // indirect
github.com/uudashr/gocognit v1.1.2 // indirect
github.com/vbatts/tar-split v0.11.5 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xen0n/gosmopolitan v1.2.2 // indirect
github.com/yagipy/maintidx v1.0.0 // indirect
github.com/yeya24/promlinter v0.2.0 // indirect
Expand All @@ -293,8 +314,8 @@ require (
golang.org/x/tools v0.15.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/protobuf v1.31.1-0.20231027082548-f4a6c1f6e5c1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools v2.2.0+incompatible // indirect
Expand All @@ -304,5 +325,3 @@ require (
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect
)

replace github.com/cometbft/cometbft/test/e2e/app => ./test/e2e/app
Loading
0