Skip to content

Gracefully handle failure to fetch historical thresholds in perf tests - #98448

Merged
alexey-milovidov merged 1 commit into
masterfrom
fix-perf-test-historical-data-fallback
Mar 2, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
fix-perf-test-historical-data-fallback

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Mar 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Performance tests fail with "Cannot select historical data" when play.clickhouse.com is unreachable or times out
  • The prepare_historical_data step crashes with AssertionError or TypeError: write() argument must be str, not None, blocking all subsequent stages
  • Historical thresholds are only used as a LEFT JOIN in compare.sh, so an empty file is perfectly valid — now we fall back gracefully with a warning instead of failing

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98361&sha=3b164e8c122fa4ed2bda483b19cae8a0b54af329&name_0=PR&name_1=Performance%20Comparison%20%28amd_release%2C%20master_head%2C%202%2F6%29
#98361

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):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

🤖 Generated with Claude Code

Version info

  • Merged into: 26.3.1.247

…ce tests

Previously, when `play.clickhouse.com` was unreachable or timed out, the
`prepare_historical_data` step would fail with either an `AssertionError`
(from `assert cidb.is_ready()`) or a `TypeError` (from `f.write(None)`),
blocking all subsequent performance test stages.

Since historical thresholds are only used as a `LEFT JOIN` in `compare.sh`,
an empty file is perfectly valid — it just means no historical baseline
adjustments are applied. This change makes the step fall back gracefully
by creating an empty thresholds file and printing a warning instead of
failing the entire job.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98361&sha=3b164e8c122fa4ed2bda483b19cae8a0b54af329&name_0=PR&name_1=Performance%20Comparison%20%28amd_release%2C%20master_head%2C%202%2F6%29

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

clickhouse-gh Bot commented Mar 2, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [aa8db80]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Mar 2, 2026
@alexey-milovidov
alexey-milovidov requested a review from maxknv March 2, 2026 00:48
@alexey-milovidov alexey-milovidov self-assigned this Mar 2, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Mar 2, 2026
Merged via the queue into master with commit b1da310 Mar 2, 2026
144 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-perf-test-historical-data-fallback branch March 2, 2026 03:56
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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