1582 Commits

Author SHA1 Message Date
Paride Legovini
aee45a9d92 Merge remote-tracking branch 'hyask/skia/more_riscv64_fix' 2025-03-04 18:04:56 +01:00
Florent 'Skia' Jacquet
14bbcfe365 Replace a wrong usage of 'distro_info' by a simpler static list
Just for sharing a snippet, here would be the correct usage of
`distro_info`:
```python
import distro_info
d = distro_info.UbuntuDistroInfo()
x = d.get_all()
x.index("xenial") < x.index("noble")
```
2025-03-04 17:08:49 +01:00
Paride Legovini
a0bf23fba0 Merge remote-tracking branch 'hyask/skia/riscv64_tests_only_noble' 2025-03-04 15:56:54 +01:00
Florent 'Skia' Jacquet
9593404d8b Only run riscv64 autopkgtest for Noble and onwards 2025-03-04 15:35:19 +01:00
Paride Legovini
dbe65fe272 Merge remote-tracking branch 'hyask/skia/fix_riscv64_filtering' 2025-03-04 10:08:49 +01:00
Florent 'Skia' Jacquet
e53225e6e2 Fix riscv64 tests filtering on main 2025-03-04 09:41:27 +01:00
Florent 'Skia' Jacquet
ff73327eec Revert "Add more logging around riscv64 filtering"
This reverts commit 75d0ee30a16c6ccb23b409e115444b82cb933c5d.
This reverts commit 2317404ee1bba836c4cbbe284f8cf27c34c924aa.
This reverts commit 9b1167f52d3c9f7fe2868d11fa1b509e75a275c3.
This reverts commit f8c4cc3ecc19509c05345bf0f34ce76462aa1186.
2025-03-04 09:38:44 +01:00
Paride Legovini
b77350f31d Merge remote-tracking branch 'hyask/skia/fix_logging' 2025-03-03 18:49:47 +01:00
Florent 'Skia' Jacquet
75d0ee30a1 Fix britney logging for riscv64 2025-03-03 18:38:59 +01:00
Paride Legovini
e4494840a7 Merge remote-tracking branch 'hyask/skia/more_logging_riscv64' 2025-03-03 16:01:54 +01:00
Florent 'Skia' Jacquet
2317404ee1 More logging for riscv64 autopkgtests 2025-03-03 13:17:55 +01:00
Paride Legovini
796537cf11 Merge remote-tracking branch 'paride/more-riscv64-logging' 2025-03-03 11:11:51 +01:00
Paride Legovini
9b1167f52d Print sources_info while checking for riscv64 2025-03-03 11:06:13 +01:00
Paride Legovini
04f65ef6ce Merge remote-tracking branch 'paride/more-riscv64-logging' 2025-02-28 17:52:55 +01:00
Paride Legovini
f8c4cc3ecc Add more logging around riscv64 filtering 2025-02-28 17:28:39 +01:00
Florent 'Skia' Jacquet
bdffd15341 policies: explain why we want to run some riscv64 autopkgtests 2025-02-26 10:10:19 +01:00
Florent 'Skia' Jacquet
58cbc2a49b policies: fix traceback when trying to run riscv64 autopkgtests 2025-02-26 10:09:31 +01:00
Paride Legovini
a2307eb84a Merge remote-tracking branch 'juliank/riscv64-main' 2025-02-17 15:03:33 +01:00
Julian Andres Klode
1980242088 Run riscv64 tests on main, pretend force-badtest
Enable riscv64 testing, and filter test requests to packages
in main. Always pretend that riscv64 is force-badtested such
that failures are ignored.
2025-02-10 17:45:23 +01:00
Paride Legovini
3e18826a38 Merge remote-tracking branch 'tsimonq2/tsimonq2/rest-policy-urlerror' 2024-12-26 16:16:21 +01:00
Simon Quigley
703bc36e5e In the rest policy, also catch URLError 2024-12-21 00:46:02 -06:00
Steve Langasek
4f4d289bc6 Merge remote-tracking branch 'tsimonq2/tsimonq2/fix-latest-run-cache' 2024-12-14 23:21:15 -08:00
b92249f2a0 Catch BrokenPipeError in addition to ConnectionResetError when publishing a message to the AMQP queue 2024-12-10 02:10:17 -06:00
Paride Legovini
b21879fcff Merge remote-tracking branch 'tsimonq2/tsimonq2/fix-email-policy-data-ref' 2024-12-06 09:29:17 +01:00
ea51a90321 Do not allow data to be used before it has a value 2024-12-06 01:21:47 -06:00
10eed22925 Fix caching of the latest run for the autopkgtest policy 2024-12-03 17:01:50 -06:00
Paride Legovini
641d46f8d2 Merge remote-tracking branch 'tsimonq2/master' 2024-12-03 15:50:25 +01:00
fa25cd5cd0 Fix urllib imports for the email policy 2024-12-02 19:49:03 -06:00
Simon Quigley
2f3cbbbdf8 Catch KeyError explicitly in the autopkgtest policy to reduce the log size 2024-11-23 14:25:07 -06:00
Graham Inggs
4c77bf0780 Merge remote-tracking branch 'andersson123/useless-i386-should-work-now' 2024-08-09 15:32:32 +00:00
Tim Andersson
522adc7f7c
fix: get binary architecture from correct object for useless i386 check
After using the logging from the previous commit, we figured out which
variable to use to get the architecture for the binary packages of a
source package. This commit amends the issue by checking said variable.

