Skip to content

reconcile: properly handle parsing and get errors for prom objects#2036

Merged
AndrewChubatiuk merged 2 commits intomasterfrom
reconcile-tolerate-creation-conflict
Apr 13, 2026
Merged

reconcile: properly handle parsing and get errors for prom objects#2036
AndrewChubatiuk merged 2 commits intomasterfrom
reconcile-tolerate-creation-conflict

Conversation

@AndrewChubatiuk
Copy link
Copy Markdown
Contributor

@AndrewChubatiuk AndrewChubatiuk commented Apr 7, 2026

Summary by cubic

Improve reconcile error handling for Prometheus and VictoriaMetrics controllers. Parsing errors are detected and reported correctly, metrics are labeled accurately, and VM CRDs set status to Failed on parse failures.

  • Bug Fixes
    • Split error paths: handleReconcileErrWithStatus updates VM CRD status on parse errors; Prom reconcilers defer error handling and convert conversion failures to parsing errors.
    • Fix metrics: increment parseObjectErrorsTotal, getObjectsErrorsTotal, and conflictErrorsTotal; deregister collectors on get errors; ignore not-found.
    • Conflict handling: requeue after 5s and record metrics only when namespace is set.
    • Add tests for handleReconcileErrWithStatus covering nil, parsing error, context canceled, and transient cases.

Written for commit 774382a. Summary will update on new commits.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 30 files

@AndrewChubatiuk AndrewChubatiuk merged commit 1be4013 into master Apr 13, 2026
7 checks passed
@AndrewChubatiuk AndrewChubatiuk deleted the reconcile-tolerate-creation-conflict branch April 13, 2026 10:20
vrutkovs added a commit that referenced this pull request Apr 17, 2026
…2036)

* reconcile: properly handle parsing and get errors for prom objects

* test: add tests for ReconcileErrWithStatus

---------

Co-authored-by: Vadim Rutkovsky <vadim@vrutkovs.eu>
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.

2 participants