Commit Graph

435 Commits

Author SHA1 Message Date
Sekiranda
f4e1d0e1bc
Add marckdowncli linting script, config file and makefile target to enable markdown linting
Signed-off-by: Sekiranda <sekirandahamza@gmail.com>
2025-03-07 16:35:02 +03:00
Ivan Valdes
7e66d3a9fc
scripts/release: Use go mod instead of go list
Replace `go list -m` with `go mod edit -json`, as the latter can return
the same information. This will be helpful when the project migrates to
using a Go workspace, as it will return the current module defined in
go.mod rather than all the modules from the current directory (using a
workspace, the top-level go.mod will return all the child modules from
the repository).

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-03-05 22:50:15 -08:00
Ivan Valdes
cbc14d78e6
scripts: Use go mod instead of go list to get dependencies
Replace `go list -m` with `go mod edit -json`, as the latter can return
the same information. This will be helpful when the project migrates to
using a Go workspace, as it will return the current module defined in
go.mod rather than all the modules from the current directory (using a
workspace, the top-level go.mod will return all the child modules from
the repository).

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-02-21 20:48:15 -08:00
Wei Fu
9d57554c4c proto: add DowngradeProcessInfo in statusResponse
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2025-02-19 17:17:59 -05:00
Ivan Valdes
5c9db9c840
scripts/release: fix typo in "flag"
Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-02-14 09:23:08 -08:00
Ivan Valdes
b1e513cfe9
scripts/release: fix getting version minor for prereleases
The GitHub release templates had the wrong version minor when there's a
prerelease part in the version (i.e., v3.6.0-rc.0). It cut until the
last dot, leaving a wrong minor version (i.e., v3.6.0-rc).

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-02-14 09:23:06 -08:00
Ivan Valdes
6c866548dc
codecov: improve coverage upload
Align running the code coverage upload with other workflows by
executing it from a Makefile target.

Update the current GitHub workflow to call this new target.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-02-07 14:21:26 -08:00
Gang Li
cf258b83aa Squashed commit of the following:
commit 1897d8af05b3627ac4374f1d2fb285fb7af5199e
Author: Gang Li <gangligit@gmail.com>
Date:   Mon Feb 3 16:35:20 2025 -0800

    use uname -s to get os name

    Signed-off-by: Gang Li <gangligit@gmail.com>

commit 889dd974d5873b8c5e7ccd55732279146db1bcc3
Author: Gang Li <gangligit@gmail.com>
Date:   Mon Feb 3 11:34:13 2025 -0800

    download correct binary for mac os

    Signed-off-by: Gang Li <gangligit@gmail.com>

Signed-off-by: Gang Li <gangligit@gmail.com>
2025-02-03 16:51:09 -08:00
Ivan Valdes
0ac24a804d
Refactor scripts/test_images.sh
* Wrap script in functions, add a main function, and call them from it.
* Make environment variables local inside the function scope to avoid
  unexpected behaviors by the running environment-supplied variables.
* Fix the typo in the "REPOSITORY" environment variable.
* Rename the input "IMAGE" to "TEST_IMAGE" to avoid clashing with the
  environment variable from the Prow infrastructure.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-01-30 13:24:51 -08:00
Benjamin Wang
2eca68e345 Add DowngradeVersionTestRequest as a field into InternalRaftRequest
Executed both scripts below again,
- ./scripts/genproto.sh
- ./scripts/update_proto_annotations.sh

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-01-27 09:52:05 +00:00
Benjamin Wang
63fe0f2851 Add DowngradeVersionTestRequest into api/etcdserverpb/rpc.proto for test purpose only
Executed both scripts below,
- ./scripts/genproto.sh
- ./scripts/update_proto_annotations.sh

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-01-27 09:39:41 +00:00
sunfeilong
519a2e3a27
Update release_notes.tpl.txt
Add space between ${ETCD_VER} and Path

