Skip to content

Allow testing multiple etcd releases #20013

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 1 commit into from
May 27, 2025

Conversation

nwnt
Copy link
Member

@nwnt nwnt commented May 23, 2025

Fix #19944

@k8s-ci-robot k8s-ci-robot added area/testing github_actions Pull requests that update GitHub Actions code size/L labels May 23, 2025
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.78%. Comparing base (882713c) to head (d965118).
Report is 44 commits behind head on main.

Additional details and impacted files

see 22 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #20013      +/-   ##
==========================================
- Coverage   68.81%   68.78%   -0.04%     
==========================================
  Files         424      424              
  Lines       35744    35756      +12     
==========================================
- Hits        24599    24595       -4     
- Misses       9724     9739      +15     
- Partials     1421     1422       +1     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 882713c...d965118. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nwnt
Copy link
Member Author

nwnt commented May 23, 2025

Hmmmm not sure why CI is complaining about the note blockquote lines...

Found broken reference (!NOTE -> ) at /home/prow/go/src/github.com/etcd-io/etcd/tests/antithesis/README.md:14
Found broken reference (!NOTE -> ) at /home/prow/go/src/github.com/etcd-io/etcd/tests/antithesis/README.md:40

email_recipients: ${{ inputs.email }}
test_name: ${{ inputs.test }}
additional_parameters: |-
custom.duration = ${{ inputs.duration }}
Copy link
Member

Choose a reason for hiding this comment

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

@marcus-hodgson-antithesis, on previous meetings you mentioned "source" parameters that would allow us to separate testing for different code branches. How can we pass it?

I don't see anything like this in https://antithesis.com/docs/using_antithesis/ci/.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can track this as a separate issue. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

It should be a small change, we just need confirmation from @marcus-hodgson-antithesis

Choose a reason for hiding this comment

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

@serathius, I know that passing it through the "additional_parameters" as "antithesis.source = ..." will work. I am not 100% about having "source: " be under the "with: " (but I will confirm).

But you are right, this should be under our documentation. Thanks for pointing this out!

@nwnt nwnt force-pushed the nwnt/test-multiple-etcd-releases branch from 558d94b to 8da3a61 Compare May 24, 2025 04:03
@nwnt nwnt force-pushed the nwnt/test-multiple-etcd-releases branch from 8da3a61 to 00076bb Compare May 24, 2025 04:21
@nwnt nwnt force-pushed the nwnt/test-multiple-etcd-releases branch from 00076bb to d8de9ed Compare May 24, 2025 14:31
@nwnt
Copy link
Member Author

nwnt commented May 24, 2025

/retest

@nwnt
Copy link
Member Author

nwnt commented May 25, 2025

@serathius is the above test failure something I can do to fix?

@serathius
Copy link
Member

@serathius is the above test failure something I can do to fix?

No


.PHONY: antithesis-docker-compose-up
antithesis-docker-compose-up:
export USER_ID=$(USER_ID) && export GROUP_ID=$(GROUP_ID) && docker-compose up
export USER_ID=$(USER_ID); export GROUP_ID=$(GROUP_ID); export VERSION=$(REF); docker-compose up
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export USER_ID=$(USER_ID); export GROUP_ID=$(GROUP_ID); export VERSION=$(REF); docker-compose up
export USER_ID=$(USER_ID); export GROUP_ID=$(GROUP_ID); docker-compose up

@@ -2,34 +2,44 @@ REPOSITORY_ROOT := $(shell git rev-parse --show-toplevel)
USER_ID := $(shell id -u)
GROUP_ID := $(shell id -g)
ARCH ?= $(shell go env GOARCH)
REF = HEAD
Copy link
Member

Choose a reason for hiding this comment

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

Not a huge fun of building from HEAD, what about unstaged changes? In robustness tests we have separate target for local running on local code and branch:

Local run assumes that etcd is already build and available in ./bin directory. User just need to call make build before.

etcd/Makefile

Lines 64 to 66 in b7db556

.PHONY: test-robustness
test-robustness:
PASSES="robustness" ./scripts/test.sh $(GO_TEST_FLAGS)

For building from branches the build and run is combined.

.PHONY: test-robustness-main
test-robustness-main: /tmp/etcd-main-failpoints/bin /tmp/etcd-release-3.6-failpoints/bin
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-main-failpoints/bin --bin-last-release=/tmp/etcd-release-3.6-failpoints/bin/etcd" $(TOPLEVEL_MAKE) test-robustness
.PHONY: test-robustness-release-3.6
test-robustness-release-3.6: /tmp/etcd-release-3.6-failpoints/bin /tmp/etcd-release-3.5-failpoints/bin
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.6-failpoints/bin --bin-last-release=/tmp/etcd-release-3.5-failpoints/bin/etcd" $(TOPLEVEL_MAKE) test-robustness
.PHONY: test-robustness-release-3.5
test-robustness-release-3.5: /tmp/etcd-release-3.5-failpoints/bin /tmp/etcd-release-3.4-failpoints/bin
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.5-failpoints/bin --bin-last-release=/tmp/etcd-release-3.4-failpoints/bin/etcd" $(TOPLEVEL_MAKE) test-robustness
.PHONY: test-robustness-release-3.4
test-robustness-release-3.4: /tmp/etcd-release-3.4-failpoints/bin
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.4-failpoints/bin" $(TOPLEVEL_MAKE) test-robustness

Copy link
Member Author

@nwnt nwnt May 27, 2025

Choose a reason for hiding this comment

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

How about the latest one I just pushed? I added a new target called antithesis-build-etcd-image-local which will build with unstaged and untracked local changes. This will allow building the current branch without having to stash the changes.

This involved a bit of refactoring, but I tested them all this time.

@nwnt nwnt force-pushed the nwnt/test-multiple-etcd-releases branch from d8de9ed to bae74bb Compare May 27, 2025 03:11
@serathius serathius force-pushed the nwnt/test-multiple-etcd-releases branch from bae74bb to d965118 Compare May 27, 2025 07:31
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nwnt, serathius

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link

k8s-ci-robot commented May 27, 2025

@nwnt: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci-etcd-robustness-release36-amd64 d8de9ed link true /test ci-etcd-robustness-release36-amd64

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@serathius
Copy link
Member

/retest

@serathius serathius merged commit 6115db5 into etcd-io:main May 27, 2025
29 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/testing github_actions Pull requests that update GitHub Actions code size/M
Development

Successfully merging this pull request may close these issues.

[Antithesis] Test multiple etcd releases
4 participants