Skip to content

Retry transient S3 errors when performance test selection reads a coverage manifest - #131597

Merged
alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
groeneai:fix-perf-selection-manifest-read-retry
Nov 16, 2026
Merged

alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
groeneai:fix-perf-selection-manifest-read-retry

Conversation

@groeneai

@groeneai groeneai commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #129327
Related: #130905

Changelog category (leave one):

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

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

...

Description

PR performance test selection reads the 16 NightlyCoverage shard manifests from the clickhouse-test-reports bucket with one bare urlopen each. A single transient S3 error makes PerformanceSelection.select raise, and the shard ends ERROR without running a query. This happened on 3 shards of 3 unrelated PRs in 3 days, each time on one request while the other shards of the same run read the same manifests within seconds: HTTP 500 (CI report), connection reset (CI report), HTTP 500 (CI report).

read_manifest is now a module-level function that retries HTTP 5xx and transport errors (OSError, http.client.HTTPException) for up to 5 attempts with 2, 4, 8 and 16 s sleeps, the schedule of the CIDB client; the other network reads of the selection already retry. A 4xx is raised on the first attempt, so coverage_cohort still treats 403/404 of a failed coverage job as an unpublished manifest. A persistent failure raises the same exception as before, so the job still ends ERROR rather than running the full suite.

Validated locally with fault injection against the live bucket and CIDB: with an HTTP 500 and a connection reset injected into two of the 16 manifest reads, master's snapshot() raises the CI error urllib.error.HTTPError: HTTP Error 500, and the patched one selects the same 16 shards as a clean run.


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

Version info

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

…erage manifest

PR performance test selection read each NightlyCoverage shard manifest
with one bare urlopen, so a single S3 HTTP 500 or connection reset made
PerformanceSelection.select raise and the shard ended ERROR without
running any query (3 shards of 3 unrelated PRs in 3 days, each a
one-request blip: the other shards of the same run read the same
manifests within seconds).

read_manifest is now a module-level function that retries HTTP 5xx and
transport errors (OSError, http.client.HTTPException) for up to 5
attempts with 2, 4, 8 and 16 s sleeps, the schedule of the CIDB client.
The other network reads of the selection already retry
(Targeting._github_get, CIDB.query). A 4xx is raised on the first
attempt, so coverage_cohort keeps treating 403/404 of a failed coverage
job as an unpublished manifest; a non-JSON body is not retried; and a
persistent failure re-raises the last error unchanged, so the job still
ends ERROR instead of falling back to the full suite.

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

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (0 blockers, 0 majors).

# Sev Finding Verdict Evidence / action
1 💡 The comment on read_manifest says coverage_cohort treats 403/404 as an unpublished manifest; it does so only for a coverage job that did not succeed, and every 4xx is raised at once. AGREE Noted, not blocking: the reason not to retry a 4xx holds.

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are terminal per finding.

@clickhouse-gh

clickhouse-gh Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [1a78f09]

Summary: ✅


AI Review

Summary

Reviewed PR head 1a78f09a15ce8cd06d8af2333d0fe926e4ef6d99. The change adds bounded retries for transient failures when downloading performance coverage manifests while preserving existing validation and error propagation. Six focused fault-injection checks passed, covering retry recovery and exhaustion, response-body failures, immediate 4xx errors, malformed documents, and unchanged 16-shard cohort selection. No actionable findings.

Final Verdict

✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-ci can be tested Allows running workflows for external contributors manual approve Manual approve required to run CI comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). labels Nov 14, 2026
@alexey-milovidov alexey-milovidov self-assigned this Nov 15, 2026
# Conflicts:
#	ci/jobs/scripts/performance_selection.py
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 16, 2026
Merged via the queue into ClickHouse:master with commit b185d97 Nov 16, 2026
192 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). manual approve Manual approve required to run CI 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