Skip to content

CI: authenticate performance test selection with a read-only job token - #131070

Merged
egor-click merged 2 commits into
masterfrom
codex/perf-selector-github-auth
Nov 12, 2026
Merged

egor-click merged 2 commits into
masterfrom
codex/perf-selector-github-auth

Conversation

@egor-click

@egor-click egor-click commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Performance test selection hit the anonymous GitHub API rate limit while downloading source files and stopped before running tests. Pass the built-in GitHub Actions job token to PR performance jobs with read-only permissions for contents, pull requests and Actions. The token reaches the existing selector through GITHUB_TOKEN; parent report publication keeps its separate authentication. Local runs still work without a token and forward one when supplied.

Validated with eight focused checks covering the runner-to-HTTP token flow, permission scope, mandatory CI credentials, optional local credentials with and without Docker, and absence of token values in logs. Workflow generation and linting of the actual generated YAML also passed.

Related: #129327
Related: #80373

Failing job: https://github.com/ClickHouse/ClickHouse/actions/runs/43119319956/job/130914755090
CI report: https://s3.amazonaws.com/clickhouse-test-reports/PRs/80373/0f248a568ef8685fce02dec3aa54689cc5958fa9/pr/result_performance_comparison_arm_release_master_head_1_6.json

Changelog category (leave one):

  • CI Fix or Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Authenticate coverage-based performance test selection with a read-only GitHub job token.


Workflow [PR]
Sync PR [sync-upstream/pr/131070]

Version info

  • Merged into: 26.11.1.2119-master (included in 26.11 and later)

Pass the GitHub Actions job token to PR performance jobs with read-only
contents, pull-request and Actions permissions. Keep the token in the job
command environment so parent report publication uses its existing auth.

This prevents source mapping from using the anonymous GitHub API quota.

Related: #129327
CI failure: https://github.com/ClickHouse/ClickHouse/actions/runs/43119319956/job/130914755090
@clickhouse-gh

clickhouse-gh Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [e394767]

Summary: ✅


AI Review

Summary

Reviewed PR head e39476799c96c6ba524e4484f3ce398035a860e1. The change supplies a read-only GitHub job token to PR performance selection while preserving separate report-publication authentication and optional credentials for local runs. The previous local-run finding is fixed and its thread has been resolved. Focused checks passed: 20 runner-to-HTTP cases, job scope, and PR-head generator permissions and environment output. Docker and HTTP boundaries were mocked; the full performance suite was not rerun.

Final Verdict

Status: ✅ Approve. No unresolved findings or new inline comments.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Nov 12, 2026
@clickhouse-gh
clickhouse-gh Bot requested review from leshikus and maxknv November 12, 2026 14:24
@egor-click
egor-click requested a review from fm4v November 12, 2026 14:27
Comment thread ci/praktika/runner.py Resolved
Require the read token in CI, while letting local performance jobs run
without credentials and forwarding a supplied token when present.

Related: #131070 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants