Skip to content
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

Ensure proper gofail package version in robustness tests #18397

Merged
merged 1 commit into from
Aug 2, 2024
Merged
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
7 changes: 4 additions & 3 deletions tests/robustness/makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum
(cd server; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd etcdctl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
FAILPOINTS=true ./build;

/tmp/etcd-v3.5.12-beforeSendWatchResponse/bin: $(GOPATH)/bin/gofail
Expand All @@ -124,9 +125,7 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum
cd /tmp/etcd-release-3.5-failpoints/; \
git clone --depth 1 --branch release-3.5 https://github.com/etcd-io/etcd.git .; \
go get go.etcd.io/gofail@${GOFAIL_VERSION}; \
(cd server; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason that for /tmp/etcd-v3.5.12-beforeSendWatchResponse/bin we keep

(cd server; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd etcdctl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ 

but we remove those for /tmp/etcd-release-3.5-failpoints/bin? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

We know that release branch has the tools/mod directory, however for tags we don't know. Some of them might have it, some don't.

Copy link
Contributor

Choose a reason for hiding this comment

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

But we will always have server, etcdctl, and etcdutl directories, so we will always need to go get the gofail library for them, no? :)

Copy link
Member

Choose a reason for hiding this comment

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

The build.sh will execute the go get go.etcd.io/gofail@${GOFAIL_VERSION}) commands for all servers, etcdutl, etcdctl and tests., so it's OK to remove the duplicated commands in makefile.

etcd/build.sh

Lines 33 to 36 in d83c8bd

cd ./server && go get go.etcd.io/gofail@"${GOFAIL_VERSION}"
cd ../etcdutl && go get go.etcd.io/gofail@"${GOFAIL_VERSION}"
cd ../etcdctl && go get go.etcd.io/gofail@"${GOFAIL_VERSION}"
cd ../tests && go get go.etcd.io/gofail@"${GOFAIL_VERSION}"

(cd etcdctl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
FAILPOINTS=true ./build;

/tmp/etcd-v3.4.23-failpoints/bin:
Expand All @@ -136,6 +135,7 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum
cd /tmp/etcd-v3.4.$*-failpoints/; \
git clone --depth 1 --branch v3.4.$* https://github.com/etcd-io/etcd.git .; \
go get go.etcd.io/gofail@${GOFAIL_VERSION}; \
(cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
FAILPOINTS=true ./build;

/tmp/etcd-release-3.4-failpoints/bin: $(GOPATH)/bin/gofail
Expand All @@ -144,4 +144,5 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum
cd /tmp/etcd-release-3.4-failpoints/; \
git clone --depth 1 --branch release-3.4 https://github.com/etcd-io/etcd.git .; \
go get go.etcd.io/gofail@${GOFAIL_VERSION}; \
(cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
FAILPOINTS=true ./build;
Loading