8000 Preserve StatefulSet preflight context and strengthen recreate tests by alex-zaitsev · Pull Request #2138 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content

Preserve StatefulSet preflight context and strengthen recreate tests - #2138

Merged
alex-zaitsev merged 1 commit into
0.28.0from
fix/2071-preflight-context-tests
Nov 4, 2026
Merged

alex-zaitsev merged 1 commit into
0.28.0from
fix/2071-preflight-context-tests

Conversation

@alex-zaitsev
@alex-zaitsev alex-zaitsev commented Nov 4, 2026 •
Copy link
Copy Markdown
Member

Follow-up to #2071 (fixes #1420).

Changes

  1. In the CHI StatefulSet adapter, preserve the caller's reconciliation context.Context instead of replacing it with k8sCtx() (which returns context.Background()). Pass a DeepCopy() of the desired StatefulSet to the dry-run Create.
  2. Strengthen the existing shared StatefulSet reconciler tests:
    • Trace the order of calls and verify validate → delete → create on successful recreates and AlreadyExists.
    • Use a typed Kubernetes Invalid error for the /metrics label regression, and verify that the only operation is validation.
    • Verify a temporary API-server error also stops after validation, without deleting or creating a StatefulSet.

@Slach Slach linked an issue Nov 4, 2026 that may be closed by this pull request
@alex-zaitsev
alex-zaitsev merged commit c6300b9 into 0.28.0 Nov 4, 2026
3 checks passed
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.

Adding an invalid label causes whole cluster to be removed

1 participant

0