257 Commits

Author SHA1 Message Date
Julian Andres Klode
b2436f7ad5 Only remove tests from pending for non-ignored results
This avoids endlessly requeuing the test if the test produces
an older result.

This will make tests "disappear" if the infrastructure returns
old results for newer triggers but avoids the problem right
now where we end up queuing the same tests every run.
2024-03-25 18:17:47 +01:00
Julian Andres Klode
cdc015e7c4 Do not set all-proposed with migration-reference/0 2024-03-25 16:23:14 +01:00
Julian Andres Klode
467dfe8c8a Use all-proposed in noble for all architectures 2024-03-25 15:50:07 +01:00
Michael Hudson-Doyle
57710ee6e2 autopkgtest: Fix the date creation and comparison for time_t hack 2024-03-19 10:52:39 +01:00
Brian Murray
50d59b67db Fix a pep8 issue 2024-03-18 11:08:43 -07:00
Julian Andres Klode
bc3a6226ff Temporarily queue noble armhf tests with all-proposed=1
This is needed for the time_t transition.
2024-03-18 18:20:19 +01:00
Łukasz 'sil2100' Zemczak
08a27a5456 Attempt to get swift results working properly by using a workaround from security-britney. 2024-02-01 12:40:10 +01:00
Steve Langasek
e5247de7b8 Add a dry-run option for the autopkgtest policy specifically
For rolling out britney on a new machine, we want to generate update_excuses
and update_output to confirm it's working correctly all the way through, so
we don't want to use the global --dry-run option; but we *do* want to
disable queuing tests and instead let the production instance of britney
queue the tests while we simply query the results.  Add support for
ADT_ENABLE=dry-run in britney.conf, parallelling the behavior of other
policies.
2023-03-10 12:59:39 -08:00
Steve Langasek
de19e280b2 More optimizations to not query unused baseline results 2022-08-23 15:05:50 -07:00
Steve Langasek
479662c63e Don't query for baseline results we won't use.
britney currently spends a majority of its runtime querying for baseline
test results that it won't find, and that it doesn't need.  Refactor to
eliminate many of these excess queries.
2022-08-23 14:03:41 -07:00
Brian Murray
0998eeaa1a We moved away from freenode a while ago 2022-06-29 10:52:13 -07:00
Łukasz 'sil2100' Zemczak
1c32e3014b Re-add Bileto 4810 to the temporary exclude list. 2022-03-30 10:42:26 +02:00
Łukasz 'sil2100' Zemczak
d51e0be23a Fix typo in bileto ppa name. 2022-03-28 18:46:07 +02:00
Julian Andres Klode
f078aa28d0 do not group the ppc64el rebuilds by their bileto ppa 2022-03-28 10:54:21 +02:00
Haw Loeung
fd20237673
Update email address used for emails
@canonical.com is now DKIM signed and SPF published which means emails
from proposed-migration running on snakefruit sending direct would
likely be caught out. Since we're here, the project is Ubuntu related
so switch to using an @ubuntu.com address instead.
2022-03-22 10:58:40 +11:00
Michael Hudson-Doyle
53aaf8f8e9 allow retrying on "Reference test in progress, but real test failed already" 2022-02-11 09:21:28 +13:00
Steve Langasek
d9d6261b0c Merge remote-tracking branch 'juliank/no-testing-triggers' 2021-11-19 08:34:59 -08:00
Steve Langasek
36459dcdb7 Fix fencepost error when fetching autopkgtest results from sqlite
When querying swift there is no way to take results only newer than a
specified point, you can only query newer than or equal to.  But for sqlite
we can absolutely use > instead of >= and avoid re-processing results we've
already seen.
2021-11-06 22:09:02 -07:00
Steve Langasek
bbdd8105b2 Split all triggers, not just the first one 2021-11-06 19:19:10 -07:00
Steve Langasek
e7eae446b6 Merge remote-tracking branch 'juliank/check-new-migration-reference' 2021-11-05 17:47:32 -07:00
Julian Andres Klode
11a023d133 Only log force-reset-test hints for matching packages
Logging all force-reset-test hints for every package causes
about 850 MB of logs in the last run of 880 MB of logs in total,
let's only log ones matching the package instead, as we do for
force-badtest.
2021-11-06 00:08:28 +01:00
Julian Andres Klode
e9576d55e2 Check for new baseline results if we don't have any yet
In Ubuntu, we only fetch results on demand, so we might not
have seen the results yet.

Debian always fetches results at the beginning so has all the
data ready.
2021-11-05 23:18:15 +01:00
Julian Andres Klode
b60734f118 Do not add autopkgtest triggers that are already in testing
If the version of the trigger in testing is the same, skip it.
2021-11-05 21:44:09 +01:00
Steve Langasek
d87dbf0db2 Merge branch 'adt-results-from-swift' 2021-10-22 16:16:06 -07:00
Steve Langasek
383887a8e3 bdmurray-linting 2021-10-22 16:12:26 -07:00
Steve Langasek
6cd47f352b In the autopkgtest policy, cache the list of force-reset-test hints once
Due to the number of hints in standing use in Ubuntu, hints.search() is an
expensive operation, and we call it once for *every single test* referenced
from -proposed.  Since force-reset-test are a small proportion of the hints
in use, searching once for all the hints of this type and only searching
this subset for each autopkgtest improves performance (with 23000
autopkgtests referenced in -proposed, this saves roughly 1 minute of
runtime, or 11% on a 9-minute britney run; the number of packages in
-proposed is typically much higher at other points in the release cycle,
therefore the absolute improvement in performance is expected to be
greater.)

