[Merge] lp:~laney/britney/autopkgtest-no-delay-if-never-passed into lp:~ubuntu-release/britney/britney2-ubuntu

Martin Pitt martin.pitt at ubuntu.com
Sat Nov 21 11:18:27 UTC 2015


Review: Approve

Thanks, this looks good now! I have one nitpick, but as I'd like to clean up this part anyway I'll leave it to you if you want to change it or not. Please push (to keep the individual commits, these are very useful now -- i. e. don't merge).

Diff comments:

> === modified file 'autopkgtest.py'
> --- autopkgtest.py	2015-11-17 08:15:31 +0000
> +++ autopkgtest.py	2015-11-18 14:38:44 +0000
> @@ -702,7 +702,13 @@
>                      # no result for testsrc/testver/arch; still running?
>                      try:
>                          self.pending_tests[testsrc][testver][arch]
> -                        result = 'RUNNING'
> +                        # if we can't find a result, assume that it has never passed (i.e. this is the first run)
> +                        (_, _, ever_passed) = self.test_results.get(testsrc, {}).get(arch, (None, None, False))

It's not very elegant to query this twice -- we already do that exact query right after the "try:". The whole structure of this code is a bit confusing now -- originally the "except KeyError:" made sense, but not with the reworked "for ver, trigger_results in ver_map" loop. I'll make a TODO to clean this up a bit.

So for now this seems okay, although it would be a tad simpler to set "ever_passed = False" right before the "try:" and drop this line.

> +
> +                        if ever_passed:
> +                            result = 'RUNNING'
> +                        else:
> +                            result = 'RUNNING-NEVERPASSED'
>                      except KeyError:
>                          # ignore if adt or swift results are disabled,
>                          # otherwise this is unexpected


-- 
https://code.launchpad.net/~laney/britney/autopkgtest-no-delay-if-never-passed/+merge/277832
Your team Ubuntu Package Archive Administrators is requested to review the proposed merge of lp:~laney/britney/autopkgtest-no-delay-if-never-passed into lp:~ubuntu-release/britney/britney2-ubuntu.



More information about the ubuntu-archive mailing list