Co-authored-by: sunfeilong <31331079+sunfeilong@users.noreply.github.com>
Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-01-09 11:47:06 -08:00
James Blair
9fa35e53f4
Merge pull request #19080 from ArkaSaha30/deps_mgmt_16_12_24
[2024-12-16] Manual Dependency Bump
2024-12-19 23:34:25 +13:00
ArkaSaha30
ce511f6ce8
dependency: bump google.golang.org/protobuf from 1.35.2 to 1.36.0
This commit will bump dependency google.golang.org/protobuf from 1.35.2 to 1.36.0

Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2024-12-19 14:12:22 +05:30
Ivan Valdes
d2d1678f13
scripts: remove receiver name check
This check is duplicated as the project uses revive's receiver-naming,
which is more robust, as the current check may have false positives.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-12-18 22:48:40 -08:00
Ivan Valdes
1dede5f9b3
scripts: remove duplicate bom fix in fix make target
The BOM fix is called from the fix-bom target, which is also a
prerequisite for the fix target. Therefore, running `make fix` runs the
BOM fix twice.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-12-17 21:52:53 -08:00
Benjamin Wang
b29d08623e
Merge pull request #19045 from ivanvc/scripts-simplify-shellws-pass
scripts: fix shellws pass
2024-12-14 08:11:55 +00:00
Ivan Valdes
fad495ad32
scripts: fix shellws check
Originally this was intended to be a clean up. But after further
investigation the original code didn't work. It didn't detect tabs in
shell scripts.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-12-13 12:10:40 -08:00
Ivan Valdes
9d8f2fa157
scripts: simplify mod tidy pass
The original go mod tidy pass implementation was done before the `--diff`
go mod option existed. This simplifies the implementation, as temporary
files are no longer needed.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-12-11 13:29:18 -08:00
Ivan Valdes
e1e1787faf
release: allow to specify version with the "v" prefix
The script currently fails if the version provided has the "v" prefix
(i.e., v3.6.0). Allow receiving the prefix and continue with the
process.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-12-05 15:27:27 -08:00
ArkaSaha30
9c82a17a75
Fix genproto annotations
* Please add etcd_version annotation in *.proto file with next etcd version
* Run ./scripts/genproto.sh
push_pin
* Run ./scripts/update_proto_annotations.sh

Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2024-11-21 15:11:47 +05:30
James Blair
f26f65784a
Add ivanvc as approver for .github, scripts and tools/rw-heatmaps.
Signed-off-by: James Blair <mail@jamesblair.net>
2024-11-15 04:47:52 +13:00
Ivan Valdes
4763cb10f0
release: properly change working dir if tmp location already exists
Currently, the script won't change directories into the previously
cloned repository if the temporary location exists. This may be an issue
when testing first with a dry run and later with the actual release.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-10-30 16:43:51 -07:00
Ivan Valdes
88d2d2472c
release: use GitHub's gh to create GitHub release
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-10-11 13:24:16 -07:00
Benjamin Wang
9fc3b2ad40
Merge pull request #18590 from henrybear327/ci/fix
Add tools/mod to module_dirs
2024-09-19 10:36:12 +01:00
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
Chun-Hung Tseng
fc901bd019 Add tools/mod to module_dirs
As `tools/mod` also contains the `go.mod` file. We should add it to the
`module_dirs` variable, so that when executing `./scripts/fix.sh`, the
proper checks and fixes can be applied.

To address the issue of broken unit tests and code coverage due to the
directory's lack of Go code, we've introduced a new doc.go file. This
file acts as a placeholder, enabling tools like golangci-lint and
go test to function correctly.

---

Discovered when working on https://github.com/etcd-io/etcd/pull/18575

