Repository navigation
Drop the MinIO webhook log tables from the stateless CI setup - #110099
alexey-milovidov merged 12 commits into
Conversation
A bounded 600s timeout on system.minio_audit_logs / minio_server_logs is minio's own webhook-fed operational-log volume on s3 runs, not a ClickHouse bug. ClickHouse#109837 bounded the dump so a stuck table no longer eats the 9000s job budget, but it surfaced the bounded timeout as a FAIL, reddening otherwise-green PRs. Keep the detail visible in the report but only turn the check FAIL on a genuine failure (a real system table, a non-timeout minio error, too-many-rows, or any replica dump failure). Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-6:20260711-161500 |
|
cc @maxknv @leshikus — follow-up to #109837: a bounded 600s dump timeout on the minio_* diagnostic tables (minio's own webhook-fed logs, expected to balloon on s3) is now info-only in the Collect logs |
|
Workflow [PR], commit [68cb14f] Summary: ✅ AI ReviewSummaryThis PR removes the stateless CI MinIO webhook log tables, their setup/restart plumbing, and the related guard tests, while keeping the generic per-table Final VerdictStatus: ✅ Approve |
…timeout --verbose Address clickhouse-gh[bot] review on ClickHouse#110099. Finding B (real fix): exit 137 is not an unambiguous bounded-timeout signal -- GNU timeout returns 137 for its own --kill-after escalation AND for any wrapped command SIGKILLed by the OOM-killer or an external kill. Blindly suppressing 137 would downgrade a genuine OOM/external kill of clickhouse local to info-only. Add 'timeout --verbose' and a _timeout_wrapper_expired() predicate: 124 is always a timeout; 137 is trusted as a timeout only when timeout's own KILL diagnostic ('sending signal KILL to command') is present in stderr. A bare-137 OOM/external kill now still FAILs the check. Finding A (caller wiring): confirmed correct and does not require a code change. The only publisher of 'Scraping system tables' (functional_tests.py Collect-logs) runs dump_system_tables via prepare_logs(all=test_result and not test_result.is_ok()), so it only runs on an already-red job; on a green job no Scraping result is produced at all. The reclassification therefore does not (and never claimed, per this fix) rescue a green PR by itself -- its effect is on an already-red job: a bounded minio_* timeout no longer adds a spurious extra failed sub-result that would inflate the failure count and muddy triage. Pinned by a new regression test. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Addressed both review findings in 8ce842e (pushed). Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-3:20260711-172000 |
_annotate_timeout stamped "timed out after 600s" on every 137, so an OOM/external SIGKILL of clickhouse local (which still FAILs) was mislabeled a timeout. Gate it on _timeout_wrapper_expired (124, or 137 + timeout's --verbose KILL diagnostic) so a bare 137 keeps its raw stderr. Adds a focused bare-137 test. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Addressed the follow-up finding on Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-6:20260712-210700 |
| # own escalation; _timeout_wrapper_expired uses that to tell a real | ||
| # --kill-after escalation apart from an OOM/external SIGKILL that also | ||
| # exits 137 but must still fail the check. | ||
| dump_prefix = f"timeout --verbose --signal=TERM --kill-after=60 {self.DUMP_SYSTEM_TABLE_TIMEOUT} " |
There was a problem hiding this comment.
Why not use "--max_execution_time" of clickhouse?
There was a problem hiding this comment.
And a general question, why we have so much MinIO logs? Maybe we can reduce them somehow? I.e. log slightly bigger severity that now
There was a problem hiding this comment.
Considered it, but it cannot replace the process-level cap here. max_execution_time is a query-level soft limit checked cooperatively between blocks. The failure we bound is a wedged clickhouse local (server crashed, so we read via clickhouse-local; on s3_with_keeper disk/keeper init is a known hang, #77320) where the stall is in startup / disk init / outfile flush / shutdown, not in query execution, so max_execution_time never fires and the process eats the whole 9000s budget. The log saver also deliberately zeroes max_execution_time (LOGS_SAVER_CLIENT_OPTIONS) to gather complete *_log tables. timeout is the unconditional wall-clock hard cap. Happy to add --max_execution_time <cap> as a cheap first-line soft limit on top, but it is a complement, not a replacement.
There was a problem hiding this comment.
Right, the volume is the real problem and this PR only stops it reddening green jobs. minio_audit_logs is JSON-typed and fed by minio audit_webhook (one row per S3 API request), so on s3 runs every part PUT/GET/HEAD/LIST/DELETE across the parallel suite becomes a row, reaching into the millions (that is what the 20M-row ROWS_COUNT_IN_SYSTEM_TABLE_LIMIT guard is for). Reducing at the source is the durable fix. Two options I can send as a follow-up: (1) raise minio audit severity / drop the audit_webhook so we stop emitting per-request rows, or (2) dump an aggregate rollup (counts grouped by api/status/bucket) instead of raw rows, which is what triage actually reads. Which do you prefer? The timeout stays as a backstop for the wedged-process case regardless.
There was a problem hiding this comment.
raise minio audit severity
Let's do this one and in this PR (cc @antonio2368 as an author of #67998, maybe you find this logs useful, and they will loose the purpose after this change)
There was a problem hiding this comment.
I don't mind, I enabled it initially to try figure out an obscure issue but it's not that critical now.
There was a problem hiding this comment.
Done in a3dd904. The audit webhook has no severity/level knob (minio emits one audit event per S3 API request unconditionally, see the audit_webhook config list), so raising its severity is not possible. Since the audit stream is no longer needed, I dropped it at the source instead: removed the system.minio_audit_logs table, the audit_webhook:ch_audit_webhook config, its teardown reset, and its dump entry. Only the low-volume logger_webhook server logs remain. The bounded-timeout backstop stays for the remaining minio_server_logs dump.
Per review: the test exercised GNU coreutils' `timeout` (exit 124 vs 137 escalation) rather than any ClickHouse logic, so it would not catch a regression in our code. Remove it. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Addressed the CHANGES_REQUESTED review (894d6c3): removed Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-0:20260713-093100 |
The minio audit webhook emits one event per S3 API request with no severity or level filter, so on s3 runs system.minio_audit_logs grows to millions of rows and its dump hangs past the 600s cap. minio offers no way to raise the audit severity, and the audit stream is no longer needed, so drop the audit table, webhook, and dump entirely, keeping the low-volume server-log webhook. The bounded-timeout backstop stays as the safety net for the remaining minio_server_logs dump. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Changelog category: CI Fix or Improvement (unchanged). Session id: cron:clickhouse-worker-slot-8:20260713-102500 |
azat
left a comment
There was a problem hiding this comment.
And now cleanup the patch from useless comments and update PR title and description according to latest changes and keep only essential things there
…inio-timeout-info-only # Conflicts: # ci/jobs/scripts/clickhouse_proc.py # ci/tests/test_minio_log_tables_local_storage.py
|
@azat cleaned up: trimmed the now-stale code comments to essentials, dropped the dead |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-2:20260717-093600 |
| `ENGINE = MergeTree` tables, so unless pinned they inherit the server's default | ||
| merge_tree storage policy. On s3 storage runs that default is S3 | ||
| (s3_storage_policy_for_merge_tree_by_default.xml sets | ||
| `system.minio_server_logs` is a diagnostic table that captures the MinIO server |
There was a problem hiding this comment.
If we don't expose it in artifacts, why do we need it? Let's remove it. Maybe this will also make MinIO faster
There was a problem hiding this comment.
Done, removed the whole thing. Both system.minio_audit_logs and system.minio_server_logs webhook log tables are gone: the table CREATEs, the logger_webhook/audit_webhook config, the local-disk pinning, _restart_minio_to_apply_config and its helpers, the guard tests, and the two create_minio_log_tables call sites in functional_tests.py. That also drops a webhook stream from MinIO. The generic per-dump timeout backstop stays for the remaining system tables, so this PR now shrinks to a pure removal. Title and description updated to match.
The system.minio_audit_logs and system.minio_server_logs tables were webhook-fed operational logs, not ClickHouse diagnostics, and were never exposed in CI artifacts. On s3 runs the audit stream (one event per S3 API request) grew to millions of rows, so its post-run dump hit the Scraping system tables timeout. antonio2368 (who enabled them in ClickHouse#67998 for a one-off investigation) confirmed they are no longer needed. Remove both tables, their webhook config, the local-disk pinning, the restart-to-apply-config machinery, and their guard test. This also drops one webhook stream from MinIO. The generic per-dump timeout backstop is kept for the remaining system tables. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…o groeneai/scraping-minio-timeout-info-only
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-4:20260717-130800 |
azat
left a comment
There was a problem hiding this comment.
Unlike `terminate`, this leaves the auxiliary services (Redpanda/Kafka, MinIO and its webhooks) running. It is used between bugfix-validation
This comment in clickhouse_proc.py need to updated as well, since there are no more MinIO webhooks
CI finish ledger - 1a4d4e2CI fully finished on this head (Config Workflow = SUCCESS, Finish Workflow = SUCCESS; 0 checks queued/in_progress; >20-min ingest buffer elapsed). CIDB shows ZERO failing tests for this commit.
All checks green except the private CH Inc sync (exempt). No PR-caused failure. Session id: cron:our-pr-ci-monitor:20260718-000000 |
…bhook wording The AI review on the current head flagged that shrinking this PR to a pure removal also dropped the earlier `137` disambiguation: `_annotate_timeout` stamped `timed out after 600s` onto every `137` exit, so an OOM or externally `SIGKILL`ed `clickhouse local` dump was mislabeled as a timeout. Restore the proven-timeout predicate: the dump wrapper runs `timeout --verbose`, and `_timeout_wrapper_expired` treats `124` as an expiry always and `137` only when timeout's own `sending signal KILL to command` diagnostic is present in stderr; a bare `137` keeps its raw stderr. Also update the `stop_server` docstring that still mentioned MinIO webhooks, as requested by review. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110099&sha=latest&name_0=PR ClickHouse#110099
|
@azat updated the |
…timeout --verbose Address clickhouse-gh[bot] review on ClickHouse#110099. Finding B (real fix): exit 137 is not an unambiguous bounded-timeout signal -- GNU timeout returns 137 for its own --kill-after escalation AND for any wrapped command SIGKILLed by the OOM-killer or an external kill. Blindly suppressing 137 would downgrade a genuine OOM/external kill of clickhouse local to info-only. Add 'timeout --verbose' and a _timeout_wrapper_expired() predicate: 124 is always a timeout; 137 is trusted as a timeout only when timeout's own KILL diagnostic ('sending signal KILL to command') is present in stderr. A bare-137 OOM/external kill now still FAILs the check. Finding A (caller wiring): confirmed correct and does not require a code change. The only publisher of 'Scraping system tables' (functional_tests.py Collect-logs) runs dump_system_tables via prepare_logs(all=test_result and not test_result.is_ok()), so it only runs on an already-red job; on a green job no Scraping result is produced at all. The reclassification therefore does not (and never claimed, per this fix) rescue a green PR by itself -- its effect is on an already-red job: a bounded minio_* timeout no longer adds a spurious extra failed sub-result that would inflate the failure count and muddy triage. Pinned by a new regression test. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…bhook wording The AI review on the current head flagged that shrinking this PR to a pure removal also dropped the earlier `137` disambiguation: `_annotate_timeout` stamped `timed out after 600s` onto every `137` exit, so an OOM or externally `SIGKILL`ed `clickhouse local` dump was mislabeled as a timeout. Restore the proven-timeout predicate: the dump wrapper runs `timeout --verbose`, and `_timeout_wrapper_expired` treats `124` as an expiry always and `137` only when timeout's own `sending signal KILL to command` diagnostic is present in stderr; a bare `137` keeps its raw stderr. Also update the `stop_server` docstring that still mentioned MinIO webhooks, as requested by review. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110099&sha=latest&name_0=PR ClickHouse#110099
…minio-timeout-info-only Drop the MinIO webhook log tables from the stateless CI setup
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Drop the
system.minio_audit_logsandsystem.minio_server_logswebhook log tables from the stateless CI setup.These were MinIO webhook-fed operational logs (added in #67998), not ClickHouse diagnostics, and were never exposed in CI artifacts. On s3 runs the audit stream (one event per S3 API request) grew to millions of rows, so its post-run
Scraping system tablesdump hit the 600s timeout and reddened otherwise-green jobs. antonio2368, who enabled them for a one-off investigation, confirmed they are no longer needed.Removed: both table CREATEs, the
logger_webhook/audit_webhookconfig, the local-disk pinning, the restart-to-apply-config machinery, and the guard tests. This also drops one webhook stream from MinIO. The generic per-dumptimeoutbackstop is kept for the remaining system tables.