mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #15106 from serathius/linearizability-nightly-release
Add linearizability nightlies for release 3.4/3.5
This commit is contained in:
commit
677e5281e0
37
.github/workflows/linearizability-nightly.yaml
vendored
37
.github/workflows/linearizability-nightly.yaml
vendored
@ -1,25 +1,26 @@
|
|||||||
name: Linearizability Nightly
|
name: Linearizability Nightly
|
||||||
on:
|
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:
|
schedule:
|
||||||
- cron: '25 9 * * *'
|
- cron: '25 9 * * *' # runs every day at 09:25 UTC
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test-main:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# GHA has a maximum amount of 6h execution time, we try to get done within 3h
|
# GHA has a maximum amount of 6h execution time, we try to get done within 3h
|
||||||
timeout-minutes: 180
|
uses: ./.github/workflows/linearizability-template.yaml
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
|
||||||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
|
||||||
with:
|
with:
|
||||||
go-version: "1.19.5"
|
ref: main
|
||||||
- run: |
|
count: 300
|
||||||
make gofail-enable
|
timeoutDuration: 170m
|
||||||
make build
|
test-35:
|
||||||
mkdir -p /tmp/linearizability
|
uses: ./.github/workflows/linearizability-template.yaml
|
||||||
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:
|
with:
|
||||||
path: /tmp/linearizability/*
|
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
.github/workflows/linearizability-template.yaml
vendored
Normal file
49
.github/workflows/linearizability-template.yaml
vendored
Normal file
@ -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
|
||||||
|
;;
|
||||||
|
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/*
|
19
.github/workflows/linearizability.yaml
vendored
19
.github/workflows/linearizability.yaml
vendored
@ -3,19 +3,8 @@ on: [push, pull_request]
|
|||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/linearizability-template.yaml
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
|
||||||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
|
||||||
with:
|
with:
|
||||||
go-version: "1.19.5"
|
ref: ${{ github.ref }}
|
||||||
- run: |
|
count: 60
|
||||||
make gofail-enable
|
testTimeout: 30m
|
||||||
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/*
|
|
||||||
|
23
Makefile
23
Makefile
@ -129,6 +129,29 @@ gofail-disable: install-gofail
|
|||||||
install-gofail:
|
install-gofail:
|
||||||
cd tools/mod; go install go.etcd.io/gofail@${GOFAIL_VERSION}
|
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
|
# Cleanup
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user