Skip to content

Commit 85e84dd

Browse files
committed
update ydb-slo-action for new workload
1 parent 0f73166 commit 85e84dd

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

.github/workflows/slo.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,44 @@ jobs:
4545
name: database-sql-table
4646
path: ./database/sql/table
4747
label: database/sql/table
48+
run_extra_args: ''
49+
create_extra_args: ''
4850
- id: database_sql_query
4951
name: database-sql-query
5052
path: ./database/sql/query
5153
label: database/sql/query
54+
run_extra_args: ''
55+
create_extra_args: ''
5256
- id: native_query
5357
name: native-query
5458
path: ./native/query
5559
label: native/query
60+
run_extra_args: ''
61+
create_extra_args: ''
5662
- id: native_table
5763
name: native-table
5864
path: ./native/table
5965
label: native/table
66+
run_extra_args: ''
67+
create_extra_args: ''
6068
- id: native_table_over_query_service
6169
name: native-table-over-query-service
6270
path: ./native/table/over/query/service
6371
label: native/table/over/query/service
72+
run_extra_args: ''
73+
create_extra_args: ''
6474
- id: native_bulk_upsert
6575
name: native-bulk-upsert
6676
path: ./native/bulk-upsert
6777
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+
run_extra_args: '-prometheus-endpoint http://172.28.0.2:9090 -batch-size=10'
85+
create_extra_args: '-min-partitions-count 10'
6886

6987
concurrency:
7088
group: slo-${{ github.ref }}-${{ matrix.sdk.name }}
@@ -180,35 +198,33 @@ jobs:
180198
fi
181199
182200
- name: Initialize YDB SLO
183-
uses: ydb-platform/ydb-slo-action/init@main
201+
uses: ydb-platform/ydb-slo-action/init@21473ae781c9bc8f16b42dedc79489c1867c6e50
184202
with:
185203
github_issue: ${{ github.event.inputs.github_issue }}
186204
github_token: ${{ secrets.GITHUB_TOKEN }}
187205
workload_name: ${{ matrix.sdk.name }}
188206
workload_current_ref: ${{ github.head_ref || github.ref_name }}
189207
workload_baseline_ref: ${{ steps.baseline.outputs.ref }}
208+
disable_compose_profiles: "${{ matrix.sdk.id == 'native_node_hints' && 'chaos' || '' }}"
190209

191210
- name: Prepare SLO Database
192211
run: |
193212
echo "Preparing SLO database..."
213+
CREATE_EXTRA_ARGS="${{ matrix.sdk.create_extra_args }}"
194214
docker run --rm --network ydb_ydb-net \
195215
--add-host "ydb:172.28.0.11" \
196216
--add-host "ydb:172.28.0.12" \
197217
--add-host "ydb:172.28.0.13" \
198218
--add-host "ydb:172.28.0.99" \
199-
ydb-app-current create grpc://ydb:2136 /Root/testdb
219+
ydb-app-current create grpc://ydb:2136 /Root/testdb $CREATE_EXTRA_ARGS
200220
201221
- name: Run SLO Tests (parallel)
202222
timeout-minutes: 15
203223
run: |
204224
DURATION=${{ inputs.slo_workload_duration_seconds || 600 }}
205225
READ_RPS=${{ inputs.slo_workload_read_max_rps || 1000 }}
206226
WRITE_RPS=${{ inputs.slo_workload_write_max_rps || 1000 }}
207-
208-
EXTRA_ARGS=""
209-
if [ "${{ matrix.sdk.id }}" = "native_bulk_upsert" ]; then
210-
EXTRA_ARGS="--batch-size=10"
211-
fi
227+
RUN_EXTRA_ARGS="${{ matrix.sdk.run_extra_args }}"
212228
213229
ARGS="run grpc://ydb:2136 /Root/testdb \
214230
-otlp-endpoint prometheus:9090 \
@@ -218,7 +234,7 @@ jobs:
218234
-write-rps $WRITE_RPS \
219235
-read-timeout 100 \
220236
-write-timeout 100 \
221-
$EXTRA_ARGS"
237+
$RUN_EXTRA_ARGS"
222238
223239
echo "Starting ydb-app-current..."
224240
docker run -d \

tests/slo/native/node_hints/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ func main() {
150150
go w.Metrics(ctx, &wg, metricsRL)
151151

152152
wg.Wait()
153+
w.FailOnError()
153154
// check all load is sent to a single node
154155
ectx, ecancel := context.WithTimeout(context.Background(), 1*time.Second)
155156
defer ecancel()

tests/slo/native/node_hints/storage.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func NewStorage(ctx context.Context, cfg *config.Config, poolSize int, label str
7474

7575
var nsPtr *atomic.Pointer[node_hints.NodeSelector]
7676
if cfg.Mode == config.RunMode {
77-
nsPtr, err = node_hints.RunUpdates(ctx, db, tablePath, time.Second*10)
77+
nsPtr, err = node_hints.RunUpdates(ctx, db, tablePath, time.Second*5)
7878
if err != nil {
7979
return nil, fmt.Errorf("create node selector: %w", err)
8080
}
@@ -173,8 +173,8 @@ func (s *Storage) ReadBatch(ctx context.Context, rowIDs []generator.RowID) (
173173
} else {
174174
reqCtx = ctx
175175
}
176-
// reqCtx, cancel := context.WithTimeout(ctx, time.Duration(s.cfg.ReadTimeout)*time.Millisecond)
177-
// defer cancel()
176+
reqCtx, cancel := context.WithTimeout(ctx, time.Duration(s.cfg.ReadTimeout)*time.Millisecond)
177+
defer cancel()
178178

179179
res, err := s.db.Table().ReadRows(reqCtx, s.tablePath, types.ListValue(keys...), []options.ReadRowsOption{},
180180
table.WithRetryOptions([]retry.Option{ //nolint:staticcheck

0 commit comments

Comments
 (0)