-
Notifications
You must be signed in to change notification settings - Fork 157
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
add start/end logs to outage entries #911
add start/end logs to outage entries #911
Conversation
84a9529
to
0cc8a26
Compare
/test e2e-aws-serial |
2 similar comments
/test e2e-aws-serial |
/test e2e-aws-serial |
case currentOutage != nil && latestFailure.Start.After(latestSuccess.Start.Time): | ||
// outage ongoing | ||
if len(currentOutage.StartLogs) == 0 || currentOutage.StartLogs[0].Message != latestFailure.Message { | ||
currentOutage.StartLogs = append([]operatorcontrolplanev1alpha1.LogEntry{latestFailure}, currentOutage.StartLogs...) |
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 will produce infinite startlogs, right? We want a cap.
Also, we want EndLogs
to always have the last five-ish failures.
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.
Done.
// outage ended | ||
currentOutage.End = latestSuccess.Start | ||
outageDuration := currentOutage.End.Sub(currentOutage.Start.Time) | ||
currentOutage.EndLogs = []operatorcontrolplanev1alpha1.LogEntry{latestSuccess} |
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 should be an append.
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.
Done.
I'm not really happy with the logic, but I need something in CI now. Please update the endlogs and startlogs.
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
0cc8a26
to
1d998ff
Compare
/lgtm probably want to factor the append logic out and keep using it. I suspect we may want the lists sorted in opposite directions, but I guess we'll see. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, sanchezl The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
Add log entries that affect the state of an outage to the outage entry.