Retry newly provisioned Query API endpoints until ready - #504
Conversation
75e8a6c to
f970de0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f970de0. Configure here.
| #[allow(clippy::too_many_arguments)] | ||
| async fn run_basic_service_query( | ||
| client: &CloudClient, | ||
| client: &clickhouse_cloud_api::Client, |
There was a problem hiding this comment.
why is this necessary?
There was a problem hiding this comment.
Assessed this type change specifically: the raw API client was not required. Query credentials are still passed explicitly to run_query, and readiness/idle handling continues to return the raw query response/error for the existing conversion and streaming boundary. The raw type only made .with_query_host(...) convenient in the direct wiremock test.
Commit 6d78b4f restores &CloudClient for both query helpers, keeps the established internal client.api().run_query(...) call, removes client.api() from production call sites, and uses a test-only query-host override to preserve deterministic coverage. Readiness timing, 408 classification, idle/wake behavior, and user-query execution are unchanged.
Verified with cargo test -p clickhousectl query_readiness -- --nocapture, cargo test -p clickhousectl service_query -- --nocapture (including all affected request-shape tests), cargo fmt --all --check, cargo check -p clickhousectl, and cargo clippy -p clickhousectl --all-targets -- -D warnings.
6d78b4f to
e5ca8db
Compare
|
Superseded by #537 in stack #563. |

Summary
Closes #453
Tests
cargo test -p clickhousectl(748 passed)cargo test -p clickhousectl --test cli_request_shape_test service_query_retries_new_endpoint_readiness_without_reprovisioning -- --exact(1 passed)cargo fmt --all --checkcargo clippy -p clickhousectl --all-targets -- -D warningsNo live Cloud resources or credentials were used.
Stack
This is the child of
issue-451-query-provision-singleflight(PR #493). It targets that parent branch; PR #493 remains unchanged and should merge first.