Skip to content

Commit

Permalink
Merge pull request #383 from ydb-platform/slo-fix
Browse files Browse the repository at this point in the history
fix SLO
  • Loading branch information
Zork33 committed Jun 6, 2024
2 parents cd797f9 + eb0977c commit aaf8176
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/slo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: SLO
on:
pull_request:
branches:
- main
- master
- release-*
workflow_dispatch:
Expand All @@ -25,7 +26,7 @@ jobs:
uses: actions/checkout@v4

- name: Run SLO
uses: ydb-platform/slo-tests@js-version
uses: ydb-platform/slo-tests@main
continue-on-error: true
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -47,7 +48,7 @@ jobs:
language_id0: 'nodejs'
workload_path0: 'slo-workload'
language0: 'Native ydb-nodejs-sdk general'
workload_build_context0: ../..
workload_build_context0: ..
workload_build_options0: -f Dockerfile --build-arg SRC_PATH=slo-workload --build-arg JOB_NAME=workload-slo

- uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "npm run test:dev",
"build": "tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json",
"clean": "rimraf build",
"prepublish": "npm run clean && npm run build && node ./fixup.js"
"prepublishOnly": "npm run clean && npm run build && node ./fixup.js"
},
"keywords": [
"ydb",
Expand Down
16 changes: 12 additions & 4 deletions slo-workload/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
FROM node:19.3.0
FROM node:current

# build actual SDK
WORKDIR /workload
COPY package* ./
COPY ./package* ./
RUN npm install
COPY . .
COPY ./ .
RUN NODE_ENV=production npm run build

ENTRYPOINT ["npm", "run", "start", "--"]
# build slo-workload
# SLO test is built after SDK because it depends on it
WORKDIR /workload/slo-workload
RUN npm install
RUN NODE_ENV=production npm run build

# run slo-workload
ENTRYPOINT ["npm", "run", "start", "--"]
2 changes: 1 addition & 1 deletion slo-workload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"commander": "^9.4.1",
"nanotimer": "^0.3.15",
"prom-client": "^14.1.0",
"ydb-sdk": "^5.2.0"
"ydb-sdk": "file:.."
}
}
2 changes: 1 addition & 1 deletion slo-workload/src/utils/Executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Driver, Session } from 'ydb-sdk'
import { packages } from '../../package-lock.json'
import { QueryBuilder } from './QueryBuilder'

const sdkVersion = packages['node_modules/ydb-sdk'].version
const sdkVersion = require('../../../package.json').version

const percentiles = [0.5, 0.9, 0.95, 0.99, 0.999]

Expand Down

0 comments on commit aaf8176

Please sign in to comment.