On Tue, Apr 06, 2021 at 08:49:01AM +0200, Lucas Nussbaum wrote:
Hi,
On 05/04/21 at 15:14 +0100, Jelmer Vernooij wrote:
The python3-buildlog-consultant package now has a "analyse-sbuild-log" command that can parse and analyse sbuild logs and in most cases
identity the line or lines that explain why a build failed.
E.g.:
% analyse-sbuild-log --json ~/build.log
{"stage": "build", "section": "Build", "lineno": 857, "kind": "missing-python-module", "details": {"module": "setuptools", "python_version": 3, "minimum_version": null}}
This is what powers the line selection for the fragments shown by the Debian janitor for failed builds.
Nice!
I've done something similar for my archive rebuild scripts[1]. Maybe we should try merge efforts in some way?
Perhaps we can share a common data file with the single-line regexes?
That's where the bulk of my effort is today, and that seems like the
easiest way to share efforts.
[1] see log-parser-* in https://salsa.debian.org/lucas/collab-qa-tools/-/tree/master/lib/collab-qa
test cases are https://salsa.debian.org/lucas/collab-qa-tools/-/tree/master/test
Some comments based on my own experience:
- did you consider adding a mode where it would output log lines that
precede the failure from the last interesting point, to make it easy to
file bugs?
Yep, it has a context mode (similar to diff) as of yesterday.
- running your tool against my test cases would be interesting
It seems to identify the problematic line in almost (all?) the same
cases, but doesn't always provide a better classification than your
script does - i.e. it finds python exceptions and segmentation faults
but doesn't call them out as such.
Cheers,
Jelmer
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEsjhixBXWVlpOhsvXV5wWDUyeI+gFAmBsJY0ACgkQV5wWDUye I+gSixAArryF6U/evESgPUVsDkOVNozt/7SM37DWQHArefhq+wYnOiZ7a3bspu/c TgROtTQhtxhkkVZ/rjXrl6gv6siRakQFiaYrkjbhZjFEp4458D75dg6tnynTtGuc m/yrgc4qZwe9kTYkAT86ehCE1p9A0tFuOW4OQR54Bj2rl6dkXikuZyYQ7UU9Pna6 T8SlckyZOlxU2xvn6FcSvSWK7FNu36aV8mPheGZM39/dzbGHiiw6vXx5+2lzCLpJ jvk+ykIMguy72CEnmYysFbcQlv/DoP1+C+m4idixTzM7cNOYVt7Qv7HIcN/A+suP BUBly2fVHnnxOXHc+1Yi2tCdT+n6TnwWBRo0ghPjmqC/FzHer6kOhoi7zkeOSDs4 3wIs7IvdsXB2vQ/Gk2w39UWu4Da5P8MonfYLe9DbOs/5maTlArYcT/ca+ZoLzrx6 djrc6fJTx0CrcQJgHKsL4JjRxHkmM33LbI+q2GfyQwIrujhVVIUBaqK73M9nnIi1 BpTczXtdUB8arUABfTfsPUznpilEFg+6+D7FyFW5xJKy3j6LH02Uc5LVhhkL3/hN 8wz1sP6bFWxRDGgwhJDXrM8lcPo1dHkLUG11k5YIJnHW4O6upG3/G7MFowU37mc2 7D3mHV++zJxij6vQa4F4FWTQyHQSKMjqCoQbswHu+75zkbopjJg=
=EUZQ
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)