59 Commits

Author SHA1 Message Date
mevrin
5b2faec983
fea: Remane modules_exp to modules_for_bom to improve code and clarity
Signed-off-by: mevrin <matthieu.evrin@gmail.com>
2024-09-18 21:45:07 -04:00
Ivan Valdes
4f9cd336a6
marker: use released binary when running markdown lint
The markdown linter, marker, now publishes a released version with the
tool. Given that this project is written in Rust, running this check can
now be done by using the statically compiled binary without having the
Rust local environment.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-07-13 15:54:46 -07:00
Ivan Valdes
ba4b2bffeb
make: Include tools/mod when checking dependency versions
As tools/mod is not part of the test library's modules, the check to verify
consistent dependency versions ignored it. Explicitly get the dependencies from
this module when running verify-dep.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-07-03 15:21:31 -07:00
James Blair
29b4ff2fd8
Bump shellcheck to latest 2024 release.
Signed-off-by: James Blair <mail@jamesblair.net>
2024-06-24 11:24:31 +12:00
Ivan Valdes
dfda61bbbf
make: fix verify-dep
Makefile's target `verify-dep` current behavior is to use `go list` to
check consistent dependency versions from direct dependencies. Ignoring
indirect dependencies in a multi-module project could lead to version
mismatches. If module A imports module B, module B's dependency will be
an indirect dependency in module A. Which can potentially have a version
mismatch. Therefore, use `go mod edit` with indirect dependencies, too.
So it can work with all dependencies defined in go.mod.

Fix displaying dependencies with mismatches, as the old code was
searching with grep just for the prefix, which would show other
dependencies that shared the same prefix.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-06-19 09:02:17 -07:00
Ivan Valdes
043096067f
Add run-govulncheck Makefile target
Add a `Makefile` target to run govuln across the submodules. So, it can
be imported into a prow job.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-06-15 15:47:13 -07:00
Chun-Hung Tseng
1579c57729 Update codecov config to support commenting code coverage in PRs
Add missing directory fixing go.etcd.io/etcd/etcdutl/v3/::etcdutl/

Note: we have some of the tests written in a way that is
non-deterministic across runs, thus, even when there is no code changes
there might still have slight variation for test coverage [2]

Reference:
[1] https://github.com/etcd-io/etcd/issues/18131
[2] https://docs.codecov.com/docs/unexpected-coverage-changes#reasons-for-indirect-changes

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-06-12 11:23:31 +02:00
thirdkeyword
fbda591866 fix some typos
Signed-off-by: thirdkeyword <fliterdashen@gmail.com>
2024-03-25 10:34:44 +08:00
Tessa Pham
2b7e1c6f82 fix scripts
Signed-off-by: Tessa Pham <hpham111@bloomberg.net>
2023-11-08 00:27:13 -06:00
Tessa Pham
c4499adfd5 replace archived repo in BOM check
Signed-off-by: Tessa Pham <hpham111@bloomberg.net>
2023-11-07 17:41:11 -06:00
Wei Fu
aea1cd0077 feat: enable unparam lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-17 21:24:13 +08:00
Wei Fu
81fe610bd5 *: enable markdown_marker checker
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-13 14:00:25 +08:00
Benjamin Wang
8e1713dda1
Merge pull request #16714 from fuweid/clean-unconvert_pass
*: cleanup unconvert_pass and remove revive tools
2023-10-09 19:38:19 +01:00
Wei Fu
0ec6181466 scripts: remove unconvert_pass
The `unconvert` has been migrated into golingci-lint.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-09 23:27:48 +08:00
Wei Fu
093ec7a11d scripts: remove the markdown_you_pass
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-08 15:20:30 +08:00
Wei Fu
5878f346ba *: migrate nakedret into golangci-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-07 22:29:43 +08:00
Wei Fu
07effc4d0a *: fix revive linter
Remove old revive_pass in the bash scripts and migirate the revive.toml
into golangci linter_settings.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-24 14:21:11 +08:00
Wei Fu
46df6abb03 *: remove goimports(_fix)_pass and add lint_fix_pass
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:18:36 +08:00
Wei Fu
502879405f *: lint_pass should use global golangci.yaml
Disable failed linters and enable it by #16610.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 16:10:45 +08:00
Wei Fu
2b1e181c8b *: Use golangcilint_pass to run staticcheck and ineffassign
Copy the tools/.golangci.yaml and run the linters for which we have
already fixed. The temp .golangci.yaml will be removed when we fixes all
the linters' issues.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 12:34:17 +08:00
Wei Fu
9c3edfa0af *: fix staticcheck lint
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to
follow the correct usage of context. Similar patch to #8901.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 11:24:26 +08:00
Wei Fu
df86cadd8b *: fix ineffassign lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 22:19:19 +08:00
Wei Fu
5e3910d96c *: fix govet-shadow lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 20:24:01 +08:00
Wei Fu
e72c2c40d4 *: fix nakedret lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-17 23:52:41 +08:00
Shyam Jeedigunta
83f20f61cb Fix make test targets when empty bash args provided
Signed-off-by: Shyam Jeedigunta <jeedigv@amazon.com>
2023-08-18 11:56:13 -07:00
Benjamin Wang
acfa46c02b replace github.com/gyuho/gocovmerge with github.com/alexfalkowski/gocovmerge
github.com/gyuho/gocovmerge has already been removed or turned into
a private repo. I believe it's also forked from github.com/wadey/gocovmerge.
So replace it with the original repo github.com/alexfalkowski/gocovmerge.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-07 20:13:04 +01:00
James Blair
5b9b303fa7
Simplify go data race detection control.
Use data race detection by default for all amd64 and arm64 tests.

