Skip to content

Read sources for performance test selection from git, not the GitHub API - #131332

Merged
thevar1able merged 2 commits into
masterfrom
perf-selection-read-sources-with-git
Nov 14, 2026
Merged

thevar1able merged 2 commits into
masterfrom
perf-selection-read-sources-with-git

Conversation

@thevar1able

@thevar1able thevar1able commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

PerformanceSelection.source downloaded every changed file at the merge base and at the coverage binary_sha through the GitHub contents API, in every shard, without a token. A PR that changes more than about 30 files exhausts the unauthenticated rate limit (60 requests per hour) within a minute, and the job reports Performance tests were not run: test selection unavailable: GitHub API 403 Client Error: rate limit exceeded on every rerun. PRs above MAX_SELECTION_CHANGED_FILES (200) avoided it only by running the full suite.

Now both revisions are fetched into the shallow checkout once (git fetch --depth=1) and the files are read with git show. The three remaining API calls (PR metadata, merge base, diff) are unchanged.

Related: #117346

Changelog category (leave one):

  • CI Fix or improvement (changelog entry is not required)

🤖 Generated with Claude Code


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

Version info

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

`PerformanceSelection.source` downloaded every changed file at the merge
base and at the coverage `binary_sha` through the GitHub contents API, in
every shard, without a token. A PR that changes more than about 30 files
exhausts the unauthenticated rate limit (60 requests per hour) within a
minute, and the job reports `Performance tests were not run: test selection
unavailable: GitHub API 403 Client Error: rate limit exceeded` on every
rerun. Fetch both revisions into the shallow checkout once and read the
files with `git show`.

Related: #117346

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [35896ab]

Summary: ✅


AI Review

Summary

The PR replaces per-file GitHub API downloads for performance test selection with a shallow revision fetch and local source reads. Reviewed head 35896ab9b924b45f810b24b2bbcb9e96e6d82f2b. One existing Major remains: private-repository performance jobs lose Git authentication. No additional inline findings.

Findings

⚠️ Majors

  • ci/jobs/scripts/performance_selection.py:531: Authenticate revision fetching inside the performance container. The previous source downloads used GITHUB_TOKEN through Targeting._github_get; PerformanceSelection.fetch_revisions runs plain Git, which does not consume that variable. actions/checkout@v6 stores credentials under RUNNER_TEMP, but the Docker command in ci/praktika/runner.py:775 does not mount that credential file. Consequently, selection against ClickHouse/ClickHouse-private fails with CalledProcessError before benchmarks run. A local authenticated Git HTTP fixture reproduced the failure using the current methods and an unavailable checkout credential include; supplying an explicit Git authorization header made the same fetch succeed. Configure subprocess-scoped Git authentication using the available read token, or fetch where checkout credentials are accessible. The existing unresolved inline finding remains valid and was left unchanged.
Tests
  • ⚠️ Verify fetching both missing revisions against a private origin from the actual performance job container with its read token. The local reproduction establishes the authentication failure, but the production container path was not executed.
Final Verdict

Status: ⚠️ Request changes. Authenticate the Git fetch and verify private-origin fetching inside the performance container.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Nov 13, 2026
@clickhouse-gh clickhouse-gh Bot added the comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). label Nov 13, 2026
…-sources-with-git

# Conflicts:
#	ci/jobs/scripts/performance_selection.py
@thevar1able
thevar1able added this pull request to the merge queue Nov 14, 2026
Merged via the queue into master with commit 8ade07e Nov 14, 2026
205 checks passed
@thevar1able
thevar1able deleted the perf-selection-read-sources-with-git branch November 14, 2026 23:25
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 14, 2026
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.

2 participants