Skip to content

fix: report deployment apply failures on the cluster status - #441

Open
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-182-failed-patches-should-return-the-error
Open

fix: report deployment apply failures on the cluster status#441
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-182-failed-patches-should-return-the-error

Conversation

@ivanauth

Copy link
Copy Markdown
Contributor

Fixes #182

A patch that produces a Deployment the API server rejects was only logged, so the failure was invisible on the SpiceDBCluster. The apply error is now surfaced as a RolloutError condition with reason ApplyFailed, and cleared once an apply succeeds.

When applying the SpiceDB deployment fails, for example because a
user-provided patch produced an object the API server rejects, the
error was only visible in operator logs while the cluster status gave
no indication of the problem. Set a RolloutError condition with reason
ApplyFailed before requeueing, and clear it again on the next
successful apply.

Signed-off-by: ivanauth <ivan@authzed.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/controller/ensure_deployment.go 33.33% 4 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

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.

Failed patches should return the error in the status

2 participants