32 Commits

Author SHA1 Message Date
Iain Lane
2221872e7a sourceppa: return when recursing 2016-12-09 12:59:24 +00:00
Iain Lane
81d522ff29 sourceppa: Retry on timeouts
We're still seeing britney runs failing due to this exception. The
timeout has already been raised to 30 seconds - maybe retrying the
requests a few times will work better.
2016-12-09 10:45:14 +00:00
Robert Bruce Park
5c74268d75 Better debug logging for sourceppa problems. 2016-12-05 07:03:36 -07:00
Robert Bruce Park
b0dc9079db Stop grouping debian syncs 2016-11-17 18:46:09 +01:00
Martin Pitt
18fd57e383 policies/sourceppa.py: Cache "no PPA" results as well
This accidentally got broken by 11705f4a7.
2016-11-17 18:39:38 +01:00
Martin Pitt
efd8794804 policies/sourceppa.py: Bump Launchpad timeout
Let's see if that helps with the timeouts we get during britney runs.
2016-11-17 18:01:00 +01:00
Martin Pitt
11705f4a7b Some PPA landing fixes
The original commit had an unreliable policy info (the peer PPA group), as
correct updating of friends' excuses depends on the processing order.

 - Also add the currently investigated package to the policy info.
 - Add a HTML excuse too, so that excuses.html actually shows the reason for
   blocking.
 - Don't invalidate other excuses multiple times.
 - Change the policy_info to always carry the friend information with it, as
   that's useful to know for accepted packages too. Adjust test_approve_ppa()
   accordingly.
 - Verify "reason" field in test_sourceppa_policy()
 - Add another integration test to ensure that this also applies to unbuilt
   packages, not just to rejection from other Policies.
 - Avoid FileNotFoundError, this does not yet exist in Python 3.2.
2016-11-17 17:37:49 +01:00
Robert Bruce Park
47f5f0da72 Reject packages if entire source ppa won't migrate 2016-11-17 11:56:12 +01:00
Martin Pitt
4f534526ca Python 3.2 workaround: Drop usage of enum module
enum is not yet available in Python 3.2, but as long as snakefruit still runs
Ubuntu 12.04 we need to get along without it.
2016-11-17 11:29:23 +01:00
Martin Pitt
d7139521a8 Add "run-autopkgtest" tool to re-run tests 2016-11-17 11:28:53 +01:00
Martin Pitt
089ec5c27c Add autopkgtest policy
Add new autopkgtest policy: it determines the autopkgtests for a
source package (its own, direct reverse binary dependencies, and
Testsuite-Triggers), requests tests via AMQP, fetches results from swift, and
keeps track of pending tests between run. This also caches the downloaded
results from swift, as re-dowloading them all is very expensive.

This introduces two new hints:

 * force-badtest pkg/ver[/arch]: Failing results for that package will be
   ignored. This is useful to deal with broken tests that get imported from
   Debian or are from under-maintained packages, or broke due to some
   infrastructure changes. These are long-lived usually.

 * force-skiptest pkg/ver: Test results *triggered by* that package (i. e.
   reverse dependencies) will be ignored. This is mostly useful for landing
   packages that trigger a huge amount of tests (glibc, perl) where some tests
   are just too flaky to get them all passing, and one just wants to land it
   after the remaining failures have been checked. This should be used rarely
   and the hints should be removed immediately again.

Add integration tests that call britney in various scenarios on constructed
fake archives, with mocked AMQP and Swift results.
2016-11-17 11:28:53 +01:00
Colin Watson
c6066d74d3 Change date format to seconds-since-epoch 2016-11-17 11:28:53 +01:00
Colin Watson
97fc6cb356 Allow blocking uploads by way of bugs with the block-proposed tag set 2016-11-17 11:28:53 +01:00
Colin Watson
7877a8500d Make sure that containing directories exist before writing output files
We don't use os.makedirs(dir, exist_ok=True) as that is too strict: it fails if
the directory already exists with different permissions (e. g. with 775). Thus
introduce a helper function ensuredir().
2016-11-17 11:28:14 +01:00
Colin Watson
848a4645d8 Skip bug-based processing if BugsV is missing 2016-11-17 11:28:14 +01:00
Colin Watson
55dd22fe9b Use default urgency for all packages if Urgencies is missing 2016-11-17 11:28:14 +01:00
Martin Pitt
b3ea41d057 Move updating of excuses into policies
It is unwieldy to have one half of output data generation in the policy but not
the other half of updating the excuse. Now that apply_policy() gets the excuse
object as argument we can move everything there.
2016-11-17 11:12:35 +01:00
Martin Pitt
1e9a16499a Pass excuse to BasePolicy.apply_policy()
This allows tests to check whether there are any missing builds or old
binaries, so that expensive actions such as "trigger an autopkgtest" are not
done too early/in vain.
2016-11-17 11:12:35 +01:00
Niels Thykier
0664c580b0 Prefer s.x to s[X] for SourcePackage objects
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-03 18:29:09 +00:00
Niels Thykier
6de0c3408c AgePolicy: Create the (new) date file automatically
Closes: 
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-03 18:05:54 +00:00
Niels Thykier
ec21cf1342 Add an ignore-rc-bugs hint
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-03 18:05:53 +00:00
Niels Thykier
29ecbd80d0 Let the age policy register its own hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-03 18:05:53 +00:00
Niels Thykier
d43311be03 Support policies registering their own hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-03 18:05:53 +00:00
Niels Thykier
2b5d23f69f policy.py: Fix incorrect policy key
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-07-08 14:47:36 +00:00
Niels Thykier
58b73c1906 Simplify policy writing a bit
Refactor the handling of the policy info code, so every policy does
not have to implement the same boilerplate code.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-07-05 23:17:33 +00:00
Niels Thykier
ebd947cac2 Improve the method documentation of BasePolicy
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-07-05 08:02:04 +00:00
Niels Thykier
63b08f8278 Optimise a few hints.search calls
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-05-21 12:43:36 +00:00
Niels Thykier
ce5b893a19 Prefer bugs files from the state-dir
Closes GH#2.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-05-21 12:43:36 +00:00
Niels Thykier
7e94e5567c Prefer Urgencies file from the state-dir
Partly solves GH#2

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-05-21 12:43:36 +00:00
Niels Thykier
bcff800040 Move Dates into a new state-dir
Partly solves GH#2.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-05-21 12:43:36 +00:00
Niels Thykier
6d6a7ac529 Move RC bug handing into a policy
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-05-21 12:43:36 +00:00
Niels Thykier
5ec3aea43a Move age-handling into a separate file
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-05-21 12:43:36 +00:00