Merge ~ubuntu-release/britney/+git/britney2-ubuntu:sru-messages-fixes into ~ubuntu-release/britney/+git/britney2-ubuntu:master

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: e51cc58a2b15c88a3caacb70d9e654be310a4965
Proposed branch: ~ubuntu-release/britney/+git/britney2-ubuntu:sru-messages-fixes
Merge into: ~ubuntu-release/britney/+git/britney2-ubuntu:master
Diff against target: 315 lines (+165/-14)
2 files modified
britney2/policies/sruadtregression.py (+32/-8)
tests/test_sruadtregression.py (+133/-6)
Reviewer Review Type Date Requested Status
Ubuntu Release Team Pending
Review via email: mp+370375@code.staging.launchpad.net

Commit message

Switch logic of detecting failures to looking for failed tests in policy_info. Explicitly list all failing tests in the bug comment. Change wording.

Description of the change

Switch logic of detecting failures to looking for failed tests in policy_info. Explicitly list all failing tests in the bug comment. Change wording.

This basically addresses all three bugs: LP: #1836932, LP: #1836931 and LP: #1836930.

My first invalid assumption of being able to use current_policy_verdict as an indication of test status was wrong. Not sure how I actually made that assumption! Probably checked some policies like email.py and thought that none of them actually change the verdict.

Since current_policy_verdict can be anything, we can actually just look at the test results for the upload and use that to determine it. At first I was scratching my head a bit, because I didn't see 'policy_info' used in the autopkgtest policy at all, but saw it in the resulting .yaml. Then I noticed the argument is called 'tests_info' for this policy, duh...

Anyway, since we're actually looking at the failed tests already, I added a change that the resulting e-mail now lists all the failing tests. And since I was modifying the comment text already, I also changed the wording slightly and linked the SRU policy document there. It's easier this way as we can edit it freely whenever we decide to change the policy.

Added tests for all cases, even for the one with the overriden policy verdict.

To post a comment you must log in.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches