All the output is a duplicate of what is being sent to the root logger
(albeit in a different format) and in e.g. our test suite the output
is entirely redundant.
Signed-off-by: Niels Thykier <niels@thykier.net>
With a bit of code we can replace the manual file-handling for
"upgrade_output" with a logger. This will enable us to refactor other
bits that currently depend on "output_write" by making those bits use
a logger instead.
This also migrates "do_hint" to use the new output logger. This is
due to "do_hint" being the only method relying on writing of partial
lines and maintaining support for that in "output_write" would have
been non-trivial.
To ensure "pretty" formatting to stdout, the messages in
"output_write" are now chopped into multiple lines.
The only visible change is that the output to stdout from
"output_write" now also includes the prefix with a timestamp.
However, then contents of "upgrade_output" remain unchanged
deliberately.
Signed-off-by: Niels Thykier <niels@thykier.net>
We already know the item is successful when we print it and the next
line ("final:") will confirm it any way.
Signed-off-by: Niels Thykier <niels@thykier.net>
AFAICT all of the items are no longer relevant. Not to mention we
have a separate bug tracker (now?) that is much more suited for bugs
plus sphinx docs that could easily grow a "Known Issues" section as
well.
Signed-off-by: Niels Thykier <niels@thykier.net>
Given that only one value is defined ("reference"), it is a better
option to allow the config to be unset when one does not want to have
adt_baseline set to "reference".
Signed-off-by: Niels Thykier <niels@thykier.net>
Notable omissions are "pending_tests" and "tests_results". This is
omission is due to these (some times) being initialized from the
output of "json.load" (so we cannot assume defaultdict semantics
without manually imported the data into one).
Signed-off-by: Niels Thykier <niels@thykier.net>
The first case is to avoid a creating a list, which is then converted
to a set only to throw away the list again. Here we can just create
the set right away without a list inbetween.
The second case is "if x in [...]:" is better written as "if x in
{...}:" as sets provides faster "__contains__" (assuming you are on a
"recent enough python3", which britney is).
Signed-off-by: Niels Thykier <niels@thykier.net>
Arguable, this is not a problem in the code as the failure case
invokes sys.exit. However, this is more future proof as the sys.exit
may be replaced (or we may later catch another exception that is
"recoverable").
Signed-off-by: Niels Thykier <niels@thykier.net>
- revert most of commit adbe6d5 as checking the version in testing doesn't work
when other packages migrate and cause regressions
- Alternative way of determining if a package is regressing, by comparison to a
reference set. The reference set is to be created by a holy trigger that
doesn't take packages from the base suite, but instead tests in the testing
suite. This reference needs a retry when a package causing regression
migrates nevertheless, e.g. due to hints or to bounty/penalty policy.
At a glance, it looks like the value of "better" variable can be
decided from 3-4 places. However, due to the code flow only two of
those assignments are truly "live"/useful.
Signed-off-by: Niels Thykier <niels@thykier.net>