-
Notifications
You must be signed in to change notification settings - Fork 2
fix(core): fix setting LastTransitionTime in condition if reason changed #1543
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
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideCondition builder now resets LastTransitionTime to the current time when a new timestamp isn’t provided or older, ensuring transitions are tracked correctly; the e2e test config’s obsolete log filter entry was also removed. Class diagram for updated Condition handling in SetConditionclassDiagram
class Conder
class "metav1.Condition" {
Time LastTransitionTime
string Reason
}
class "SetCondition()" {
}
Conder <|-- "SetCondition()"
"SetCondition()" --> "metav1.Condition" : updates
"metav1.Condition" : LastTransitionTime
"metav1.Condition" : Reason
"SetCondition()" : if newCondition.LastTransitionTime > existingCondition.LastTransitionTime
"SetCondition()" : else set LastTransitionTime to now
Flow diagram for LastTransitionTime update logic in SetConditionflowchart TD
A["Check if newCondition.LastTransitionTime is set and newer"] -->|Yes| B["Set existingCondition.LastTransitionTime = newCondition.LastTransitionTime"]
A -->|No| C["Set existingCondition.LastTransitionTime = now"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Workflow has started. The target step completed with status: failure. |
|
Workflow has started. The target step completed with status: failure. |
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
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.
…ged (#1543) Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Description
Fix setting LastTransitionTime in condition if reason changed.
Checklist
Changelog entries