154 Commits

Author SHA1 Message Date
Aleksa Svitlica
04dc74a8cf feat(cloud): Add new cloud package set
The new cloud package set is a JSON file which has proper mapping of
source packages that Britney has to the binary packages that
cloud-test-framework expects.
2023-04-05 09:25:09 -04:00
Aleksa Svitlica
b0a569d303 feat(cloud): Add reporting
Add optional reporting of cloud tests. Cloud reporting includes the
package name, version, series and whether the test result was
pass/fail/error.

Cloud reporting requested by partners to be able to determine the amount
of packages tested.
2023-03-24 08:56:22 -04:00
Aleksa Svitlica
22f865d7ae feat(cloud): Add verdict info for passed tests
Additional verdict info is being provided by the CloudPolicy to improve
clarity on the state of cloud tests. When tests pass this will be marked
in the verdict. Also when a package is skipped because it is not in the
cloud package set this will be made clear in the verdict.
2023-03-23 16:06:44 -04:00
Łukasz 'sil2100' Zemczak
a1c4b0a78b Merge branch 'feat/cloud-policy/handle-test-errors' of git+ssh://git.launchpad.net/~aleksa-svitlica/cloudware/+git/britney2-ubuntu into sil2100/security-britney 2023-02-16 09:59:50 +01:00
Aleksa Svitlica
9246a3d583 fix(cloud): Replace PurePath with os.path.join
In Python 3.5 open does not work correctly with PurePath. Switching to
os.path.join to resolve this.
2023-02-15 12:41:14 -05:00
Łukasz 'sil2100' Zemczak
721fff7918 cloud: Add some unit tests for testing verdict store and the re-runs when only errors encountered. 2023-02-15 13:35:21 +01:00
Łukasz 'sil2100' Zemczak
85c6716af6 Set the verdict correctly too. 2023-02-14 14:49:46 +01:00
Łukasz 'sil2100' Zemczak
340b41afe1 Save state file in-between runs to mark which packages have already been tested on the given clouds. 2023-02-14 14:22:43 +01:00
Łukasz 'sil2100' Zemczak
be55223a67 Merge branch 'feat/add-cloud-policy' of git+ssh://git.launchpad.net/~aleksa-svitlica/cloudware/+git/britney2-ubuntu into sil2100/private-runs 2023-02-13 11:13:40 +01:00
Łukasz 'sil2100' Zemczak
1848597433 Support PPAs which have fingerprint enabled in them. 2023-02-13 11:03:59 +01:00
Aleksa Svitlica
f21d94d3b2 CloudPolicy: Support public PPAs with fingerprints
Updates the _parse_ppas function to also allow public PPAs with
fingerprints to be provided (team/name:fingerprint).
2023-02-10 13:21:01 -05:00
Aleksa Svitlica
2bd1584c84 CloudPolicy: Refactor to use adt_ppas
Cloud policy now uses the ADT_PPAS field as the source but will only
take private PPAS due to requiring a fingerprint. If ADT_PPAS is empty
then the 'proposed' archive is used.

Adds logic to try and retrieve the install source of a package from the
logs. This is useful if multiple PPAs are defined since the policy won't
explicitly know when contains the package under test.
2023-02-01 21:23:59 -05:00
Aleksa Svitlica
c6e4e18a23 CloudPolicy: Move hardcoded values to config
Changes made
- Multiple hardcoded fields moved to config
- Series is now retrieved from options
- Pocket is now called source and retrieved from config
- Adds source type config which can be either archive or ppa
- Returns REJECTED_PERMANENTLY policy verdict when test failures or
  errors occur. Adds verdict info the the excuse.
