[omdb] de-flake and tidy up sp_ereport_ingester status
#9054
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's currently a test flake in the
test_omdb_success_casestest due to the output from thesp_ereport_ingesterbackground task (see #8979). This is because the status output for that test will depend on the number of MGSes and simulated SPs that are currently present when the test runs. In particular, this means that the output may differ based on whether the test is run in isolation or as part of a run including other tests, as it's likelier that Nexus will have discovered the simulated SPs when other tests have already run.This branch fixes the flake by adding additional redaction configs for this task's status output. We now redact all the numbers in the output. Additionally, we must redact the sections listing individual SPs and their ereport counts, and the section listing top level errors. Since these sections are only shown when the lists of SPs or errors are non-empty (the output looks weird if we print an empty section heading for them), we don't use the existing
Redactor::sectionmethod. This method will replace the indented contents of a section with the string<{section_name}_REDACTED>. That's sufficient when just the section contents are variable, but in this case, the sections may or may not be present depending on whether MGS was up, so we would get either a redacted section (if it was present) or nothing. Therefore, I've added a newRedactor::totally_annihilate_sectionmethod that removes a section along with its heading for use in this case. It's a bit of a shame to totally wipe these sections from the output, but it seemed like the best choice under the circumstances.I've also tweaked the status output a little bit to fix some cases where numbers in the output were not aligned the way I wanted them to be, and to make it slightly friendlier to the redactor by removing totals from the headings of redacted sections.
Fixes #8979