Commit Graph

1164 Commits

Author SHA1 Message Date
Drew DeVault c6ad0c985c ubuntu: drop bionic (EOL) 2023-06-19 11:44:43 +02:00
Drew DeVault 27f62d1d8a Route build log requests through API
So that we can add authorization
2023-06-19 11:31:36 +02:00
Maxwell G c2ae4b7cfb remove EOL fedora/36 image
Fedora 36 is EOL as of 16 May 2023.

Ref: https://lists.fedoraproject.org/archives/list/announce@lists.fedoraproject.org/thread/XSSCFR35ZVONH5S57YGDDBUXFZL5KGK3/
2023-06-05 10:17:23 +02:00
Francesco Gazzetta 492913c1a5 images/nixos: remove 22.05 (EOL) 2023-06-05 10:16:17 +02:00
Francesco Gazzetta 5160255d6e images/nixos: add 23.05
There is a 23.05 channel but the release didn't happen yet, so we don't
change "latest"
2023-06-05 09:42:09 +02:00
Haowen Liu d6240b3542 ubuntu/mantic: starts development 2023-06-05 09:34:03 +02:00
Conrad Hoffmann 22bd41ead3 images/alpine: do not install any firmware
The firmware is not needed, and with some bad luck one will hit a
firmware upgrade when a setup job runs `apk upgrade`, which can take a
substantial amount of time.
2023-06-01 12:40:14 +02:00
Drew DeVault 7a00f10f33 API: fetch user context in loader implementation
Fetching it outside of this function will cause it to attempt to fetch
the auth context when the middleware is stood up, which occurs
unconditionally on all requests -- including unauthenticated ones, such
as /query/metrics. Moving it into the function body causes it to only
occur once we actually attempt to fetch jobs.
2023-04-17 14:05:43 +02:00
Adnan Maolood bc87a4ba1a Implement job visibility
This implements visibility for build jobs. The visibility can be set
when submitting a build, and can also be changed retroactively from a
new job settings page.
2023-04-17 13:17:13 +02:00
Simon Ser 89c87b209e api/loaders: don't panic
A panic here will take down the whole server: dataloaden spawns a
new goroutine and will not recover. (Regardless, an error can
happen here because of a runtime issue, so a panic is not a good
idea.)

