-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
CompletionTime is not set if Succeeded is already True #2741
Comments
Interesting. |
Well The way we manage this in Knative is to have higher-level functions for manipulating status conditions. The equivalent here would be to have the function(s) that put Succeeded into a terminal state also update CompletionTime. I haven't poked around to see how this is set throughout the reconcilers today, but would be happy to advice if someone wants to look 😇 /good-first-issue |
@mattmoor: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I may take a look at this next. It's all over and I think it'll clean things up a bit. |
These helpers reduce a lot of the boilerplate and give us hooks where we can eagerly set the CompletionTime field rather than waiting for `updateStatus`. Fixes: tektoncd#2741
These helpers reduce a lot of the boilerplate and give us hooks where we can eagerly set the CompletionTime field rather than waiting for `updateStatus`. Fixes: #2741
Expected Behavior
CompletionTime is always updated to reflect the time the task/pipeline was observed to succeed.
Actual Behavior
CompletionTime is only updated when something else in Status is being touched. This is because
updateStatus
is guarded by an equivalence check, so if nothing else changes, then this doesn't get set.Steps to Reproduce the Problem
I saw this in a unit test where I set the condition but not CompletionTime, and was surprised it wasn't set.
Additional Info
This is going to be blocking for a transition away from hand-rolled
updateStatus
to// +genreconciler
./kind bug
The text was updated successfully, but these errors were encountered: