#11 Bogus "Test Matrix" section in Cloud pages
Closed by adamwill. Opened by adamwill.

I noticed while reviewing https://pagure.io/fedora-qa/relval/pull-request/42 that the data for the Cloud section in testcase-stats is kinda wrong. We have x86_64 and aarch64 sections with correct info, but also a "Test Matrix" section which looks like it has the same contents as x86_64.

This turns out to be a python-wikitcms issue. We get results from ResultPage.get_resultrows(). That uses the ResultPage.results_sections property to determine which sections of the page might have result rows in them, then tries to find result rows in each of those sections one by one. To decide what text is "in" each section, it uses the sections' byteoffset values - it intends to takes the text from the start of the section up until the start of the next section. But there's a problem with this: sections that come in via template transclusion have None as their byteoffset.

In the Cloud page, we have the "Test Results" section (8) with byteoffset 128, and then the next section is "Cloud Provider Setup (8.1), which comes in via a template, so has byteoffset None. So get_resultrows() decides to do pagetext[128:None] to get the text...which gives us all the text from byte 128 to the end of the page. So we wind up with a "Test Results" section that has all the results in the page in it.

I'm not totally sure how to fix this. We can't rejig to use the wiki API to get the text for each section, because on every page the results sections are nested, so doing that would just give us the same problem only worse. I'll have another think about this tomorrow.


Should be fixed with https://pagure.io/fedora-qa/python-wikitcms/c/081e8a2983dc7d3d7986da0f8afdc5f83cca82dd?branch=main . I went with a hack, to go with how hacky this whole thing is anyway: just keep looking till we find the next section with a byteoffset. It should work fine in practice as we know there are no result rows in sections transcluded from templates.

Metadata Update from @adamwill:
- Issue status updated to: Closed (was: Open)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/quality/python-wikitcms/issues/11

Please continue any further discussion there.

Metadata