diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 996abaa6..e8b1c544 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,8 +11,9 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} permissions: + contents: read pages: write id-token: write steps: - id: deployment - uses: sphinx-notes/pages@v3 + uses: sphinx-notes/pages@3b962c125b2db7b1f5194d949873fa46d6101d0f # v3 diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index d75cf0ce..acf91737 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -23,6 +23,10 @@ on: required: true type: boolean default: False + +permissions: + contents: read + jobs: publish: env: diff --git a/.github/workflows/slo-report.yml b/.github/workflows/slo-report.yml index 60621cd6..d671d536 100644 --- a/.github/workflows/slo-report.yml +++ b/.github/workflows/slo-report.yml @@ -29,7 +29,7 @@ jobs: pull-requests: write steps: - name: Publish YDB SLO Report - uses: ydb-platform/ydb-slo-action/report@v2 + uses: ydb-platform/ydb-slo-action/report@54c3c03de1ce8c6a2d8b0828b328bd5db82ef2bb # v2 with: github_token: ${{ secrets.GITHUB_TOKEN }} github_run_id: ${{ github.event.workflow_run.id }} diff --git a/.github/workflows/slo.yml b/.github/workflows/slo.yml index 8c066a3d..e828fed9 100644 --- a/.github/workflows/slo.yml +++ b/.github/workflows/slo.yml @@ -6,8 +6,6 @@ on: permissions: contents: read - pull-requests: write - checks: write jobs: ydb-slo-action: @@ -78,6 +76,7 @@ jobs: with: path: sdk-current fetch-depth: 0 + persist-credentials: false - name: Determine baseline commit id: baseline @@ -85,7 +84,7 @@ jobs: run: | set -euo pipefail BASELINE=$(git merge-base HEAD origin/main) - echo "sha=${BASELINE}" >> "$GITHUB_OUTPUT" + git worktree add --detach "$GITHUB_WORKSPACE/sdk-baseline" "$BASELINE" if git merge-base --is-ancestor "${BASELINE}" origin/main && \ [ "$(git rev-parse origin/main)" = "${BASELINE}" ]; then @@ -100,13 +99,6 @@ jobs: 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 @@ -129,11 +121,10 @@ jobs: "$GITHUB_WORKSPACE/sdk-baseline" - name: Run SLO Tests - uses: ydb-platform/ydb-slo-action/init@v2 + uses: ydb-platform/ydb-slo-action/init@54c3c03de1ce8c6a2d8b0828b328bd5db82ef2bb # 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 }} @@ -146,6 +137,4 @@ jobs: # 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 }} diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 80c19787..6d3e0a0d 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -6,6 +6,9 @@ on: - main pull_request: +permissions: + contents: read + jobs: lint: runs-on: ubuntu-latest diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1a9f03a7..ff705ba4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -6,6 +6,9 @@ on: - main pull_request: +permissions: + contents: read + jobs: integration: runs-on: ubuntu-latest @@ -95,7 +98,7 @@ jobs: run: tox -e cov -- ydb - name: Upload unit coverage to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml @@ -111,7 +114,7 @@ jobs: run: tox -e cov -- tests - name: Upload integration coverage to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml diff --git a/tests/slo/Dockerfile b/tests/slo/Dockerfile index b45d2611..e754b9a7 100644 --- a/tests/slo/Dockerfile +++ b/tests/slo/Dockerfile @@ -16,7 +16,6 @@ # as tuning flags (--read-rps, --write-rps, ...). # # Notes: -# - OpenTelemetry 1.39.x requires Python >= 3.9. # - gcc/libc6-dev are needed to build hdrhistogram from sdist. FROM python:3.11-slim diff --git a/tests/slo/requirements.txt b/tests/slo/requirements.txt index 68f516f1..765e88b6 100644 --- a/tests/slo/requirements.txt +++ b/tests/slo/requirements.txt @@ -2,8 +2,7 @@ requests==2.33.0 aiolimiter==1.1.0 hdrhistogram==0.10.3 -# OpenTelemetry (OTLP/HTTP exporter) -# NOTE: OpenTelemetry 1.39.1 requires Python >= 3.9. +# Keep the OpenTelemetry API, SDK, and exporter on the same release. opentelemetry-api==1.45.1 -opentelemetry-sdk==1.39.1 -opentelemetry-exporter-otlp-proto-http==1.39.1 +opentelemetry-sdk==1.45.1 +opentelemetry-exporter-otlp-proto-http==1.45.1