Page MenuHomePhabricator

Quibble to output markers for processing its output
Open, Needs TriagePublic

Description

The CI Jenkins has the Collapsing Console Sections Plugin. It can be used to collapse sections of the console output. For example:

To do so, the plugin relies on regular expressions we fill to detect the start and end of a section (via /ci/configure. A gotcha is that when no end of section is filled, the next section would be made a child. We thus have to terminate a section based on the output of an unrelated command that comes after which is not that reliable.

Some recently added rule was for Fresnel run (T220561). Example rules:

Namefresnel record ({1})
Start.*fresnel record\s*"?([^"]*).*
End.*conductor/record-end.*

Which is probably fine.

NameFresnel result
Start.*fresnel compare.*
Ends.*INFO:.*

INFO: comes from Quibble output, not Fresnel and might change. Another example:

Namesetup quibble mw-install
Start`.*(HHVMPHP).+ is installed.*`
Ends`.*INFO:quibble.cmd:(PHPUnitUser).*`

Maybe we could define a standard format to start/end section which can then be optionally inserted in the output of Quibble and testing tools?

It is probably rather trivial to implement it with a python decorator added to relevant Quibble methods.

Details

Related Gerrit Patches:
integration/config : masterjjb: Switch over to images using Quibble version 0.0.40
integration/config : masterdockerfiles: Create images for Quibble version 0.0.40
integration/quibble : masterRelease Quibble 0.0.40
integration/quibble : masterChronometer emits folding markers

Event Timeline

Travis does that using folding markers. Eg:

travis_fold:start:Some step
// some stuff there
travis_fold:end:Some step

Described at https://blog.travis-ci.com/2013-05-22-improving-build-visibility-log-folds

Krinkle updated the task description. (Show Details)Apr 10 2019, 12:43 PM
awight added a subscriber: awight.Oct 2 2019, 12:35 PM

We might get this for free once e30d25a72ac50a0828835f18f9d34396d7d847d7 is deployed, each section will end with "<command string> finished in <time>". Otherwise, I like hashar's suggestion to add another decorator to produce easily matched delimiters.

Change 545972 had a related patch set uploaded (by Hashar; owner: Awight):
[integration/quibble@master] Chronometer emits folding markers

https://gerrit.wikimedia.org/r/545972

Change 545972 merged by jenkins-bot:
[integration/quibble@master] Chronometer emits folding markers

https://gerrit.wikimedia.org/r/545972

Hashar wrote in code review,

I guess that is a good first step not sure whether that would ease anything with the Jenkins collapsing plugin though :]

I think I've misunderstood the problem here, I was following this note from the task description:

A gotcha is that when no end of section is filled, the next section would be made a child. We thus have to terminate a section based on the output of an unrelated command that comes after which is not that reliable.

With the merged patch, there will be a "<<< Finish: [...]" marker at the end of each section. Is there more to do here?

Yes, try it and see whether we can parse them with the Jenkins Collapsible plugin :]

Change 562918 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/quibble@master] Release Quibble 0.0.40

https://gerrit.wikimedia.org/r/562918

Change 562918 merged by jenkins-bot:
[integration/quibble@master] Release Quibble 0.0.40

https://gerrit.wikimedia.org/r/562918

Change 562959 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/config@master] dockerfiles: Create images for Quibble version 0.0.40

https://gerrit.wikimedia.org/r/562959

Change 562960 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/config@master] jjb: Switch over to images using Quibble version 0.0.40

https://gerrit.wikimedia.org/r/562960

Change 562959 merged by jenkins-bot:
[integration/config@master] dockerfiles: Create images for Quibble version 0.0.40

https://gerrit.wikimedia.org/r/562959

Mentioned in SAL (#wikimedia-releng) [2020-01-08T20:56:33Z] <James_F> Docker: Publishing Quibble 0.0.40 images on contint1001 T192167 T220586 T236222 T236680

Change 562960 merged by jenkins-bot:
[integration/config@master] jjb: Switch over to images using Quibble version 0.0.40

https://gerrit.wikimedia.org/r/562960