Skip to content

Support TzDate, TzDatetime and TzTimestamp types #1806

Support TzDate, TzDatetime and TzTimestamp types

Support TzDate, TzDatetime and TzTimestamp types #1806

Workflow file for this run

name: SLO
on:
pull_request:
types: [opened, reopened, synchronize, labeled]
permissions:
contents: read
pull-requests: write
checks: write
jobs:
ydb-slo-action:
# On `labeled` events run only when the `SLO` label itself was just added —
# otherwise unrelated label changes (e.g. the AI-review bot toggling
# `ai_review_in_process` / `ai_reviewed`) would spawn a fresh run that
# cancels the in-progress one via `cancel-in-progress`. For the other
# trigger types keep gating on the `SLO` label being present.
if: >-
(github.event.action == 'labeled' && github.event.label.name == 'SLO') ||
(github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'SLO'))
name: Run YDB SLO Tests
runs-on: "large-runner-python-sdk"
strategy:
fail-fast: false
matrix:
sdk:
- name: sync-table
command: "--read-rps 1000 --write-rps 100"
- name: sync-query
command: "--read-rps 1000 --write-rps 100"
- name: async-query
command: "--read-rps 1000 --write-rps 100"
- name: sync-topic
command: "--write-rps 200 --write-threads 8 --read-threads 8"
metrics_yaml_path: sdk-current/tests/slo/metrics-topic.yaml
thresholds_yaml_path: sdk-current/tests/slo/thresholds-topic.yaml
- name: async-topic
command: "--write-rps 200 --write-threads 8 --read-threads 8"
metrics_yaml_path: sdk-current/tests/slo/metrics-topic.yaml
thresholds_yaml_path: sdk-current/tests/slo/thresholds-topic.yaml
concurrency:
group: slo-${{ github.ref }}-${{ matrix.sdk.name }}
cancel-in-progress: true
steps:
- name: Install dependencies
run: |
set -euxo pipefail
YQ_VERSION=v4.48.2
BUILDX_VERSION=0.30.1
COMPOSE_VERSION=2.40.3
sudo curl -fLo /usr/local/bin/yq \
"https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
sudo chmod +x /usr/local/bin/yq
sudo mkdir -p /usr/local/lib/docker/cli-plugins
sudo curl -fLo /usr/local/lib/docker/cli-plugins/docker-buildx \
"https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-amd64"
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx
sudo curl -fLo /usr/local/lib/docker/cli-plugins/docker-compose \
"https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-linux-x86_64"
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
yq --version
docker --version
docker buildx version
docker compose version
- name: Checkout current SDK version
uses: actions/checkout@v5
with:
path: sdk-current
fetch-depth: 0
- name: Determine baseline commit
id: baseline
working-directory: sdk-current
run: |
set -euo pipefail
BASELINE=$(git merge-base HEAD origin/main)
echo "sha=${BASELINE}" >> "$GITHUB_OUTPUT"
if git merge-base --is-ancestor "${BASELINE}" origin/main && \
[ "$(git rev-parse origin/main)" = "${BASELINE}" ]; then
BASELINE_REF="main"
else
BRANCH=$(git branch -r --contains "${BASELINE}" | grep -v HEAD | head -1 | sed 's|.*/||' || echo "")
if [ -n "${BRANCH}" ]; then
BASELINE_REF="${BRANCH}@${BASELINE:0:7}"
else
BASELINE_REF="${BASELINE:0:7}"
fi
fi
echo "ref=${BASELINE_REF}" >> "$GITHUB_OUTPUT"
- name: Checkout baseline SDK version
uses: actions/checkout@v5
with:
ref: ${{ steps.baseline.outputs.sha }}
path: sdk-baseline
fetch-depth: 1
- name: Build workload images (current + baseline)
run: |
set -euxo pipefail
# Build current: SDK + workload runner both from this PR.
docker build \
-f "$GITHUB_WORKSPACE/sdk-current/tests/slo/Dockerfile" \
-t "ydb-app-current" \
"$GITHUB_WORKSPACE/sdk-current"
# Build baseline: baseline SDK with the current workload runner
# (Dockerfile + tests/slo/), so the runner-side contract changes
# (entrypoint, metrics format) apply uniformly to both images.
rm -rf "$GITHUB_WORKSPACE/sdk-baseline/tests/slo"
cp -r "$GITHUB_WORKSPACE/sdk-current/tests/slo" \
"$GITHUB_WORKSPACE/sdk-baseline/tests/slo"
docker build \
-f "$GITHUB_WORKSPACE/sdk-baseline/tests/slo/Dockerfile" \
-t "ydb-app-baseline" \
"$GITHUB_WORKSPACE/sdk-baseline"
- name: Run SLO Tests
uses: ydb-platform/ydb-slo-action/init@v2
timeout-minutes: 30
with:
github_issue: ${{ github.event.pull_request.number }}
github_token: ${{ secrets.GITHUB_TOKEN }}
workload_name: ${{ matrix.sdk.name }}
workload_duration: "600"
workload_current_ref: ${{ github.head_ref || github.ref_name }}
workload_current_image: ydb-app-current
workload_current_command: ${{ matrix.sdk.command }}
workload_baseline_ref: ${{ steps.baseline.outputs.ref }}
workload_baseline_image: ydb-app-baseline
workload_baseline_command: ${{ matrix.sdk.command }}
# Custom metrics (e.g. topic e2e latency / loss) merged on top of the
# action defaults; empty for workloads that don't set it.
metrics_yaml_path: ${{ matrix.sdk.metrics_yaml_path }}
# Per-scenario threshold overrides (topics make read_latency neutral).
# Ignored by action versions without ydb-slo-action#57; self-activates
# once per-scenario thresholds land in the consumed tag.
thresholds_yaml_path: ${{ matrix.sdk.thresholds_yaml_path }}