-
Notifications
You must be signed in to change notification settings - Fork 71
136 lines (121 loc) · 4.46 KB
/
Copy pathslo.yml
File metadata and controls
136 lines (121 loc) · 4.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: SLO
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
github_pull_request_number:
required: true
slo_workload_duration_seconds:
default: '600'
required: false
slo_workload_read_max_rps:
default: '1000'
required: false
slo_workload_write_max_rps:
default: '100'
required: false
jobs:
ydb-slo-action:
if: (!contains(github.event.pull_request.labels.*.name, 'no slo'))
name: Run YDB SLO Tests
runs-on: ubuntu-latest
strategy:
matrix:
include:
- prefix: table
workload: sync-table
create-args: grpc://localhost:2135 /Root/testdb
run-args: |
grpc://localhost:2135 /Root/testdb \
--prom-pgw localhost:9091 \
--report-period 250 \
--time ${{inputs.slo_workload_duration_seconds || 600}} \
--read-rps ${{inputs.slo_workload_read_max_rps || 1000}} \
--write-rps ${{inputs.slo_workload_write_max_rps || 100}} \
--read-timeout 1000 \
--write-timeout 1000
cleanup-args: grpc://localhost:2135 /Root/testdb
- prefix: table
workload: sync-query
create-args: grpc://localhost:2135 /Root/testdb
run-args: |
grpc://localhost:2135 /Root/testdb \
--prom-pgw localhost:9091 \
--report-period 250 \
--time ${{inputs.slo_workload_duration_seconds || 600}} \
--read-rps ${{inputs.slo_workload_read_max_rps || 1000}} \
--write-rps ${{inputs.slo_workload_write_max_rps || 100}} \
--read-timeout 1000 \
--write-timeout 1000
cleanup-args: grpc://localhost:2135 /Root/testdb
# - prefix: topic
# workload: topic-basic
# create-args: |
# grpc://localhost:2135 /Root/testdb \
# --path /Root/testdb/slo_topic \
# --partitions-count 10
# run-args: |
# grpc://localhost:2135 /Root/testdb \
# --path /Root/testdb/slo_topic \
# --prom-pgw localhost:9091 \
# --partitions-count 10 \
# --read-threads 10 \
# --write-threads 10 \
# --report-period 250 \
# --time ${{inputs.slo_workload_duration_seconds || 600}} \
# --read-rps ${{inputs.slo_workload_read_max_rps || 100}} \
# --write-rps ${{inputs.slo_workload_write_max_rps || 100}} \
# --read-timeout 5000 \
# --write-timeout 5000
# cleanup-args: grpc://localhost:2135 /Root/testdb --path /Root/testdb/slo_topic
concurrency:
group: slo-${{ github.ref }}-${{ matrix.workload }}
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python3
uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --no-cache-dir --upgrade pip
python -m pip install --no-cache-dir -e .
python -m pip install --no-cache-dir -r tests/slo/requirements.txt
- name: Initialize YDB SLO
uses: ydb-platform/ydb-slo-action/init@main
with:
github_pull_request_number: ${{ github.event.inputs.github_pull_request_number }}
github_token: ${{ secrets.GITHUB_TOKEN }}
workload_name: ${{ matrix.workload }}
ydb_database_node_count: 5
- name: Prepare SLO Database
run: |
python ./tests/slo/src ${{ matrix.prefix }}-create ${{ matrix.create-args }}
- name: Run SLO Tests
env:
REF: '${{ github.head_ref || github.ref }}'
WORKLOAD: '${{ matrix.workload }}'
run: |
python ./tests/slo/src ${{ matrix.prefix }}-run ${{ matrix.run-args }}
- if: always()
name: Cleanup SLO Database
run: |
python ./tests/slo/src ${{ matrix.prefix }}-cleanup ${{ matrix.cleanup-args }}
- if: always()
name: Store ydb chaos testing logs
run: |
docker logs ydb-chaos > chaos-ydb.log
- if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.workload }}-chaos-ydb.log
path: ./chaos-ydb.log
retention-days: 1