The force-reset-test hints are an Ubuntu delta so this is not expected to be
upstreamed; and it could eventually be dropped if and when baseline
retesting is implemented in Ubuntu and the number of hints required drops.

This could be implemented with a more generic, elegant solution in
HintsCollection, but again, the scalability problem of hints is hopefully
short-lived so I didn't consider it worth the investment here.
2021-10-07 00:14:49 -07:00
Steve Langasek
794b14b316 Implement support for pulling autopkgtest results from sqlite db 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
3814d63666 Make download_retry work with non-HTTP urls
urlopen() supports non-http URLs, but when called on them, http-related
features are absent - such as getcode().  Make the code work with file:///
URLs.
2021-10-07 00:41:56 +00:00
Steve Langasek
82fad57aa9 Don't use expensive 'remove' hints
Since we've never used remove hints in Ubuntu and never will, we shouldn't
pay the cost for them in britney runs.  Remove references to them entirely,
to speed up britney runs.

This is an Ubuntu delta not expected to be upstreamed, and can be dropped at
some future point when we don't have 11,000 active hints.  (This count of
hints is expected to drop dramatically once we have autopkgtest baseline
retesting.)
2021-10-06 12:54:11 -07:00
Iain Lane
32c3f288b0 autopkgtest: Check for kernel-triggered tests when migrating kernels
We currently skip the ALWAYSFAIL/REGRESSION handling for kernels. This
can lead to us missing genuine regressions in kernel uploads. The
idea is that results from one kernel flavour shouldn't influence
another.

We can keep this idea but do better and actually check for regressions:
when looking at results, if we're considering a kernel, only look at
results which were triggered by this kernel.
2021-05-21 16:13:13 +01:00
Steve Langasek
fd48bfe54b Update gcc regexp to handle gcc versions > 9 2020-11-20 17:37:44 +00:00
Iain Lane
8fb4d5d841 BlockPolicy, ExcuseFinder: refer to DISTRO-release
On Ubuntu we want this to say ubuntu-release, on Debian debian-release.
Substitute the first part with the name of the distro.
2020-11-20 17:37:44 +00:00
Iain Lane
2ed6da1e0d autopkgtest: When skipping linux-* packages for Ubuntu, consider the source suite
We often introduce new kernels post-release, and we still want to not
trigger tests for the kernel image packages. Check for -meta in the
*source* suite as well as the target.

Fix the -meta name calculation for linux-signed-foo.
2020-11-20 17:37:44 +00: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
96715dcd2b autopkgtest: Import amqplib when submitting test requests
Commit b82f4fc63238e48a8b7c76f32576dee2cd57d403 moved the importing of
amqplib to be done when required, but it missed a spot.
2020-11-20 17:37:44 +00:00
Iain Lane
7d6d4debdf autopkgtest, DependsPolicy: Run tests where we didn't care about the depends problem
We currently skip running autopkgtests where there is an installability
problem, but in a few cases the depends policy notes these only, but
otherwise doesn't block migration on them.

In these cases, let's try to run the autopkgtests anyway. There will be
a few instances of uninstallability here, but since we migrate the
packages we should give them a chance to be tested.
2020-11-20 17:37:44 +00:00
Iain Lane
94b6ac273a autopkgtest: Submit multiple triggers to amqp as a list
We currently concatenate all triggers together into a string, but the
AMQP consumer expects this to be a list.

When using AMQP, keep the triggers as a list. Ensure that the "real"
trigger (the package being tested) is kept first, as before.
2020-11-20 17:37:44 +00:00
Iain Lane
e5c3f86393 autopkgtest: Don't output an info line for ignored failures
We already skip displaying most other types of results where no action
is required including ALWAYSFAIL, should do it for hints too
2020-11-20 17:37:44 +00:00
Iain Lane
429df37b66 autopkgtest: Retry downloads
If we have a slightly flaky network / endpoint, retrying can help us to
keep going rather than crash & restart.
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
95b71e0ddb autopkgtest: Save pending.json after every test request
We just had the autopkgtest queues DoSed because britney was crashing
after requesting each reverse dependency for a perl upload, but before
it had written pending.json out so it knew what not to request again.
This was 25,000 requests per arch...

Let's write pending.json straight after sending each request, so that
the next run - even after a crash - won't re-request the same things
again.
2020-11-20 17:37:44 +00:00
Iain Lane
07b9c517c8 BuildDependsPolicy: handle old python3-apt
Very old versions, such as that run on the Ubuntu archive machine, don't
have the arch parameter.

Handle that by setting APT::Architecture instead
2020-11-20 17:37:44 +00:00
Iain Lane
9523425cb2 autopkgtest: Support Ubuntu's run_id format
These have a hash appended.

We don't actually use the baseline retrying, which is where the ID
parsing is used, but we might as well handle this, not least so we don't
crash.
2020-11-20 17:37:44 +00:00
Iain Lane
c9dfcf9b06 autopkgtest: Allow adt_reference_max_age to be empty 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
27c2476e8f autopkgtest: Only request reference tests when we want them 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