Skip to content

Cover instance_password_update + instance_scaling_update#174

Open
sdairs wants to merge 2 commits into
md/add-clickpipes-supportfrom
issue-159-password-vertical-scaling
Open

Cover instance_password_update + instance_scaling_update#174
sdairs wants to merge 2 commits into
md/add-clickpipes-supportfrom
issue-159-password-vertical-scaling

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 15, 2026

Closes #159.

Summary

Adds two phases to the live service-CRUD integration test:

  • Vertical scaling (deprecated endpoint) — exercises instance_scaling_update (PATCH /scaling), distinct from instance_replica_scaling_update (PATCH /replicaScaling) already covered. Captures minTotalMemoryGb/maxTotalMemoryGb from the service at the tail of the existing scaling phase (1 replica @ 8 GB, so totals map cleanly to per-replica), round-trips 8 → 16 → 8 GB, polling for each change. Post-condition equals pre-condition so downstream phases see the expected base state. Non-blocking — the endpoint is deprecated and nothing downstream depends on it.
  • Password rotation — new "Password" phase exercises instance_password_update with an empty body (server generates the password). Asserts the response surfaces a non-empty password. The query path used elsewhere in the suite is openapi-key based, so the rotated password is not consumed downstream; no re-rotation needed since the service is deleted immediately after. Non-blocking.

Also rewrites four pre-existing nested if let blocks in spec_coverage_test.rs as let-chains so cargo clippy --tests -- -D warnings passes — CI's clippy invocation omits --tests, so these had drifted past the lint floor. Semantics unchanged.

Test plan

  • cargo build -p clickhouse-cloud-api
  • cargo clippy -p clickhouse-cloud-api --tests -- -D warnings
  • cargo test -p clickhouse-cloud-api (mock + spec-coverage tests pass; live integration test remains #[ignore] and is unchanged structurally)
  • Live integration run against the test org (cloud-integration CI on PR)

Do NOT merge — verify the live run first.

@sdairs sdairs requested a review from iskakaushik as a code owner May 15, 2026 15:59
@sdairs sdairs had a problem deploying to cloud-integration May 15, 2026 15:59 — with GitHub Actions Failure
@sdairs sdairs temporarily deployed to cloud-integration May 15, 2026 16:39 — with GitHub Actions Inactive
sdairs and others added 2 commits May 16, 2026 12:35
Closes #159.

Adds two phases to the live service-CRUD integration test:

- **Vertical scaling (deprecated endpoint)** — exercises
  `instance_scaling_update` (PATCH /scaling), distinct from
  `instance_replica_scaling_update` (PATCH /replicaScaling). Captures
  the service's pre-state `minTotalMemoryGb`/`maxTotalMemoryGb` at the
  end of the existing scaling phase (1 replica @ 8 GB so totals map
  cleanly to per-replica), round-trips 8 → 16 → 8 GB via the
  deprecated body, polling for each change to land. Post-condition
  equals pre-condition so downstream phases see the expected base
  state. Non-blocking — the endpoint is deprecated and not depended on.

- **Password rotation** — new "Password" phase exercises
  `instance_password_update` with an empty body so the server
  generates the password. Asserts the response surfaces a non-empty
  password. The query path used elsewhere in the suite is openapi-key
  based, so the rotated password is not consumed; no re-rotation
  needed because the service is deleted immediately after.
  Non-blocking.

Also rewrites four pre-existing nested `if let` blocks in
`spec_coverage_test.rs` as let-chains so
`cargo clippy --tests -- -D warnings` passes — CI's clippy
invocation omits `--tests`, so these had drifted past the lint floor.
Semantics unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The deprecated `instance_scaling_update` endpoint validates
`minTotalMemoryGb`/`maxTotalMemoryGb` as multiples of 12 (the modern
`instance_replica_scaling_update` endpoint accepts multiples of 4).
The test was using 16 GB and hit `BAD_REQUEST: The value must be a
multiple of 12 <number:16>`.

Add a "land on multiple-of-12 memory" Blocking step that moves the
service from the modern phase's 8 GB to 12 GB via the modern endpoint
before entering the deprecated round-trip, then round-trip 12 → 24 → 12
via the deprecated endpoint. Capture pre-state remains in place so the
restore step adapts if the API ever returns a different starting value.
@sdairs sdairs force-pushed the issue-159-password-vertical-scaling branch from caec374 to c2051ad Compare May 16, 2026 11:37
@sdairs sdairs changed the base branch from main to md/add-clickpipes-support May 16, 2026 11:37
@sdairs sdairs temporarily deployed to cloud-integration May 16, 2026 11:37 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cover instance_password_update + instance_scaling_update

1 participant