-
Notifications
You must be signed in to change notification settings - Fork 9.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
fix(e2e): ignore error log about failed storage update #19060
base: main
Are you sure you want to change the base?
Conversation
14b5e84
to
27a885e
Compare
tests/e2e/logging_test.go
Outdated
"setting up serving from embedded etcd failed.": true, | ||
// See https://github.com/etcd-io/etcd/pull/19040#issuecomment-2539173800 | ||
// TODO: Remove with etcd 3.7 | ||
"failed to update storage version": true, |
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.
We only ignore the specific error message.
"failed to update storage version": true, | |
"cannot detect storage schema version: missing confstate information": true, |
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 test seems to check the msg
not error
object in the logged JSON: https://github.com/ghouscht/etcd/blob/ignore-missing-err-confstate/tests/e2e/logging_test.go#L136-L139
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.
I think we need to check both the msg and error. In this case, it makes more sense to ignore the specific error message cannot detect storage schema version: missing confstate information
.
We can add one more field "Error
" into logEntry
.
type logEntry struct {
Level string `json:"level"`
Timestamp string `json:"ts"`
Caller string `json:"caller"`
Message string `json:"msg"`
}
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.
Adapted the code to check the Message and Error for a match. If one of the two matches exactly the error is ignored. Hope that is ok
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted filessee 19 files with indirect coverage changes @@ Coverage Diff @@
## main #19060 +/- ##
==========================================
- Coverage 68.83% 68.78% -0.05%
==========================================
Files 420 420
Lines 35626 35626
==========================================
- Hits 24523 24507 -16
- Misses 9679 9692 +13
- Partials 1424 1427 +3 Continue to review full report in Codecov by Sentry.
|
Signed-off-by: Thomas Gosteli <[email protected]>
27a885e
to
07fd512
Compare
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.
LGTM
Thank you!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, ghouscht 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 |
Should fix #18978 as suggested by @ahrtr