This commit also removes the excess logging implemented in the former
commit.
2024-08-09 15:58:06 +01:00
Graham Inggs
5b7a776f40 Merge remote-tracking branch 'andersson123/add-even-more-logging-i386' 2024-08-09 12:55:33 +00:00
Tim Andersson
e6db31c010
Move i386 functionality later in the code and add more verbose logging
Still trying to figure out this new functionality. We're getting close
with more logging, so I have added a little bit more logging, and
stopped using what was presumably a lit of all binaries for i386, and
now am using what is hopefully just the list of binaries for the source
package
2024-08-09 13:41:43 +01:00
Tim Andersson
2f6b76f0b5
add a logline stating the architecture for binary package
Since we can't seem to figure out where we're going wrong, I thought I'd
just add verbose logging here and hope it helps with debugging the new
feature, which aims to reduce the number of i386 tests queued.
2024-08-09 09:47:12 +01:00
Tim Andersson
ac324406a0
try a different approach to get the binary arch, include full traceback
The latest approach unfortunately didn't work, so I'm trying this
approach using the binaries_info variable.

I've also included the full traceback when the functionality doesn't
work, to enable easier debugging
2024-08-08 16:17:45 +01:00
Tim Andersson
fa37106b41
try another approach to get architecture of binaries
Here, instead of using suite_info we use the britney object to get the
architecture for a specific binary package
2024-08-08 11:52:38 +01:00
Tim Andersson
a0dece5b76
fix traceback in useless i386 tests check
The recent change in commit ac6b0c1ba780913a5626b3e08e2c56f0d8454248 is
not currently functional - it's hard to test and although similar
functionality exists elsewhere in the code, the changes in said commit
resulted in the following traceback:
```
'str' object has no attribute 'architecture'
```

This commit amends the issue by utilising the `binaries_info` variable
instead, with its properties defined here:
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu/tree/britney2/__init__.py#n304

Brian had previously made this commit:
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu/commit/?id=663bd2571cc81a9477408c0711aeb6b2452c17a8
to try and amend the issue, though it seems it hasn't helped.

This commit also adds a little bit more logging surrounding this new
functionality and also adds a break statement for efficiency.
2024-08-07 17:28:17 +01:00
Brian Murray
663bd2571c auotpkgtest.py: we need to look at the binaries to find the arch 2024-08-06 12:41:38 -07:00
Brian Murray
92d611c379 autopkgtest.py: return an empty list instead of tests
While tests is an empty list at this point we should make it more
obvious by returing an empty list which is what the rest of the code
does.
2024-08-06 09:02:22 -07:00
Brian Murray
6128a2c8b7 Merge remote-tracking branch 'andersson123/dont-queue-unnecessary-i386-tests' 2024-08-06 08:57:25 -07:00
Tim Andersson
ac6b0c1ba7
fix: don't queue unnecessary tests on i386
Recent investigations indicated that approximately 85% of all of the
i386 tests run at autopkgtest.ubuntu.com are pointless.

These tests are pointless for the following reason:
for end users, the dependencies of an arch: all package on
non-arch: all packages are satisfied by the amd64 binaries, not i386
binaries.

This commit introduces a check in the `tests_for_source` function, which
is the function that generates a list of tests to be requested for a
src package on a specified architecture.

The check itself takes the src package name, gets the list of binaries
for that src package and checks to see if the architecture for all of
the binaries of said src package is "all". If all the binaries are
Architecture: "all", then the function returns an empty list and no
tests will be requested for that src package on i386.

Since it's quite hard to test britney code, the implementation is
wrapped in a try except block as to avoid tracebacks blocking britney
runs.

The try except block should be removed once the change is considered to
be stable.
2024-07-23 17:06:33 +01:00
Brian Murray
e689f9eeac policies/email.py: do not return empty email addresses 2024-07-12 14:16:42 -07:00
Brian Murray
5cad435a0b autopkgtest.py: use decode not str
I was on holiday too long?
2024-06-25 15:23:49 -07:00
Brian Murray
4e3ee76caf autopkgtest.py: both checksums need to be strings 2024-06-25 14:50:50 -07:00
Brian Murray
7d997562a0 autopkgtest: add some debugging to checksum checking 2024-06-25 14:34:50 -07:00
Brian Murray
f7eb93beb2 autopkgtest.py Download the checksum first since it is smaller. 2024-06-25 14:01:06 -07:00
Brian Murray
9398f75d21 Merge remote-tracking branch 'andersson123/no-content-length-check-checksum-instead'
Modify britney to use the database checksum instead of content-length
header from apache2.
2024-06-25 08:24:52 -07:00
Tim Andersson
84d9355125 Revert "Fix: autopkgtest now returns content-length header again"
This reverts commit b7807106233ad1230211626e4288232ee09a9c02.
2024-04-25 08:32:06 +01:00
Tim Andersson
d5c0c1fbb3 feat: check database checksum instead of content-length header
autopkgtest-cloud will now serve:
autopkgtest.ubuntu.com/static/autopkgtest.db.sha256

Britney now calculates the sha256 of the newly downloaded db locally and
checks that it matches the sha256 file served by autopkgtest-cloud,
instead of checking that the content-length header matches the
size of the new downloaded database.

Since the most recent apache2 security update in focal [1], the
content-length header isn't served by default, and it seems that when
it is served it's not entirely accurate. This check has become
brittle, and so we have implemented this new mechanism.

[1] https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/2061816
2024-04-24 14:40:13 +01:00
Tim Andersson
b780710623 Fix: autopkgtest now returns content-length header again
reverts commit 25eb52aa3386ecbccd2d9c8dafd22498d40e2002

This must be reverted so that britney is aware of short reads of the db.
2024-04-16 17:13:17 +01:00