Repository navigation
ci: drop old Cloud test databases in a scheduled workflow - #3509
Merged
Merged
Conversation
clickhouse-java test databases pile up on the Cloud service shared with the other clients: the per-job DROP covers only TEST_DB_NAME, and it waits 180 s and fails when a replica lags, which pushes the jobs past their timeout. - cloud-cleanup.yml: hourly (and on demand, with a dry run), drops the clickhouse_java_* databases older than 60 minutes, one at a time and without waiting for every replica. Same approach as clickhouse-js (ClickHouse/clickhouse-js#1076). - cloud.yml: add the epoch-ms creation time to the database name, and remove the per-job DROP. Refs #3508 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI review gate — auto-approved
History (latest 5 heads, newest first)
|
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
ccoltx
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test databases pile up on the shared Cloud service, and the per-job DROP times out and fails the jobs (#3508). Same approach as ClickHouse/clickhouse-js#1076:
cloud-cleanup.yml: hourly at :41 and on demand (dry_runinput). It dropsclickhouse_java_*databases older than 60 min, one at a time, withdistributed_ddl_task_timeout=0. The age comes from an epoch-ms token in the name; names without one (the current backlog) are dropped. A failed drop is a warning, and the next run retries it.cloud.yml: the database name ends with the epoch-ms creation time; the per-job DROP step is removed.Closes #3508
Checklist
curl: TTL skip, legacy and derived names, dry run, empty list, a failed drop, a failed listing.gh workflow run cloud-cleanup.yml -f dry_run=truefirst, then a real run.🤖 Generated with Claude Code
Note
Low Risk
CI-only workflow and naming change; no application runtime or auth logic, with bounded impact to shared test infrastructure cleanup.
Overview
Adds
cloud-cleanup.yml, which runs hourly (at :41) and on manual dispatch to drop staleclickhouse_java_*databases on the shared ClickHouse Cloud instance used by integration tests. Cleanup uses a 60-minute TTL parsed from a 13-digit epoch-ms suffix in the database name, skips younger databases, and issuesDROP DATABASEwithdistributed_ddl_task_timeout=0so jobs don't block on replica sync; failures are warnings and retried on the next run. Adry_runinput lists what would be dropped without deleting.Updates
cloud.ymlso generated test DB names include$(date +%s%3N)for that TTL logic, and removes the unconditional per-job DROP step that was timing out and failing runs when cleanup waited on replicas.Reviewed by Cursor Bugbot for commit cf92732. Bugbot is set up for automated code reviews on this repo. Configure here.