Remove redundant parameters in github workflows.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-27 23:49:09 +12:00
James Blair
3ff0128842
Fix obtaining UPGRADE_VER in test.sh
Obtain tags from git ls-remote to avoid reliance on local repository state.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-18 21:57:51 +12:00
Rajalakshmi Girish
ac61b36e06 Add an option to keep_going with run for modules on failure
Signed-off-by: Rajalakshmi Girish <rajalakshmi.girish1@ibm.com>
2023-05-07 00:43:30 -07:00
Rajalakshmi Girish
c9998a7e63 keep_going with other suites when failure with one
Signed-off-by: Rajalakshmi Girish <rajalakshmi.girish1@ibm.com>
2023-05-03 00:57:49 -07:00
Marek Siarkowicz
be7be34800 client: Hide v2 client package
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-31 10:26:11 +02:00
James Blair
5faad23812
Merge branch 'main' into remove_e2e_calc 2023-03-30 16:46:31 +13:00
James Blair
0bd94bbae5
Remove defunct build_cov target.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 16:30:11 +13:00
Marek Siarkowicz
5223d09d41
Merge pull request #14838 from serathius/linearizability-docs
tests: Document robustness tests
2023-03-28 16:22:09 +02:00
Marek Siarkowicz
d03ac88b36 tests: Document robustness tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-28 15:08:43 +02:00
Wei Fu
1fcb782780 chore: introduce strict bash mode for scripts,.github
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-22 18:00:41 +08:00
James Blair
3573d791e4
Remove e2e from coverage calculation.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-22 09:52:25 +13:00
Hanning Lin
8bc6b289fb add new goimport_pass
Signed-off-by: Hanning Lin <liam.hanninglin@outlook.com>
2023-03-16 05:50:17 +00:00
Marek Siarkowicz
d475cf81a0 tests: Rename linearizability tests to robustness
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-26 14:36:18 +01:00
Marek Siarkowicz
5f68ecc1ef tests: Remove functional testing as they were replaced by linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-11 13:20:44 +01:00
Piotr Tabor
5a28a02b97 ./scripts/fix.sh: Takes care of goimports across the whole project.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-28 16:37:55 +01:00
guiyong.ou
4f238837aa Make sure shellcheck exist
Signed-off-by: guiyong.ou <guiyong.ou@daocloud.io>
2022-12-05 15:36:16 +08:00
Benjamin Wang
b1cdf16988 scripts: cleanup raft from all script files
No need to generate proto file;
No need to test coverage for raft;
No need to run any test for raft module;
NO need to run any test for raftexample;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:58:11 +08:00
spacewander
e73a25a1d0 ci: ensure the generated code is up-to-date
See https://github.com/etcd-io/etcd/pull/14612#issue-1419792069
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-10-31 19:58:21 +08:00
Marek Siarkowicz
069e26e284 tests: Validate etcd linearizability
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-23 06:41:38 +02:00
Benjamin Wang
328a33668b functional_test: stop etcd and cleanup data when test is successful
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-09 09:23:13 +08:00
Benjamin Wang
742c925a27
Merge pull request #14387 from lavacat/main-functional
functional: remove SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT command
2022-10-09 08:25:25 +08:00
Marek Siarkowicz
b8347edf3b makefile: Split fmt into separate verify commands
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-16 22:37:10 +02:00
Bogdan Kanivets
c31d758189 functional: remove SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT command
Problem: both SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT and test.sh
will attempt to stop agents and remove directories.

Solution: since test.sh creates directories and starts test, it should be
responsible for cleanup.

See https://github.com/etcd-io/etcd/issues/14384

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-09-15 10:55:32 -07:00
Benjamin Wang
d8ee37641d Cleanup all etcd-agent and etcd processes when the test finishes
There are two cases, when interrupted by users, then forcibly kill
all processes. Otherwise, gracefully terminate all processes.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-18 17:15:39 +08:00