You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Filter some failed KaaS Tests #1087
After discussion in today’s Container meeting HedgeDoc, we agreed that a fixed list of tests is allowed to fail.
For every item in that list, there should be a description of why it is okay to fail.
The network tests allow the argument --e2e-skip, but the conformance tests do not.
We suggest running the tests and doing some post-processing.
I had a short look at the code, and I am unsure where to add this.
@mbuechse (or someone else): can we join and find a way to solve that?
Currently, I have the vague idea of parsing JUnit XML files created by sonobuoy.
We could use the Python package junit2html to create a nice report and show which tests are fine, which are okay to fail, and which failed.
The default result of junit2html is not very usable at the moment, because so many tests get skipped (because only a few tests are part of the conformance test list) that looking at the report is not convenient.
We should implement it so that re-running the report generator after scs-compliance-check.py finished is possible. Otherwise, the development inner loop is way too long. I don't want to wait hours :-)
Additionally, I would like to output some timing information. I am curious why the test takes several hours and which test it is.
I think we should write up a YAML file that lists all tests that are to be downgraded to recommendations, together with a reason for each test, and then we add a command-line switch to supply the YAML file to the sonobuoy handler script.
The timing info would be very interesting indeed. I will have to look into the XML file to see what kind of information is provided there.
Yes sure, let's do postprocessing. (Who knows what the results can be good for, even if demoted to recommendation or even optional.)
Great, that you see it the same. Postprocessing has the benefit that the report-generation can be re-run after the long running test has finished.
We already parse the XML file, see ...
This code parses sonobuoy_results.yaml, not the junit xml file.
I had a the junit xml file.
<testcasename="[It] [sig-network] Netpol NetworkPolicy between server and client should allow ingress access from updated pod [Feature:NetworkPolicy]"classname="Kubernetes e2e suite"status="passed"time="28.067231293">
</testcase>
Looks good. The timing info seems available.
BTW, Why not create a nice HTML report at the end?
You're right. I think we wanted to parse the XML at some point, and when that proved difficult, I found that a YAML file exists and opted for that one. I guess I can change that again -- no problem.
What I want in the end is that all relevant information is contained in the report.yaml generated by the main script and then sent to the compliance monitor, where it can then be requested and studied by interested parties. Maybe we can include better visualization into the compliance monitor. Or we say people have to run the conversion to HTML locally because it's a niche use-case -- I don't know.
@mbuechse sounds good. We can do it in these steps:
long running tests get executed
Script1 reads junit xml generates report.yaml
optional: Script2 reads report.yaml and creates nice self-contained html.
Both scripts should be able to be executed again and again without the need to start the long running tests again.
Does this make sense to you?
BTW, currently the -o option is optional (to create the report). I think that should be mandatory. ... Or wait I had a different idea yesterday: The scs-compliance script gets a directory name. This directory must not exist, because we do not want to overwrite any files. In that directory there will be report.yaml. Then the number of arguments gets smaller, because -o is no longer needed.
Currently, you won't get a report.yaml, if you forgot the -o option ...
The main use-case for the whole testsuite and machinery is to have it run nightly (edit: regularly, can also be weekly or monthly) in a CI pipeline. Depending on the config, you will always have a dedicated directory for all kinds of artifacts. If, on the other hand, someone wants to test manually, I think it is on them to run the script in a way that suits their purposes. That being said, I do agree that we can (and should) improve the user experience for that scenario. However, from a more holistic perspective, I think the way we should approach these improvements would look a little differently and might need a bit more contemplation and discussion. I will be very happy to work on that topic.
(I should add that the Sonobuoy tests are the first tests integrated into this testsuite that run longer than a minute or two, and that produce such a large amount of output. I think overhauling the main script is in order one way or another...)
just a general comment: @mbuechse I believe that the tests currently run more often than necessary. I actually don't know the exact schedule right now, but I think this is a topic we can maybe bring up to the SIG standardization or so, to actually have clear picture there (if that clear picture doesn't exist yet).
just a general comment: @mbuechse I believe that the tests currently run more often than necessary. I actually don't know the exact schedule right now, but I think this is a topic we can maybe bring up to the SIG standardization or so, to actually have clear picture there (if that clear picture doesn't exist yet).
Yes, sure, they could run weekly or monthly. We wanted to change that, but it was never a priority, and we received no complaints.
From my POV, the report.yaml in its current state (in your zip, this is report-2026-02-06T11:05+01:00.yaml) contains too much noise. The script that invokes Sonobuoy should be altered so as to reduce output on stdout/stderr to a minimum. Its main task is twofold:
to invoke "sonobuoy run" and "sonobuoy retrieve" (ignore any output except in case of an error)
to parse the junit XML file and output the list of failed Sonobuoy testcases (preferably on stdout) as well as a verdict (overall PASS/FAIL)
I don't want a list of all the thousands of testcases that were skipped. For the testcases that weren't skipped, maybe the 10 longest running could be output together with the duration (preferably on stderr).
Everything else, the megabytes on top of megabytes of output in the working directory is not relevant for the compliance monitor as far as I can tell. It's mainly relevant for debugging purposes. It would be a waste to keep it.
In my mind, the tests would usually be passed, and the debug output wouldn't be needed. Except in the rare case where the tests would fail. For this case, the CI job could be implemented in such a way that the working directory is preserved at least until the next run (24 hours or even 7 days later).
Storing only those two files for each of the two Sonobuoy runs that we do results in a 250 KiB zip file (a quarter of the zip file that contains the whole working directory). But I'm still not convinced that we need all of that, because it mostly tells us that thousands of test cases were skipped.
@mbuechse Update: We want to have that solved soon for the meeting tomorrow, I think I will update the CheckRunner Python class instead of switching to parsing junit.
@mbuechse Update: We want to have that solved soon for the meeting tomorrow, I think I will update the CheckRunner Python class instead of switching to parsing junit.
I don't see how this would work. The class you refer to has no knowledge of KaaS and it shouldn't have that either. What it does is parse the stdout/stderr of some subprocess, and in our case, that subprocess is ./kaas/sonobuoy_handler/run_sonobuoy.py. We have full control over the stdout/stderr of that, so we should be working over there.
Also, I don't support the tight deadline, and I don't see why it's necessary.
Activity
mbuechse commentedon Feb 6, 2026
We already parse the XML file, see
https://github.com/SovereignCloudStack/standards/blob/main/Tests/kaas/sonobuoy_handler/sonobuoy_handler.py#L123
I think we should write up a YAML file that lists all tests that are to be downgraded to recommendations, together with a reason for each test, and then we add a command-line switch to supply the YAML file to the sonobuoy handler script.
The timing info would be very interesting indeed. I will have to look into the XML file to see what kind of information is provided there.
mbuechse commentedon Feb 6, 2026
Just to be clear, we would then change these lines
so the respective YAML file will be given to the script.
guettli commentedon Feb 6, 2026
@mbuechse the sonobuoy conformance tests do now allow skipping e2e tests. You get:
Filtering works for the Network tests.
To avoid complex code I suggest that we focus only on post-processing (no e2e-skip).
mbuechse commentedon Feb 6, 2026
Yes sure, let's do postprocessing. (Who knows what the results can be good for, even if demoted to recommendation or even optional.)
guettli commentedon Feb 6, 2026
Great, that you see it the same. Postprocessing has the benefit that the report-generation can be re-run after the long running test has finished.
This code parses
sonobuoy_results.yaml, not the junit xml file.I had a the junit xml file.
Looks good. The timing info seems available.
BTW, Why not create a nice HTML report at the end?
mbuechse commentedon Feb 6, 2026
guettli commentedon Feb 6, 2026
@mbuechse sounds good. We can do it in these steps:
Both scripts should be able to be executed again and again without the need to start the long running tests again.
Does this make sense to you?
BTW, currently the -o option is optional (to create the report). I think that should be mandatory. ... Or wait I had a different idea yesterday: The scs-compliance script gets a directory name. This directory must not exist, because we do not want to overwrite any files. In that directory there will be report.yaml. Then the number of arguments gets smaller, because -o is no longer needed.
Currently, you won't get a report.yaml, if you forgot the -o option ...
mbuechse commentedon Feb 6, 2026
The main use-case for the whole testsuite and machinery is to have it run nightly (edit: regularly, can also be weekly or monthly) in a CI pipeline. Depending on the config, you will always have a dedicated directory for all kinds of artifacts. If, on the other hand, someone wants to test manually, I think it is on them to run the script in a way that suits their purposes. That being said, I do agree that we can (and should) improve the user experience for that scenario. However, from a more holistic perspective, I think the way we should approach these improvements would look a little differently and might need a bit more contemplation and discussion. I will be very happy to work on that topic.
mbuechse commentedon Feb 6, 2026
(I should add that the Sonobuoy tests are the first tests integrated into this testsuite that run longer than a minute or two, and that produce such a large amount of output. I think overhauling the main script is in order one way or another...)
janiskemper commentedon Feb 6, 2026
just a general comment: @mbuechse I believe that the tests currently run more often than necessary. I actually don't know the exact schedule right now, but I think this is a topic we can maybe bring up to the SIG standardization or so, to actually have clear picture there (if that clear picture doesn't exist yet).
guettli commentedon Feb 6, 2026
syself-2026-02-02.zip
@mbuechse I uploaded the test result from todays run.
I think this zip should be enough, so that script1 (to create report.yaml) and script2 (create html) can run.
(I think the scripts should read the unzipped files from a directory)
It contains some failed tests which we would like to ignore. More about that later.
Btw, this script used this change:
But as discussed, we want to avoid to use e2e-skip.
mbuechse commentedon Feb 6, 2026
Yes, sure, they could run weekly or monthly. We wanted to change that, but it was never a priority, and we received no complaints.
mbuechse commentedon Feb 7, 2026
From my POV, the report.yaml in its current state (in your zip, this is report-2026-02-06T11:05+01:00.yaml) contains too much noise. The script that invokes Sonobuoy should be altered so as to reduce output on stdout/stderr to a minimum. Its main task is twofold:
I don't want a list of all the thousands of testcases that were skipped. For the testcases that weren't skipped, maybe the 10 longest running could be output together with the duration (preferably on stderr).
Everything else, the megabytes on top of megabytes of output in the working directory is not relevant for the compliance monitor as far as I can tell. It's mainly relevant for debugging purposes. It would be a waste to keep it.
In my mind, the tests would usually be passed, and the debug output wouldn't be needed. Except in the rare case where the tests would fail. For this case, the CI job could be implemented in such a way that the working directory is preserved at least until the next run (24 hours or even 7 days later).
mbuechse commentedon Feb 7, 2026
Regarding the working directory -- CNCF k8s conformance only asks for two files:
(source)
Storing only those two files for each of the two Sonobuoy runs that we do results in a 250 KiB zip file (a quarter of the zip file that contains the whole working directory). But I'm still not convinced that we need all of that, because it mostly tells us that thousands of test cases were skipped.
guettli commentedon Feb 16, 2026
@mbuechse yes, there is too much output because so many tests get skipped. I will work on a PR which filters the output.
guettli commentedon Feb 16, 2026
@mbuechse Update: We want to have that solved soon for the meeting tomorrow, I think I will update the CheckRunner Python class instead of switching to parsing junit.
mbuechse commentedon Feb 16, 2026
I don't see how this would work. The class you refer to has no knowledge of KaaS and it shouldn't have that either. What it does is parse the stdout/stderr of some subprocess, and in our case, that subprocess is
./kaas/sonobuoy_handler/run_sonobuoy.py. We have full control over the stdout/stderr of that, so we should be working over there.Also, I don't support the tight deadline, and I don't see why it's necessary.
guettli commentedon Feb 16, 2026
@mbuechse thank you for pointing me in the right direction. I created a PR: Allow some Sonobuoy tests (KaaS) to fail. by guettli · Pull Request #1092 · SovereignCloudStack/standards