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

Add linearizability nightlies for release 3.4/3.5 #15106

Merged
merged 1 commit into from
Jan 16, 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
41 changes: 21 additions & 20 deletions .github/workflows/linearizability-nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
name: Linearizability Nightly
on:
# schedules always run against the main branch
# schedules always run against the main branch, hence we have to create separate jobs
# with individual checkout actions for each of the active release branches
schedule:
- cron: '25 9 * * *'
- cron: '25 9 * * *' # runs every day at 09:25 UTC
jobs:
test:
runs-on: ubuntu-latest
test-main:
# GHA has a maximum amount of 6h execution time, we try to get done within 3h
timeout-minutes: 180
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: "1.19.5"
- run: |
make gofail-enable
make build
mkdir -p /tmp/linearizability
cat server/etcdserver/raft.fail.go
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count 300 --failfast --run TestLinearizability --timeout=170m' RESULTS_DIR=/tmp/linearizability make test-linearizability
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: always()
with:
path: /tmp/linearizability/*
uses: ./.github/workflows/linearizability-template.yaml
with:
ref: main
count: 300
timeoutDuration: 170m
test-35:
uses: ./.github/workflows/linearizability-template.yaml
with:
ref: release-3.5
count: 300
timeoutDuration: 170m
test-34:
uses: ./.github/workflows/linearizability-template.yaml
with:
ref: release-3.4
count: 300
timeoutDuration: 170m
49 changes: 49 additions & 0 deletions .github/workflows/linearizability-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Reusable Linearizability Workflow
on:
workflow_call:
inputs:
ref:
required: true
type: string
count:
required: true
type: number
testTimeout:
required: false
type: string
default: '30m'
permissions: read-all
jobs:
test:
timeout-minutes: 180
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: '1.19.5'
- name: build
env:
GITHUB_REF: ${{ inputs.ref }}
run: |
case "${GITHUB_REF}" in
release-3.5)
make build-failpoints-release-3.5
./bin/etcd --version
;;
release-3.4)
make build-failpoints-release-3.4
./bin/etcd --version
;;
*)
make gofail-enable
make build
;;
Comment on lines +38 to +41
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
*)
make gofail-enable
make build
;;
main)
make gofail-enable
make build
./bin/etcd --version
;;
*)
echo "Invalid GITHUB_REF: ${GITHUB_REF}"
exit 1
;;

Copy link
Member Author

Choose a reason for hiding this comment

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

That's not correct because on PR we get GITHUB_REF=refs/pull/<pr_number>/merge

esac
- name: test-linearizability
run: |
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestLinearizability' RESULTS_DIR=/tmp/linearizability make test-linearizability
- uses: actions/upload-artifact@v2
if: always()
with:
path: /tmp/linearizability/*
21 changes: 5 additions & 16 deletions .github/workflows/linearizability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@ on: [push, pull_request]
permissions: read-all
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: "1.19.5"
- run: |
make gofail-enable
make build
mkdir -p /tmp/linearizability
cat server/etcdserver/raft.fail.go
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count 60 --failfast --run TestLinearizability' RESULTS_DIR=/tmp/linearizability make test-linearizability
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: always()
with:
path: /tmp/linearizability/*
uses: ./.github/workflows/linearizability-template.yaml
with:
ref: ${{ github.ref }}
count: 60
testTimeout: 30m
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,29 @@ gofail-disable: install-gofail
install-gofail:
cd tools/mod; go install go.etcd.io/gofail@${GOFAIL_VERSION}

build-failpoints-release-3.5:
rm -rf /tmp/etcd-release-3.5/
mkdir -p /tmp/etcd-release-3.5/
cd /tmp/etcd-release-3.5/; \
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}); \
(cd etcdctl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
(cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \
FAILPOINTS=true ./build;
mkdir -p ./bin
cp /tmp/etcd-release-3.5/bin/etcd ./bin/etcd

build-failpoints-release-3.4:
rm -rf /tmp/etcd-release-3.4/
mkdir -p /tmp/etcd-release-3.4/
cd /tmp/etcd-release-3.4/; \
git clone --depth 1 --branch release-3.4 https://github.com/etcd-io/etcd.git .; \
go get go.etcd.io/gofail@${GOFAIL_VERSION}; \
FAILPOINTS=true ./build;
mkdir -p ./bin
cp /tmp/etcd-release-3.4/bin/etcd ./bin/etcd

# Cleanup

clean:
Expand Down