The directories are checked against the following:
- Command: `find . -type f -name go.mod -exec dirname {} \;`
- Output:
```
./etcdutl
.
./tools/testgrid-analysis
./tools/rw-heatmaps
./tools/mod
./etcdctl
./tests
./server
./api
./client/internal/v2
./client/v3
./client/pkg
./pkg
```

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-09-18 14:33:13 +02:00
James Blair
7e8e0bf1f9
Ensure commits are signed in scripts/release.sh.
Signed-off-by: James Blair <mail@jamesblair.net>
2024-09-16 11:31:30 +12:00
Ivan Valdes
ce916fbb38
tests: remove Dockerfile
The tests/Dockerfile was outdated (using an obsolete Ubuntu
distribution), and it's not being used by any workflow or prow job. This
Dockerfile was the only one using `scripts/install-marker.sh`, which
used a vendorized binary generated by the etcd project. This is not
needed anymore, as marker releases now provide the binaries.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-07-26 15:31:38 -07: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
James Blair
059371a02f
Merge pull request #18250 from jmhbnz/main
Remove gsutil acl command for bucket permissions from release.sh
2024-07-04 13:43:54 +12: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
f0246a9f84
Remove gsutil acl command for bucket permissions.
The bucket is already fully public so new releases don't need to run this command.

This will prevent significant terminal spam during the release process as there are thousands of objects in the bucket.

Signed-off-by: James Blair <mail@jamesblair.net>
2024-06-29 17:39:06 +12: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
Ivan Valdes
4881e53677
scripts/release: shallow clone repository
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-05-29 15:14:53 -07:00
Madhav Jivrajani
b915323be6 split out subroutine from fix.sh to makefile target
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-05-14 15:18:30 +05:30
Chun-Hung Tseng
3375e89b11 Fix issue reported by static analyzer
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-05-09 13:58:29 +02:00
Madhav Jivrajani
f6a35f8786 .*: sync go toolchain version and add ability to verify versions
This commit adds a script to sync the version present in .go-version
across all go.mod files as the toolchain directive. As part of that,
this commit also modifies go.mod files that did not have synced toolchain
directives.

Additionally, this also adds a script to verify all toolchain and go
directives against the version present in .go-version as follows:
(1) The go directive <= version in .go-version
(2) The toolchain directive == version in .go-version

This script runs as part of the `make verify` target, making it run
as a presbumit by default.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-05-07 17:52:56 +05:30
Madhav Jivrajani
e094139b05 scripts: default to using .go-version's version for tests and builds
Additionally, provide ability to opt-out of the .go-version and use a
custom one via env vars: FORCE_HOST_GO and GO_VERSION.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-05-07 17:52:56 +05:30
Benjamin Wang
13c0f75b7d
Merge pull request #17877 from tjungblu/17872_status
add quota to endpoint status response
2024-05-03 13:03:23 +01:00
Benjamin Wang
2b1914c262
Merge pull request #17770 from tico88612/feat/update-tools
Test: add tools/rw-heatmaps & tools/testgrid-analysis to module_dirs
2024-04-29 18:35:05 +01:00
zgzhang4
0bd0c4a21b github workflow: drop measure test flakiness
Signed-off-by: zgzhang4 <zgzhang4@iflytek.com>
2024-04-29 23:20:45 +08:00
tico88612
a988f7edc5
script/test_lib: add description about modules
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-04-26 20:08:05 +08:00
tico88612
aa53afdce2
test: add tools/{rw-heatmaps,testgrid-analysis} to module_dirs
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
2024-04-26 20:07:59 +08:00
Thomas Jungblut
bdcff246cb add quota to endpoint status response
This adds the configured backend quota bytes to the endpoint status response.
related discussion in #17821

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2024-04-25 16:44:20 +02:00
Siyuan Zhang
b03368485c testgrid: print out all failed tests for visibility.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-04-12 12:39:38 -07:00
Benjamin Wang
0168c3e1ce
Merge pull request #17662 from siyuanfoundation/flaky
Add script and workflow to detect flaky tests in testgrid.
2024-04-05 16:58:45 +01:00