-
Notifications
You must be signed in to change notification settings - Fork 552
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
rptest: Ignore error logs generated by anomaly injection #16496
rptest: Ignore error logs generated by anomaly injection #16496
Conversation
/ci-repeat 10 |
/ci-repeat 10 |
a24233b
to
4f2acee
Compare
/ci-repeat 10 |
302e0dc
to
4f2acee
Compare
/ci-repeat 10 |
/ci-repeat |
4f2acee
to
c9982b5
Compare
The log allow list decorator conventionally matches logs on string or regex. Sometimes finer grained checks are required, where extra context is needed to see if a log message is acceptable or signals an error. The AllowLogsOnPredicate class allows a test to register one of its methods to be called for each error log, that method can then return a not-None style result to signal that an error is acceptable, and False or None to signal that an error should cause the test to fail.
The base offset value is useful when validating error logs.
This test removes a segment from the manifest to generate anomalies. A side effect of this is that the validation in manifest done during spillover which checks that the start of the manifest and the start of spillover must match can fail, because the first segment of the manifest has been force reset away. Effectively, spillover manifest is creating by iterating over segment list in main manifest. This main manifest is missing its first segment because of the anomaly injection. When applying the spillover command, the manifest compares the start offsets of the spillover meta and the main manifest. The start offset has not changed during the anomaly injection. As a result the apply-spillover command fails. This is acceptable because the anomaly injection should cause this failure, and this change adds the error to allow list.
c9982b5
to
b4ee8fb
Compare
the predicate to return falsy values to reject a log from being allowed. | ||
""" | ||
assert self.predicate is not None, f"Log predicate method {self.method} is not initialized" | ||
return self.predicate(log_line) or None |
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.
cool stuf
/backport v23.3.x |
/backport v23.2.x |
Failed to create a backport PR to v23.3.x branch. I tried:
|
Failed to create a backport PR to v23.2.x branch. I tried:
|
Backporting as it is looks tricky. It might be easier to just add the string to log allow list in the two branches. |
FIXES #16474
This test removes a segment from the manifest to generate anomalies. A side effect of this is that the validation in manifest done during spillover which checks that the start of the manifest and the start of spillover must match can fail, because the first segment of the manifest has been force reset away.
Effectively, spillover manifest is creating by iterating over segment list in main manifest. This main manifest is missing its first segment because of the anomaly injection.
When applying the spillover command, the manifest compares the start offsets of the spillover meta and the main manifest. The start offset has not changed during the anomaly injection. As a result the apply-spillover command fails.
This is acceptable because the anomaly injection should cause this failure, and this change adds the error to allow list.
Additionally, a utility is added which can allow logs using information from a test run.
Backports Required
Release Notes