explicitly check for DNF "system is not ready for upgrade"
ClosedPublic

Authored by adamwill on Nov 17 2015, 7:05 PM.

Details

Summary

Instead of sitting there waiting 6000 seconds twice, when DNF
explicitly tells us it failed, just die.

This is why we haven't been getting proper compose check reports
lately; the upgrade tests are failing, waiting 6000 seconds to
time out, then being cloned and tried again, waiting another 6000
seconds. This is just barely going beyond check-compose's 8 hour
wait limit, as it's some time before the upgrade tests even get
started (they're low in the priority list). We're still going to
have that problem if the tests fail any other way, but this at
least catches that case.

Test Plan

Run the upgrade tests and see that they fail quicker
(assuming the dependency problems they're dying on aren't fixed).
Maybe also do a 22-23 upgrade test and check it still succeeds
properly.

Diff Detail

Repository
rOPENQATESTS os-autoinst-distri-fedora
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to explicitly check for DNF "system is not ready for upgrade".Nov 17 2015, 7:05 PM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
adamwill updated this revision to Diff 1693.Nov 17 2015, 7:14 PM

Missing quotes

garretraziel accepted this revision.Nov 18 2015, 1:44 PM

I've encountered this too and this patch helps a lot.

tests/upgrade_run.pm
26

I know that this is proper Perl-way but I would vote for good ol' verbose way like:

if (check_screen "upgrade_fail") {
    die "DNF reported failure";
}

sure it adds two more lines, but I consider this to be easier to skim through (because when you are reading one line after the other, you encounter "die" and think "why the hell are we want to die suddenly" and then you have to read whole line to find out that this dying is conditional and it won't happen in correct run).

If you don't agree, feel free to merge this as it is, I don't really have that much of a problem with it. Perhaps it's caused by me, trying to apply The Zen of Python on something so fundamentally different like Perl.

This revision is now accepted and ready to land.Nov 18 2015, 1:44 PM

I kind of hate both perl options; I'd much prefer the python 'two line, no braces' style, but I really hate the perl 'three lines, annoying braces' style - it's so finicky and eats up so much vertical space, once you have a few trivial conditionals the whole damn thing is so *long* and empty, I find that more of a readability problem than the 'effect before cause' problem with the short version. So I'm gonna merge it like this, because I hate it slightly less than the alternative.

This revision was automatically updated to reflect the committed changes.