2023-01-23 17:02:12 -05:00
Aleksa Svitlica
436626145b Add Cloud Policy
The cloud policy is currently used to test whether the proposed
migration will break networking for an image in the Azure cloud. Cloud
testing will likely increase in scope in the future.
2023-01-08 10:48:53 -05:00
Steve Langasek
173deaff39 Support setting test results in swift and sqlite3 simultaneously 2021-10-07 00:41:56 +00:00
Steve Langasek
af8890bc4b Preliminary code to make autopkgtest policy download autopkgtest.db
Include test to assert britney failure if the database is unavailable
2021-10-07 00:41:56 +00:00
Steve Langasek
0b4cd56d68 Initial infrastructure for testing db-based autopkgtest results 2021-10-07 00:41:56 +00:00
Łukasz 'sil2100' Zemczak
738cac82cf Add additional support for additional private test retry capabilities. 2021-07-29 12:56:28 +02:00
Łukasz 'sil2100' Zemczak
090ccdff9e Add an option to configure whether all ADT test results should be displayed or not. 2021-07-19 13:03:14 +02:00
Łukasz 'sil2100' Zemczak
41b606c2ca Commit fixes from staging testing: add required region name parameter. 2021-07-19 12:49:29 +02:00
Łukasz 'sil2100' Zemczak
f79ec3bf54 Revert "Switch from swiftclient for private PPAs to using HTTP with X-Auth-Token instead."
This reverts commit 7ff150ced70d0db565378683909e22dfac5383e1.

Sadly we can't use the X-Auth-Token approach due to implementational details (the token is valid only for an hour). So we need to switch back to using swiftclient.
2021-06-16 09:57:15 +02:00
Łukasz 'sil2100' Zemczak
7ff150ced7 Switch from swiftclient for private PPAs to using HTTP with X-Auth-Token instead.
This way there's less secrets that need to be shared and less new code to introduce. We also modified the test tooling to be able to check for authentication tokens in the queries.
2021-06-09 17:13:56 +02:00
Łukasz 'sil2100' Zemczak
d1549b9ca9 Commit the work regarding private-results handling. 2021-05-06 15:20:00 +02:00
Łukasz 'sil2100' Zemczak
1de71dbbfd Add ability to share results with selected people. 2021-04-28 11:25:35 +02:00
Łukasz 'sil2100' Zemczak
e2932055a9 Add a mock swiftclient for testing, add unit tests for private PPAs and private non-PPA runs, fix some issues discovered through the testing. 2021-03-16 16:38:26 +01:00
Łukasz 'sil2100' Zemczak
18eb7abb01 Initial handling of private PPAs. 2021-03-03 15:00:57 +01:00
Łukasz 'sil2100' Zemczak
7b20866238 Initial attempt on fetching private results from swift. 2021-03-03 14:32:08 +01:00
Iain Lane
e871a3993d autopkgtest: Add back hack to only trigger selected tests for gcc-N
We might want to consider doing this in a more generic way.
2020-11-20 17:37:44 +00:00
Iain Lane
a5828a269e excusefinder: Support not having arch-all buildds
On some distros (Ubuntu), arch:all packages are built along with one of
the architectures. We shouldn't be listing 'all' as its own arch in this
case. Instead we filter out the binaries except for on the
'all_buildarch'.
2020-11-20 17:37:44 +00:00
Iain Lane
15f431d37c autopkgtest: Add new force-reset-test hint type
This allows hinters to reset the baseline for a package/arch, so that
previous failures are ignore and not considered regressions
2020-11-20 17:37:44 +00:00
Iain Lane
e5b7f5f539 autopkgtest: Support autopkgtest.u.c in-progress URL
This is at /running. We use 'are we running on swift?' as a proxy for
deciding which URL format to use
2020-11-20 17:37:44 +00:00
Iain Lane
af085da46e autopkgtest: Handle 'blacklisted' version
The apt version comparison sorts 'blacklisted' greater than most version
numbers, which means that we accidentally apply force hints for version
'blacklisted' to all uploads. Since this is the only case of a hacked
version number, let's special case it so that 'blacklisted' hints only
match packages with 'blacklisted' version.
2020-11-20 17:37:44 +00:00
Iain Lane
34c8b05010 autopkgtest: store the submission time when making requests
This is so that we can see more easily see if requests are stuck
2020-11-20 17:37:44 +00:00
Iain Lane
2623053f82 test_autopkgtest: Re-enable test for package not built on arch
This is a test carried over from Ubuntu which ensures that a package
which builds no binaries on an arch doesn't have tests requested.

