-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Update conditions.Set function to set LastTransitionTime only when status of condition changes #11176
base: main
Are you sure you want to change the base?
Conversation
@fabriziopandini @sbueringer Please review when you get time. Thank you. |
/retitle 🌱 Update conditions.Set function to set LastTransitionTime only when status of condition changes |
/area util |
/assign @fabriziopandini |
09ecb1f
to
0a87b8a
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
{ | ||
name: "Set a condition that already exists but with different Message should preserve the last transition time", | ||
to: setterWithConditions(fooWithLastTransitionTime), | ||
new: fooWithBarMessage, |
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.
What about adding also a test where the new condition has a last transition time time set (but it gets ignored)
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.
Added a new test in separate commit, Please let me know if anything else needs to be added. Thank you.
0a87b8a
to
0d69527
Compare
Please take a look at this PR, when you get chance. Thank you. |
Heyho, @fabriziopandini @vincepri WDYT? If this is really absolutely needed, I would recommend that we an additional Set func with a different name and keep the current Set exactly as is. |
What this PR does / why we need it:
This PR existing behavior of Set condition function as follows
Existing behavior
Proposed behavior
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #11033