Skip to content

Commit

Permalink
Merge branch 'main' into queryService
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Ydb.Sdk/src/Services/Table/ExecuteDataQuery.cs
#	src/Ydb.Sdk/src/Services/Table/SessionPool.cs
#	src/Ydb.Sdk/tests/Utils.cs
  • Loading branch information
rekby committed Dec 15, 2023
2 parents e599e8c + ae6e18f commit 6d7bf80
Show file tree
Hide file tree
Showing 37 changed files with 2,981 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ jobs:
autoformatter:
strategy:
matrix:
source-dir: ["./src/", "./examples/src/"]
source-dir: ["./src/", "./examples/src/", "./slo/src/"]
include:
- source-dir: "./src/"
solutionFile: "YdbSdk.sln"
- source-dir: "./examples/src/"
solutionFile: "YdbExamples.sln"
- source-dir: "./slo/src/"
solutionFile: "src.sln"
name: autoformat check
runs-on: ubuntu-latest
steps:
Expand All @@ -37,7 +39,7 @@ jobs:
inspection:
strategy:
matrix:
solutionPath: ["./src/YdbSdk.sln", "./examples/src/YdbExamples.sln"]
solutionPath: ["./src/YdbSdk.sln", "./examples/src/YdbExamples.sln", "./slo/src/src.sln"]
runs-on: ubuntu-latest
name: Inspection
steps:
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/slo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

name: SLO

jobs:
test-slo:
concurrency:
group: slo-${{ github.ref }}
if: (!contains(github.event.pull_request.labels.*.name, 'no slo'))

runs-on: ubuntu-latest
name: SLO test
permissions:
checks: write
pull-requests: write
contents: read
issues: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
if: env.DOCKER_REPO != null
env:
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }}

- name: Run SLO
uses: ydb-platform/slo-tests@php-version
if: env.DOCKER_REPO != null
env:
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KUBECONFIG_B64: ${{ secrets.SLO_KUBE_CONFIG }}
AWS_CREDENTIALS_B64: ${{ secrets.SLO_AWS_CREDENTIALS }}
AWS_CONFIG_B64: ${{ secrets.SLO_AWS_CONFIG }}
DOCKER_USERNAME: ${{ secrets.SLO_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.SLO_DOCKER_PASSWORD }}
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }}
DOCKER_FOLDER: ${{ secrets.SLO_DOCKER_FOLDER }}
s3_endpoint: ${{ secrets.SLO_S3_ENDPOINT }}
s3_images_folder: ${{ vars.SLO_S3_IMAGES_FOLDER }}
grafana_domain: ${{ vars.SLO_GRAFANA_DOMAIN }}
# grafana_dashboard: ${{ vars.SLO_GRAFANA_DASHBOARD }}
grafana_dashboard: dca60386-0d3d-43f5-a2af-5f3fd3e3b295
grafana_dashboard_width: 2000
grafana_dashboard_height: 2300
ydb_version: 'newest'
timeBetweenPhases: 30
shutdownTime: 30

language_id0: 'dotnet'
workload_path0: 'slo/src'
language0: '.NET SDK'
workload_build_context0: ../..
workload_build_options0: -f Dockerfile

- uses: actions/upload-artifact@v3
if: always() && env.DOCKER_REPO != null
env:
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }}
with:
name: slo-logs
path: logs/
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- Added MakeTablePath, CopyTable, CopyTables, DescribeTable methods for TableClient
- Add logging for transactions

## v0.1.5
- Fix timeout error on create session
- Fix transport error on delete session
Expand Down
5 changes: 5 additions & 0 deletions slo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
data/
.idea/
bin/
obj/

40 changes: 40 additions & 0 deletions slo/playground/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SLO playground

Playground may be used for testing SLO workloads locally

It has several services:

- `prometheus` - storage for metrics
- `prometheus-pushgateway` - push acceptor for prometheus
- `grafana` - provides chats for metrics
- `ydb` - local instance of ydb-database to run workload with

## Network addresses

- Grafana dashboard: http://localhost:3000
- Prometheus pushgateway: http://localhost:9091
- YDB monitoring: http://localhost:8765
- YDB GRPC: grpc://localhost:2136
- YDB GRPC TLS: grpcs://localhost:2135

## Start

```shell
docker-compose up -d
```

## Stop

```shell
docker-compose down
```

## Configs

Grafana's dashboards stored in `configs/grafana/provisioning/dashboards`

## Data

YDB databases are not persistent

All other data like metrics and certs stored in `data/`
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: 1

providers:
- name: 'SLO'
options:
path: /etc/grafana/provisioning/dashboards
Loading

0 comments on commit 6d7bf80

Please sign in to comment.