749 Commits

Author SHA1 Message Date
Martin Pitt
cb66355e95 Comment ADT_AMQP and ADT_SWIFT_URL config options
Their default values are invalid and must be set locally. But as
britney1-ubuntu copies these into production, we would run with an invalid
config with an unmodified config file.
2015-07-14 07:55:30 +02:00
Steve Langasek
13a3ec2593 Merge lp:~pitti/britney/britney2-ubuntu-swiftresults 2015-07-13 08:39:55 -07:00
Martin Pitt
ce775eeb5d Add test results from swift
Until now, autopkgtest results were triggered via an external "adt-britney"
command from lp:auto-package-testing. This required a lot of state files and
duplicated effort, uses hardcoded absolute paths to these external tools, and
is quite hard to understand and maintain. We also want to move away from
Jenkins and rsyncing state files.

Directly retrieve autopkgtest results from a publicly readable and browsable
Swift container, with a debci-compatible layout
(https://wiki.debian.org/debci/DistributedSpec). This now tracks both requests
and results on a per-architecture granularity, so that we can track
per-architecture regressions/always-failed.

Introduce a new ADT_SWIFT_URL config option that sets the swift base URL. If
this key is not set, the behaviour does not change compared to previous
versions, and no results will be retrieved from the cloud.

This still keeps the old adt-britney requests/results as the authoritative
data and for now merely shows the swift results in addition. With that we can
compare the results and run the cloud testing in parallel to find/fix problems
until we switch over. Due to that, the code to britney.py is temporary, does
*not* use AutoPackageTest.results(), and instead just reads the internal
results map.
2015-07-10 06:21:46 +02:00
Martin Pitt
37cd90b415 Add mock swift server
This can be loaded with a predefined set of results, and will then act like a
Swift server with publicly accessible and browsable containers.
2015-07-07 17:45:16 +02:00
Martin Pitt
6e167a0343 Track architectures in requested/pending tests
This is necessary so that we can properly match requested to received results
when the latter arrive in different runs for different architectures.

This also opens up the possibility of per-arch blacklisting later.
2015-07-07 11:59:07 +02:00
Martin Pitt
bf470c6da0 Use current reverse dep version instead of None/-
This makes tracking test results easier and removes some special cases.
2015-07-07 11:11:44 +02:00
Martin Pitt
ded6912443 Add autopkgtest test case for a package pair 2015-07-07 09:10:58 +02:00
Martin Pitt
9c59f35af4 AutoPkgTest.tests_for_source(): Avoid reporting duplicate results 2015-07-07 08:05:19 +02:00
Steve Langasek
2f9f5fd0eb Merge lp:~pitti/britney/britney2-ubuntu-amqp 2015-07-06 09:23:02 -07:00
Martin Pitt
49500104ae AutoPkgTest.tests_for_source(): Don't trip over NBS binaries 2015-07-06 15:02:21 +02:00
Martin Pitt
e0c4ec15b6 AutoPkgTest.update_pending_tests(): Reset self.requested_tests after merging into self.pending_tests 2015-07-06 11:31:21 +02:00
Martin Pitt
cc1bd60d19 Factor out "tests for source package" calculation 2015-07-06 10:24:51 +02:00
Martin Pitt
4dc0d388d3 add ADT_AMQP option to britney_nobreakall.conf too 2015-07-06 08:03:49 +02:00
Martin Pitt
73bb510389 autopkgtest.py: Clarify comments where the "pending tests" state file lives 2015-07-03 07:35:41 +02:00
Martin Pitt
d5181ef32a autopkgtest AMQP: Don't declare queues
Don't use kombu's SimpleQueue() as that always declares queues and we neither
want that (we want to know when we try to talk to a nonexisting queue), nor
might the RabbitMQ ACL allow us to do that. So use kombu.Producer without queue
declaration.
2015-07-03 07:35:00 +02:00
Martin Pitt
335073e901 Add requesting tests through AMQP
Until now, autopkgtests were triggered via an external "adt-britney" command
from lp:auto-package-testing. This duplicated a lot of effort (such as its own
chdist and reverse dependency calculation), maintains a lot of state files,
uses hardcoded absolute paths to these external tools, and is quite hard to
understand and maintain. We want to get rid of all this.

Add logic to AutoPackageTest.request() to use britney's existing reverse
dependency maps and figure out the set of tests to run for packages in
unstable. These are being tracked in "requested_tests".

Add logic to AutoPackageTest.submit() to send test requests to the AMQP server
specified in the new "ADT_AMQP" config key. For testing this can be a file://
URL, and if not set no test requests will be sent at all.

The set of tests which were requested in previous runs are tracked in
UNSTABLE/autopkgtest/pending.txt, so that we don't re-request tests in
subsequent runs.

There is no implementation for collect() and results() yet, these will be done
in a separate commit.

Add initial test cases.
2015-07-02 17:41:49 +02:00
Martin Pitt
a3a523b4ed autopkgtest.py: Factorize logging into helper methods 2015-07-02 17:36:23 +02:00
Martin Pitt
65a1d73164 tests: Don't touch original britney.conf
Don't change britney.conf from the source tree and restore it back after the
tests; this is prone to leave a broken config behind if a test gets
interrupted. Instead, copy the file to our temp dir, and let tests hack on it
there.

(Introduced in lp:~canonical-ci-engineering/britney/boottesting-support)
2015-07-02 16:24:53 +02:00
Martin Pitt
add46d2904 Store autopkgtest flag in sources
Extend read_sources to store a new AUTOPKGTEST boolean flag, which is true if
the Testsuite: field exists and starts with "autopkgtest" (this covers autodep8
cases like autopkgtest-pkg-perl).

Extend TestData.add() to take a new testsuite argument which specifies the
source's Testsuite: field.
2015-07-01 15:49:06 +02:00
Steve Langasek
6b775c50f3 Merge lp:~canonical-ci-engineering/britney/enable-vivid-boottest 2015-06-12 13:56:44 -07:00
Francis Ginther
9e238f7406 For selection of boottest candidates, use a list of url formats for downloading the appropriate touch image manifest for a given release. 2015-06-08 10:25:34 -05:00
Francis Ginther
ca1fc41f9e Refactor the __fetch_manifest() code so that the a successful response is immediately handled and we don't end up with an undefined 'response' on an exception. Also update the tests to return two mocked reponses to match the size of the url_list. 2015-06-05 11:08:48 -05:00
Francis Ginther
7e38fec3cb Use a list of url formats for downloading the appropriate touch image manifest for a given release. 2015-06-04 22:12:18 -05:00
Colin Watson
d412b71391 [r=adconrad] Fix autopkgtest version selection loop 2015-03-12 05:11:19 -06:00
Steve Langasek
c1fa1c0082 Enable gating on boot testing results 2015-03-05 11:28:19 -08:00
Francis Ginther
da2175f1f1 Set 'BOOTTEST_ENABLE = yes' to turn it on. 2015-03-05 08:57:03 -06:00
Steve Langasek
84983f5eae Merge lp:~cprov/britney/boottest-double-blocking 2015-02-23 07:13:24 -08:00
Celso Providelo
50e0bc137d Add 'boottest' excuse failure reason when it has failed even if the previous tests had already failed. 2015-02-20 17:02:00 -02:00
Celso Providelo
ea6493ae71 Only enable BOOTTEST for testing, so britney.conf is safe on trunk. 2015-02-20 14:28:47 -02:00
Celso Providelo
c76874fda5 Test ADT & BootTest criteria running simultaneously. Fixed minor issue related to doubling-blocking promotions. 2015-02-20 14:12:51 -02:00
Steve Langasek
8effd3d220 Disable boottesting for now.
Britney runs failed with:

Traceback (most recent call last):
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3259, in <module>
    Britney().main()
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3211, in main
    self.write_excuses()
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 1982, in write_excuses
    upgrade_me.remove(excuse.name)
ValueError: list.remove(x): x not in list
2015-02-19 19:03:31 -08:00
Steve Langasek
9afd502e7f Merge lp:~canonical-ci-engineering/britney/boottesting-support 2015-02-19 17:11:39 -08:00
Vincent Ladeuil
0b7d702f69 Poperly initialize Excuse.run_boottest. 2015-02-18 14:33:55 +01:00
Celso Providelo
0f3662ec67 Cope with missing/broken results due to outdated apt cache. Britney will not fail, but source promotion will be blocked. Also waiting for amd64 binaries (arch-indep deps) before running boottests. 2015-02-11 10:43:39 -05:00
Celso Providelo
341ec4a3e0 Typo fixed 2015-02-11 10:41:43 -05:00
Celso Providelo
bf8056a061 Cope with missing/broken results due to outdated apt cache. Britney will not fail, but source promotion will be blocked. 2015-02-11 09:45:20 -05:00
Celso Providelo
496a2f3134 Suppress boottest SKIPPED notice on excuses, it's unnecessary noise. 2015-02-10 15:56:35 -05:00
Celso Providelo
60a0bcad76 Presenting links for the corresponding boottest jenkins job. 2015-02-10 15:44:11 -05:00
Celso Providelo
b9890e1b7c Adding links to the boottest jobs (results) in the public and the private servers. 2015-02-10 14:51:44 -05:00
Celso Providelo
011aa3570e Stop announcing skipped boottest attempts. 2015-02-10 13:49:43 -05:00
Celso Providelo
a80a1e4f1c Boottest integration adjustments. 2015-02-06 11:43:38 -05:00
Celso Providelo
f98bab42b2 Re-fix get_status() doc string and remove commented code. 2015-02-06 11:16:41 -05:00
Celso Providelo
c3c9005d5f Restore boottest status lookup by source name & version. 2015-02-06 10:38:36 -05:00
Joe Talbott
f9cfb6e49c boottest - Add exception handling for manifest fetching 2015-02-05 18:17:08 -05:00
Joe Talbott
6269f50abc Don't bother creating another mocked urllib.urlopen. 2015-02-05 17:27:39 -05:00
Celso Providelo
760d08c459 Fix BootTest.get_status to return status for the latest known version. Boottests results are reported for the current (published) version, not the proposed one. 2015-02-05 16:42:29 -05:00
Celso Providelo
9fb776f4c0 boottest-britney debug options respects BOOTTEST_DEBUG configuration option. 2015-02-05 14:13:51 -05:00
Celso Providelo
cd49a7eae4 Calling boottest-britney with -dPU (debug, use -proposed and do not update caches) and also rsyncing boottest data to the correct place on d-jenkins (/var/local/boottest). 2015-02-05 14:04:52 -05:00
Joe Talbott
f0a55936f5 boottest - Add exception message to warning print and fix typo 2015-02-05 11:20:28 -05:00
Joe Talbott
87ccbfd731 boottest - Add exception handling for manifest fetching 2015-02-05 11:08:53 -05:00