@@ -41,59 +41,26 @@ jobs:
4141 fail-fast : false
4242 matrix :
4343 sdk :
44- - id : database_sql_table
45- name : database-sql-table
46- path : ./database/sql/table
47- label : database/sql/table
48- run_extra_args : ' '
49- create_extra_args : ' '
50- - id : database_sql_query
51- name : database-sql-query
52- path : ./database/sql/query
53- label : database/sql/query
54- run_extra_args : ' '
55- create_extra_args : ' '
56- - id : native_query
57- name : native-query
58- path : ./native/query
59- label : native/query
60- run_extra_args : ' '
61- create_extra_args : ' '
62- - id : native_table
63- name : native-table
64- path : ./native/table
65- label : native/table
66- run_extra_args : ' '
67- create_extra_args : ' '
68- - id : native_table_over_query_service
69- name : native-table-over-query-service
70- path : ./native/table/over/query/service
71- label : native/table/over/query/service
72- run_extra_args : ' '
73- create_extra_args : ' '
74- - id : native_bulk_upsert
75- name : native-bulk-upsert
76- path : ./native/bulk-upsert
77- label : native/bulk-upsert
78- run_extra_args : ' -batch-size=10'
79- create_extra_args : ' '
80- - id : native_node_hints
81- name : native-node-hints
82- path : ./native/node_hints
83- label : native/node_hints
84- slo_workload_read_max_rps : 100
85- slo_workload_write_max_rps : 100
86- run_extra_args : ' -batch-size=10'
87- create_extra_args : ' -min-partitions-count 10'
88- - id : session_node_hints
89- name : session-node-hints
90- path : ./native/session_node_hints
91- label : native/session_node_hints
92- slo_workload_read_max_rps : 1000
93- slo_workload_write_max_rps : 1
94- run_extra_args : ' -batch-size=10'
95- create_extra_args : ' -min-partitions-count 10'
96-
44+ - name : database-sql-table
45+ path : database/sql/table
46+ - name : database-sql-query
47+ path : database/sql/query
48+ - name : native-query
49+ path : native/query
50+ - name : native-table
51+ path : native/table
52+ - name : native-table-over-query-service
53+ path : native/table-over-query-service
54+ - name : native-bulk-upsert
55+ path : native/bulk-upsert
56+ run_extra_args : " -batch-size=10"
57+ - name : native-table-node-hints
58+ path : native/table-node-hints
59+ run_extra_args : " -batch-size=10"
60+ create_extra_args : " -min-partitions-count 10"
61+ - name : native-query-node-hints
62+ path : native/query-node-hints
63+ create_extra_args : " -min-partitions-count 10"
9764
9865 concurrency :
9966 group : slo-${{ github.ref }}-${{ matrix.sdk.name }}
@@ -176,133 +143,44 @@ jobs:
176143 bash "$SCRIPT" \
177144 --context "$GITHUB_WORKSPACE/current" \
178145 --tag "ydb-app-current" \
179- --ref "${CURRENT_REF}" \
180- --src-path "${{ matrix.sdk.label }}" \
181- --job-name "${{ matrix.sdk.name }}"
146+ --src-path "${{ matrix.sdk.path }}"
182147
183148 bash "$SCRIPT" \
184149 --context "$GITHUB_WORKSPACE/baseline" \
185150 --tag "ydb-app-baseline" \
186- --ref "${{ steps.baseline.outputs.ref }}" \
187- --src-path "${{ matrix.sdk.label }}" \
188- --job-name "${{ matrix.sdk.name }}" \
189- --fallback-image "ydb-app-current"
151+ --src-path "${{ matrix.sdk.path }}"
190152
191- - name : Initialize YDB SLO
192- id : ydb_slo
193- uses : ydb-platform/ydb-slo-action/init@13c687b7d4b2879da79dd12932dee0ed2b65dd1c
153+ - name : Run SLO Tests
154+ uses : ydb-platform/ydb-slo-action/init@v2
155+ timeout-minutes : 30
194156 with :
195157 github_issue : ${{ github.event.inputs.github_issue }}
196158 github_token : ${{ secrets.GITHUB_TOKEN }}
197159 workload_name : ${{ matrix.sdk.name }}
160+ workload_duration : ${{ inputs.slo_workload_duration_seconds || '600' }}
198161 workload_current_ref : ${{ github.head_ref || github.ref_name }}
162+ workload_current_image : ydb-app-current
199163 workload_baseline_ref : ${{ steps.baseline.outputs.ref }}
200- # to disable chaos testing for node hint workloads
201- disable_compose_profiles : " ${{ (matrix.sdk.id == 'native_node_hints ' || matrix.sdk.id == 'session_node_hints ') && 'chaos' || '' }}"
164+ workload_baseline_image : ydb-app-current
165+ disable_compose_profiles : " ${{ (matrix.sdk.name == 'native-table-node-hints ' || matrix.sdk.name == 'native-query-node-hints ') && 'chaos' || '' }}"
202166 metrics_yaml : |
203167 metrics:
204168 - name: node_hints_misses
205169 type: instant
206170 query: sum by(ref) (workload_node_hints_misses)
207171
208- - name : Prepare SLO Database
209- run : |
210- echo "Preparing SLO database..."
211- CREATE_EXTRA_ARGS="${{ matrix.sdk.create_extra_args }}"
212- docker run --rm --network ydb_ydb-net \
213- --add-host "ydb:172.28.0.11" \
214- --add-host "ydb:172.28.0.12" \
215- --add-host "ydb:172.28.0.13" \
216- --add-host "ydb:172.28.0.99" \
217- ydb-app-current create grpc://ydb:2136 /Root/testdb $CREATE_EXTRA_ARGS
218-
219- - name : Run SLO Tests (parallel)
220- timeout-minutes : 15
221- env :
222- DURATION : ${{ matrix.sdk.slo_workload_duration_seconds || 600 }}
223- READ_RPS : ${{ matrix.sdk.slo_workload_read_max_rps || 1000 }}
224- WRITE_RPS : ${{ matrix.sdk.slo_workload_write_max_rps || 1000 }}
225- RUN_EXTRA_ARGS : ${{ format('{0} -prometheus-endpoint {1}',matrix.sdk.run_extra_args,steps.ydb_slo.outputs.ydb-prometheus-url)}}
226- run : |
227- ARGS="run grpc://ydb:2136 /Root/testdb \
228- -otlp-endpoint prometheus:9090 \
229- -report-period 250 \
230- -time $DURATION \
231- -read-rps $READ_RPS \
232- -write-rps $WRITE_RPS \
233- -read-timeout 100 \
234- -write-timeout 100 \
235- $RUN_EXTRA_ARGS"
236-
237- echo "Starting ydb-app-current..."
238- docker run -d \
239- --name ydb-app-current \
240- --network ydb_ydb-net \
241- --add-host "ydb:172.28.0.11" \
242- --add-host "ydb:172.28.0.12" \
243- --add-host "ydb:172.28.0.13" \
244- --add-host "ydb:172.28.0.99" \
245- ydb-app-current $ARGS
246-
247- echo "Starting ydb-app-baseline..."
248- docker run -d \
249- --name ydb-app-baseline \
250- --network ydb_ydb-net \
251- --add-host "ydb:172.28.0.11" \
252- --add-host "ydb:172.28.0.12" \
253- --add-host "ydb:172.28.0.13" \
254- --add-host "ydb:172.28.0.99" \
255- ydb-app-baseline $ARGS
256-
257- # Show initial logs
258- echo ""
259- echo "==================== INITIAL CURRENT LOGS ===================="
260- docker logs -n 15 ydb-app-current 2>&1 || echo "No current container"
261- echo ""
262- echo "==================== INITIAL BASELINE LOGS ===================="
263- docker logs -n 15 ydb-app-baseline 2>&1 || echo "No baseline container"
264- echo ""
265-
266- # Wait for workloads to complete
267- echo "Waiting for workloads to complete (${DURATION}s)..."
268- sleep ${DURATION}
269-
270- # Stop containers after workload duration and wait for graceful shutdown
271- echo "Stopping containers after ${DURATION}s..."
272- docker stop --timeout=30 ydb-app-current ydb-app-baseline 2>&1 || true
273-
274- # Force kill if still running
275- docker kill ydb-app-current ydb-app-baseline 2>&1 || true
276-
277- # Check exit codes
278- CURRENT_EXIT=$(docker inspect ydb-app-current --format='{{.State.ExitCode}}' 2>/dev/null || echo "1")
279- BASELINE_EXIT=$(docker inspect ydb-app-baseline --format='{{.State.ExitCode}}' 2>/dev/null || echo "0")
280-
281- echo "Current container exit code: $CURRENT_EXIT"
282- echo "Baseline container exit code: $BASELINE_EXIT"
283-
284- # Show final logs
285- echo ""
286- echo "==================== FINAL CURRENT LOGS ===================="
287- docker logs -n 15 ydb-app-current 2>&1 || echo "No current container"
288- echo ""
289- echo "==================== FINAL BASELINE LOGS ===================="
290- docker logs -n 15 ydb-app-baseline 2>&1 || echo "No baseline container"
291- echo ""
292-
293- echo "SUCCESS: Workloads completed successfully"
294-
295- - if : always()
296- name : Store logs
297- run : |
298- docker logs ydb-app-current > current.log 2>&1 || echo "No current container"
299- docker logs ydb-app-baseline > baseline.log 2>&1 || echo "No baseline container"
300-
301- - if : always()
302- uses : actions/upload-artifact@v4
172+ ydb-slo-report :
173+ if : always()
174+ needs : ydb-slo-action
175+ runs-on : ubuntu-latest
176+ name : Publish YDB SLO Report
177+ permissions :
178+ checks : write
179+ contents : read
180+ pull-requests : write
181+ steps :
182+ - name : Publish YDB SLO Report
183+ uses : ydb-platform/ydb-slo-action/report@v2
303184 with :
304- name : ${{matrix.sdk.name}}-logs
305- path : |
306- ./current.log
307- ./baseline.log
308- retention-days : 1
185+ github_token : ${{ secrets.GITHUB_TOKEN }}
186+ github_run_id : ${{ github.run_id }}
0 commit comments