See https://todo.sr.ht/~sircmpwn/sr.ht/325
2023-04-17 13:16:21 +02:00
Simon Ser 77b80665f2 Upgrade Go dependencies
Brings an updated core-go with 209e1a869851 ("database/middleware: do
not recover/panic in defer") included.
2023-04-17 13:16:13 +02:00
Simon Ser 579ec0cf70 images/freebsd: upgrade to 13.2 2023-04-11 14:45:24 +02:00
Adnan Maolood 53941b81ff Move go.mod to root 2023-04-11 14:45:15 +02:00
Drew DeVault a4cbc72c2d Upgrade to Alpine 3.17 2023-03-22 11:04:21 +01:00
Thorben Günther 27a80ffed5 api/artifacts: Use SelectAll and ScanAll
While working on hut I found a problem with my last patch concerning the
pruned URL feature [1]. The current implementation only works if the
GraphQL query contains the "created" timestamp, otherwise the "url"
field will always be null. That is caused by the zero value for time
which is used when created is not populated by the database query.

[1]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/39275
2023-03-13 12:55:11 +01:00
jgart 71f10ce5e1 images/guix: Update project email contact. 2023-03-07 09:35:32 +01:00
Thorben Günther fb9a92cdc0 api/artifacts: Set url to null if artifact is pruned 2023-03-07 09:33:23 +01:00
Drew DeVault 39ac714a51 images/archlinux: update pacman.conf
Excluding util-linux and libutil-linux caused some breakage and is
poorly justified, as it serves only to reduce time spent rebuilding the
initrd during package installation.
2023-03-06 11:23:41 +01:00
psykose d799d1142a alpine: upgrade the image before adding dependencies
this ensures that everything updates before installing any dependencies.

importantly, this sidesteps a potential apk bug
https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10881
caused by differences between 'upgrading' and 'adding' based on
already-installed dependencies.
2023-02-28 09:58:48 +01:00
Maxwell G e914db60e1 Add fedora/39 and adjust rawhide
fedora/38 is the current branched release, but it is not yet stable, so
fedora/latest still points to fedora/37. fedora/39 is the new rawhide.
2023-02-28 09:39:50 +01:00
Maxwell G 1381460ec7 images: remove EOL fedora/35. 2023-02-28 09:39:35 +01:00
Thorben Günther d76476e058 Fix secret parsing
Currently builds which use secrets will fail [1] with:
Error: GetSecret: pq: invalid input syntax for type uuid: "None"

That is caused by the uuid_or_string function never returning anything,
so the secrets array will simply consist of "None".

[1]: https://builds.sr.ht/~sircmpwn/job/947773
2023-02-27 08:38:49 +01:00
Drew DeVault f67dbed3d8 api: update go.mod, go.sum 2023-02-22 09:14:24 +01:00
Lucy Ekatarina 6117c412fc allow referencing secrets by name in manifests
Signed-off-by: Lucy Ekatarina <lucy@dragnof.pro>
2023-02-22 09:13:06 +01:00
Taavi Väänänen e36caade11 images/debian: follow modern third-party repository conventions
Updates the Debian image to match modern conventions:
 * Use a separate file in /etc/apt/sources.list.d per each repository
   instead of adding everything to sources.list.
 * Instead of using trusted.gpg.d, add each repository key to
   /etc/apt/keyrings.d and set the signed-by option on the sources.list
   entry.
 * Drop use of apt-key in the installation.

These are based on this document: https://wiki.debian.org/DebianRepository/UseThirdParty
2023-02-22 09:13:00 +01:00
Taavi Väänänen ad5daff94c images/debian: Increase /boot partition size
Apparently the space needed in /boot is at least temporarily over 100M,
so the build will fail with:
 gzip: stdout: No space left on device
2023-02-22 09:12:51 +01:00
Francesco Gazzetta a1c186f4ff images/nixos: add 22.11, point latest to it 2023-02-13 14:51:58 +01:00
Drew DeVault e6daf74c92 Upgrade core-go 2023-01-31 16:47:25 +01:00
Drew DeVault d667064745 Update core-go 2023-01-31 16:39:02 +01:00
Drew DeVault ee6e6c26ae worker: ensure children are reaped 2023-01-31 12:11:02 +01:00
Conrad Hoffmann 66e30c11fa Fix qemu image build on latest Debian unstable
In the latest Debian unstable (bookworm), `/bin` and `/lib` are symlinks
to `/usr/bin` and `/usr/lib` respectively. Hence, even though we
configure with e.g. `bindir=/bin`, the files get installed to
`/usr/bin` (same for the libs).

Docker COPY however does not resolve symlinks, so the actual path has to
be used. To avoid confusion, the arguments to `configure` have also been
updated (essentially a no-op on that image).
2023-01-26 09:33:22 +01:00
Simon Ser 25ab18bf2e images/freebsd: upgrade to 12.4
See https://www.freebsd.org/releases/12.4R/announce/
2023-01-19 15:15:12 +01:00
Maxwell G 2e2cf020b4 Move fedora/latest alias to fedora/37
Fedora 37 was officially released today[1]. Fedora 35 will go EOL next
month.

[1]: https://ask.fedoraproject.org/t/fedora-37-released-fedora-35-reaches-end-of-life-in-december-22/28538
2023-01-19 15:15:12 +01:00
xdavidwu 57c08ce2ba jobs: also show search bar when there is no result
Fixes: https://todo.sr.ht/~sircmpwn/builds.sr.ht/261
2023-01-19 15:08:58 +01:00
Conrad Hoffmann 28e2176022 Add index on job.job_group_id
A lot of queries are for jobs by their group ID. These queries are
starting to show up in the slow query log. Add an index on the group ID
to speed things up.
2023-01-19 15:08:53 +01:00
Conrad Hoffmann 70c63ae4d5 alembic: fix broken downgrade 2023-01-19 15:08:42 +01:00
Drew DeVault 0676ee9245 images/alpine: update aliases 2023-01-19 11:17:03 +01:00
Drew DeVault 665301e574 images/all: update target build workers 2023-01-19 11:09:03 +01:00
Drew DeVault cef09e6a60 alpine/3.17: new image 2023-01-19 11:03:19 +01:00
Conrad Hoffmann 292dc73e28 api: pass job owner to StartJobGroupUnsafe()
This allows it to make use of the index on `owner_id` in the `job`
table. Without this, the query it makes is prohibitively expensive. A
sample query analysis went from > 1800 ms without the index to < 1ms
when using the index.
2022-11-27 14:33:52 +01:00
Conrad Hoffmann eaf435b143 Update core-go and pq (Postgres driver) 2022-11-25 14:52:09 +01:00
Conrad Hoffmann 5b4a40fc96 api: allow cancelling of orphaned jobs 2022-11-24 11:32:59 +01:00
Conrad Hoffmann 023637a957 Remove unused import of core.email
Its usage was removed in 4700325.
2022-11-10 11:21:07 +01:00
Maxwell G 1ab0ec0da4 Add fedora/38 image and point fedora/rawhide to it
Fedora 37 is the current Fedora branched release and Rawhide is now 38.
2022-11-07 12:15:11 +01:00
Haowen Liu 34e43918e1 ubuntu/kinetic released, ubuntu/lunar starts development 2022-11-07 12:15:04 +01:00
Haowen Liu bbdb966f70 Fix rockylinux build error 2022-11-07 12:14:57 +01:00
Jason Lenz 57e947dac9 openbsd: add 7.2 2022-11-07 12:14:46 +01:00
Josiah Frentsos 8151fe14e4 openbsd: Disable some unnecessary daemons 2022-11-07 12:14:41 +01:00
Drew DeVault d05425f4aa API: implement user account deletion 2022-11-01 15:35:00 +01:00
Adnan Maolood 2eac1686b7 buildsrht: Use canonical user IDs
Update user IDs across builds.sr.ht to match those of meta.sr.ht.
2022-10-26 10:45:34 +02:00