Skip to content

Make CI log export failure non-fatal in ClickBench job - #98153

Merged
alexey-milovidov merged 1 commit into
masterfrom
clickbench-non-fatal-log-export
Feb 27, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
clickbench-non-fatal-log-export

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Feb 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • ClickBench CI job fails when the CI logs cluster is overloaded (TOO_MANY_SIMULTANEOUS_QUERIES), even though ClickHouse server starts fine
  • Log export failure now produces a warning instead of aborting the entire benchmark
  • Aligns with functional_tests.py and fuzzers_job.py, which already treat log export failure as non-fatal

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=10d13a79d8749007581008e8fb26957445a64c38&name_0=MasterCI&name_1=ClickBench%20%28arm_release%29

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)

Version info

  • Merged into: 26.3.1.91

When the CI logs cluster is overloaded (e.g. `TOO_MANY_SIMULTANEOUS_QUERIES`),
the `start_log_exports` call fails and the entire ClickBench job aborts without
running any benchmarks. Log export is an observability feature and its failure
should not prevent the actual benchmark from executing.

This aligns the ClickBench job with `functional_tests.py` and `fuzzers_job.py`,
which already treat log export failure as a non-fatal warning.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=10d13a79d8749007581008e8fb26957445a64c38&name_0=MasterCI&name_1=ClickBench%20%28arm_release%29

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

clickhouse-gh Bot commented Feb 27, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [16867f3]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Feb 27, 2026

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@alexey-milovidov alexey-milovidov self-assigned this Feb 27, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Feb 27, 2026
Merged via the queue into master with commit 4e3179d Feb 27, 2026
144 checks passed
@alexey-milovidov
alexey-milovidov deleted the clickbench-non-fatal-log-export branch February 27, 2026 01:41
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 27, 2026
clickgapai pushed a commit to clickgapai/ClickHouse that referenced this pull request Nov 9, 2026
A transient AWS SSM failure while configuring log export aborted a whole
Stateless sanitizer job before a single test ran, so the lane reported
`failure` having tested nothing and a real regression in it was invisible
for that run.

`configure_log_export` sits in the mandatory command list of the
`Install ClickHouse` result. It calls `create_log_export_config`, whose
`Secret` fetch runs `Shell.get_output(..., strict=True)`, which raises on
any nonzero AWS CLI exit; `Result.from_commands_run` maps the exception to
a failing result, so the step fails and every later stage is skipped.
Three shapes were observed in CI: exit 254 `An error occurred (502) when
calling the GetParameters operation ... Bad Gateway`, exit 255
`Connect timeout on endpoint URL: "https://ssm.us-east-1.amazonaws.com/"`,
and exit 253 `An error occurred (NoCredentials): Unable to locate
credentials.`

Log export is telemetry, and an unconfigured export is already a supported
state: `start_log_exports` guards on `log_export_host`, the start step
already reports a lapse as a workflow warning, and the llvm-coverage
stateless configs skip configuring it outright while running their full
suites. Only the configure step was fatal; that asymmetry is the gap
ClickHouse#98153 already claimed to have closed.

Each of the three fatal call sites now catches the failure, records a
workflow warning and continues, leaving `log_export_host` unset so the
existing supported path takes over. The tolerance returns a truthy value
because `from_commands_run` treats a `False` return as a failed command,
and `ClickHouseService` separately raises when a config hook returns
exactly `False`. `ci/praktika/secret.py` is deliberately untouched, so the
other secret consumers - release, docker, jepsen, cidb, copilot - stay
fatal, as do a missing or empty SSM parameter. The fourth call site,
`clickhouse_proc.py`'s `logs_export_config` `__main__` branch, was already
tolerant and is unchanged. A retry was rejected: `Result` asserts
`retries == 1` for python callables, and a retry would not bound the blast
radius once exhausted.

The new `ci/tests/test_log_export_non_fatal.py` drives the real production
code against a fake `aws` on PATH. It pins that the job survives all three
shapes, that the warning carries the cause, that a non-telemetry consumer
still fails loudly, and that a real failure elsewhere in the same step
still fails it. The call sites are AST-extracted from the job scripts and
executed rather than pattern-matched, so deleting a handler, deleting the
append, or retargeting it to a list no result runs cannot leave the suite
green.

Sightings: ClickHouse#112025 (comment)
and ClickHouse#112000 (comment)
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