Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the object that failed in controller::Error::ReconcilerFailed #733

Merged
merged 1 commit into from Nov 24, 2021

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Nov 24, 2021

Motivation

Most errors are influenced by the object being reconciled, so including it is useful to diagnose the problem. Typically I end up including this myself in the concrete error type, but that's a lot of repetitive typing for something that kube-runtime already knows about.

Solution

Add it to the global ReconcilerFailed variant instead.

@nightkr nightkr added runtime controller runtime related errors error handling or error ergonomics labels Nov 24, 2021
@nightkr nightkr requested review from clux and kazk November 24, 2021 15:05
@nightkr nightkr self-assigned this Nov 24, 2021
Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
@nightkr nightkr force-pushed the feature/controller-error-objref branch from 43f0819 to de7cb4c Compare November 24, 2021 15:06
Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

looks like a good default improvement 👍

kube-runtime/src/controller/mod.rs Show resolved Hide resolved
@nightkr nightkr merged commit fba749d into kube-rs:master Nov 24, 2021
@nightkr nightkr deleted the feature/controller-error-objref branch November 24, 2021 16:26
nightkr added a commit that referenced this pull request Nov 24, 2021
@clux clux added this to the 0.65.0 milestone Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors error handling or error ergonomics runtime controller runtime related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants