Skip to content

chk/controller: nil-check Get result in poll loop#1977

Closed
SAY-5 wants to merge 1 commit intoAltinity:masterfrom
SAY-5:fix/poll-nil-cr-1972
Closed

chk/controller: nil-check Get result in poll loop#1977
SAY-5 wants to merge 1 commit intoAltinity:masterfrom
SAY-5:fix/poll-nil-cr-1972

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 2, 2026

Closes #1972. c.kube.CR().Get returns a nil interface on transient errors; the bare cur.(*apiChk.ClickHouseKeeperInstallation) then panics every reconcile.

Closes Altinity#1972. Get returns a nil interface on transient errors; the type assertion panics.
@alex-zaitsev
Copy link
Copy Markdown
Member

Duplicate of #1974

@alex-zaitsev alex-zaitsev marked this as a duplicate of #1974 May 4, 2026
@alex-zaitsev alex-zaitsev requested a review from sunsingerus May 4, 2026 06:49
@sunsingerus
Copy link
Copy Markdown
Collaborator

Thanks for the contribution! Closing in favor of #1974, which addresses the same panic (issue #1972) with broader error handling — it follows the existing safe-cast pattern from pkg/controller/chk/kube/cr.go (statusUpdateProcess at lines 98-122): type-assert with ok, treat NotFound as terminal so polling stops cleanly when the CR is deleted, log+retry transient errors at V(1), and honor context cancellation before sleeping. #1974 has just been merged.

@sunsingerus sunsingerus closed this May 4, 2026
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.

panic: interface conversion: v1.ICustomResource is nil, not *v1.ClickHouseKeeperInstallation [recovered, repanicked]

3 participants