-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Track the reason for object reconciliation #571
Track the reason for object reconciliation #571
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a really clean way of doing it. looking forward to seeing how the spans look!
left a minor nit on clippy, but can fix that up later, feel free to merge.
@@ -37,6 +37,7 @@ pub struct FooStatus { | |||
|
|||
fn main() { | |||
println!("Kind {}", FooCrd::kind(&())); | |||
#[allow(clippy::blacklisted_name)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally i think we can just hard enable this like it's done in the Makefile
tbh; .github/workflows/clippy.yml
under the clippy step:
args: -- --allow clippy::blacklisted_name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The annoying part there is that it only applies to CI builds. I have Rust-Analyzer set up to watch-run clippy, which wouldn't pick that up.
We could do it with a crate-global #![allow(clippy::blacklisted_name)]
, but I'm not sure that would be a huge win (it'd still have to be applied separately to each example, kind of going against the whole point).
jobs.delete("empty-job", &DeleteParams { | ||
dry_run: true, | ||
..DeleteParams::default() | ||
}) | ||
.await?; | ||
jobs.delete("empty-job", &DeleteParams { | ||
dry_run: false, | ||
..DeleteParams::default() | ||
}) | ||
.await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe DeleteParams
should have builders like ListParams
🤔 . not really a fan of the ..Default
for example code for one var change.
ReconcilerRequestedRetry, | ||
ErrorPolicyRequestedRetry, | ||
BulkReconcile, | ||
Custom { reason: String }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reasons look sensible. but curious about the Custom
one, it's not created anywhere, but presumably intentioned as user-facing? can they be returned from the reconciler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if you're using applier
then custom trigger functions can inject any reason that it wants to (although it doesn't have to, since we define a ReconcileRequest<K>: From<ObjectRef<K>>
that falls back to Unknown
).
Maybe Oops, forgot we already know the related object here so there wouldn't be much of a point.Controller::watches
should also allow this, actually?
this probably closes #457 with all other tasks done. |
released in 0.58 :-) |
See #457 (comment), #423
Generally this only tracks the first reason an object to be reconciled.