It was disabled. Enable it.
2020-11-20 17:37:44 +00:00
Iain Lane
af091a504c autopkgtest: Trigger dkms when there's a dep on dkms
Most DKMS packages do not declare Testsuite: autopkgtest-pkg-dkms, but
we can detect this anyway, and this way we can enforce that the module
is buildable.
2020-11-20 17:37:44 +00:00
Łukasz 'sil2100' Zemczak
d960c15706 Add a new policy to message bugs on SRU regressions
It works like this. We wait until all tests have finished running. and
then grab their results. If there are any regressions, we mail each bug
with a link to pending-sru.html. There's a state file which records the
mails we've sent out, so that we don't mail the same bug multiple times.
2020-11-20 17:37:44 +00:00
Tiago Daitx
256a48a4ad Link to update-excuse bugs on update_excuses
LP: #1683749
2020-11-20 17:37:44 +00:00
Iain Lane
bae4fdbd45 LinuxPolicy: Make linux* wait on corresponding -meta package
We want to treat linux-$flavor and linux-meta-$flavor as one set in
britney which goes in together or not at all. We never want to promote
linux-$flavor without the accompanying linux-meta-$flavor.

Add a new LinuxPolicy which runs after most of the other policies, which
invalidates linux-foo if linux-meta-foo is invalid.
2020-11-20 17:37:44 +00:00
Robert Bruce Park
36e8b65c8b Email Policy, send emails when packages are rejected. 2020-11-20 17:37:44 +00:00
Robert Bruce Park
9c777eac1b Reject packages if entire source ppa won't migrate 2020-11-11 09:41:40 +00:00
Iain Lane
d2dbdadf1f autopkgtest: Hardcode some linux-meta tests
We should really fix this to use Testsuite-Triggers / hint-testsuite-triggers
2020-11-11 09:41:40 +00:00
Iain Lane
7ed335893e Implement Ubuntu component relationship constraints (ogre model) 2020-11-11 09:41:40 +00:00
Iain Lane
3fa9eceb89 Store the component in BinaryPackage and SourcePackage 2020-11-11 09:41:40 +00:00
Colin Watson
4f9a33ddab Allow blocking uploads by way of bugs with the block-proposed tag set 2020-11-11 09:41:40 +00:00
Iain Lane
1487096a15 test_autopkgtest: Split setup commands into a separate class
This lets other policies share this code for their integration tests
2020-10-20 14:57:51 +01:00
Colin Watson
4e59e3fb6a Change date format to seconds-since-epoch 2020-10-20 14:57:51 +01:00
Paul Gevers
dc4ea6ca2c
autopkgtest: remember old results instead of discarting them
For packages with lots of reverse dependencies, new versions of those reverse
dependencies may keep on showing up in testing. If migration is blocked until
the results for these new version, migration may take extremely long. If there
are results for the current trigger but for the previous version of the reverse
dependency, use those until the fresh resuts are available.

Similar for the reference runs.
2020-05-01 21:34:30 +02:00
Paul Gevers
ea6d65f657
Let britney reschedule migration-reference/0 runs when they are too old
Currently, britney only schedules reference runs when they don't exist. It does
strip out runs against older versions of the autopkgtest, but the current version
may exist for a while and the reference run can be old. So, add an option to
ignore old results.
2020-02-20 13:21:36 +01:00
Paul Gevers
aa8b84f4b8
Drop the special case that gcc has; it's just a package 2020-02-20 11:24:27 +01:00
Paul Gevers
56babea058
Don't run autopkgtest on architectures where the triggering package doesn't exist 2020-02-14 22:47:03 +01:00