]> git.ipfire.org Git - pbs.git/log
pbs.git
5 months agodistros: Use my new arch colors
Michael Tremer [Tue, 11 Feb 2025 17:14:09 +0000 (17:14 +0000)] 
distros: Use my new arch colors

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoimages: Add modal with all checksums
Michael Tremer [Tue, 11 Feb 2025 17:08:42 +0000 (17:08 +0000)] 
images: Add modal with all checksums

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoJS: Add code for modals
Michael Tremer [Tue, 11 Feb 2025 17:08:20 +0000 (17:08 +0000)] 
JS: Add code for modals

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobackend: Catch non-existant files on stat()
Michael Tremer [Tue, 11 Feb 2025 16:39:18 +0000 (16:39 +0000)] 
backend: Catch non-existant files on stat()

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobackend: Perform some path validation
Michael Tremer [Tue, 11 Feb 2025 16:39:00 +0000 (16:39 +0000)] 
backend: Perform some path validation

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agomirrors: Send the correct MIME type
Michael Tremer [Tue, 11 Feb 2025 16:29:48 +0000 (16:29 +0000)] 
mirrors: Send the correct MIME type

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agomirrors: Set Etag header in HEAD response
Michael Tremer [Tue, 11 Feb 2025 16:22:01 +0000 (16:22 +0000)] 
mirrors: Set Etag header in HEAD response

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agomirrors: Ask clients to not cache the redirect
Michael Tremer [Tue, 11 Feb 2025 16:21:43 +0000 (16:21 +0000)] 
mirrors: Ask clients to not cache the redirect

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agomirrors: Support HEAD requests in load balancer
Michael Tremer [Tue, 11 Feb 2025 15:43:29 +0000 (15:43 +0000)] 
mirrors: Support HEAD requests in load balancer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agomirrors: Don't send any Content-Type headers
Michael Tremer [Tue, 11 Feb 2025 15:42:27 +0000 (15:42 +0000)] 
mirrors: Don't send any Content-Type headers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agomirrors: Check if the file exists at all
Michael Tremer [Tue, 11 Feb 2025 15:39:46 +0000 (15:39 +0000)] 
mirrors: Check if the file exists at all

We should not query any mirrors for files that even we don't have
ourselves.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agomirrors: Don't send body in error responses
Michael Tremer [Tue, 11 Feb 2025 15:39:00 +0000 (15:39 +0000)] 
mirrors: Don't send body in error responses

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoratelimiter: Add primary key
Michael Tremer [Tue, 11 Feb 2025 15:36:14 +0000 (15:36 +0000)] 
ratelimiter: Add primary key

So that I can edit the table.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agomirrors: Limit for up to 100 requests per hour for downloads
Michael Tremer [Tue, 11 Feb 2025 15:28:19 +0000 (15:28 +0000)] 
mirrors: Limit for up to 100 requests per hour for downloads

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agomirrors: Add a universal download load balancer
Michael Tremer [Tue, 11 Feb 2025 15:25:21 +0000 (15:25 +0000)] 
mirrors: Add a universal download load balancer

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agocache: Import datetime
Michael Tremer [Tue, 11 Feb 2025 15:24:52 +0000 (15:24 +0000)] 
cache: Import datetime

This is being used in the code but was not imported.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoweb: Add some basic Python built-ins
Michael Tremer [Tue, 11 Feb 2025 14:01:37 +0000 (14:01 +0000)] 
web: Add some basic Python built-ins

They don't need any special wrapping, so lets pass them as they come.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Add a simple listing of images
Michael Tremer [Tue, 11 Feb 2025 13:59:32 +0000 (13:59 +0000)] 
releases: Add a simple listing of images

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobackend: Extend path to URL function to support mirrors
Michael Tremer [Tue, 11 Feb 2025 13:58:17 +0000 (13:58 +0000)] 
backend: Extend path to URL function to support mirrors

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobackend: Allow assembling absolute URLs
Michael Tremer [Tue, 11 Feb 2025 13:57:47 +0000 (13:57 +0000)] 
backend: Allow assembling absolute URLs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: I will never learn this
Michael Tremer [Tue, 11 Feb 2025 13:57:01 +0000 (13:57 +0000)] 
releases: I will never learn this

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobackend: Add helper function to make paths relative
Michael Tremer [Tue, 11 Feb 2025 13:30:48 +0000 (13:30 +0000)] 
backend: Add helper function to make paths relative

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Make the decision whether to mirror or not a bit more complex
Michael Tremer [Tue, 11 Feb 2025 13:27:58 +0000 (13:27 +0000)] 
releases: Make the decision whether to mirror or not a bit more complex

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoCSS: Assign special colours for architectures
Michael Tremer [Tue, 11 Feb 2025 13:20:30 +0000 (13:20 +0000)] 
CSS: Assign special colours for architectures

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Show release date as short as possible
Michael Tremer [Tue, 11 Feb 2025 10:37:02 +0000 (10:37 +0000)] 
releases: Show release date as short as possible

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Fix publishing releases
Michael Tremer [Tue, 11 Feb 2025 10:32:47 +0000 (10:32 +0000)] 
releases: Fix publishing releases

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Fix deleting releases and their images
Michael Tremer [Tue, 11 Feb 2025 10:29:14 +0000 (10:29 +0000)] 
releases: Fix deleting releases and their images

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Fix editing a release
Michael Tremer [Tue, 11 Feb 2025 10:25:00 +0000 (10:25 +0000)] 
releases: Fix editing a release

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Fix creating a new release
Michael Tremer [Tue, 11 Feb 2025 10:22:33 +0000 (10:22 +0000)] 
releases: Fix creating a new release

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Fix rendering the detail page
Michael Tremer [Tue, 11 Feb 2025 10:11:34 +0000 (10:11 +0000)] 
releases: Fix rendering the detail page

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Fix rendering the index page
Michael Tremer [Tue, 11 Feb 2025 10:11:17 +0000 (10:11 +0000)] 
releases: Fix rendering the index page

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoreleases: Mirror all stable releases
Michael Tremer [Tue, 11 Feb 2025 09:59:49 +0000 (09:59 +0000)] 
releases: Mirror all stable releases

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agousers: Add banner to ask to subscribe on front page
Michael Tremer [Mon, 10 Feb 2025 16:54:14 +0000 (16:54 +0000)] 
users: Add banner to ask to subscribe on front page

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoevents: Always import the Text macro
Michael Tremer [Mon, 10 Feb 2025 16:18:44 +0000 (16:18 +0000)] 
events: Always import the Text macro

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobuilds: Fix adding/removing from repositories
Michael Tremer [Mon, 10 Feb 2025 16:15:59 +0000 (16:15 +0000)] 
builds: Fix adding/removing from repositories

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobuilds: Fix comments
Michael Tremer [Mon, 10 Feb 2025 15:53:44 +0000 (15:53 +0000)] 
builds: Fix comments

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobackend: Run autoscaling on startup
Michael Tremer [Mon, 10 Feb 2025 15:33:42 +0000 (15:33 +0000)] 
backend: Run autoscaling on startup

This is to potentially shut down any builders that should not be
running.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agojobs: Abort when the build job has crashed
Michael Tremer [Mon, 10 Feb 2025 15:31:15 +0000 (15:31 +0000)] 
jobs: Abort when the build job has crashed

I think we want to collect a little bit more meta information about the
crash, but for now we at least see that something has aborted the job.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agojobs: Automatically abort jobs that have timed out
Michael Tremer [Mon, 10 Feb 2025 15:30:39 +0000 (15:30 +0000)] 
jobs: Automatically abort jobs that have timed out

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobackend: Use the @run_in_thread decorator
Michael Tremer [Mon, 10 Feb 2025 15:25:03 +0000 (15:25 +0000)] 
backend: Use the @run_in_thread decorator

This allows us to write shorter code but achieve the same.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobuild joins: Load builds joined
Michael Tremer [Mon, 10 Feb 2025 15:07:33 +0000 (15:07 +0000)] 
build joins: Load builds joined

I don't know why this has to be this way, but if not, it does not work.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobuild groups: Fix database field names of ownership
Michael Tremer [Mon, 10 Feb 2025 15:06:46 +0000 (15:06 +0000)] 
build groups: Fix database field names of ownership

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agodecorators: Drop the lazy_property decorator
Michael Tremer [Mon, 10 Feb 2025 15:05:30 +0000 (15:05 +0000)] 
decorators: Drop the lazy_property decorator

We don't need this to be settable any more, so therefore we can use the
functools.cached_property decorator that comes with the standard
distribution.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoregisty: Use the new cache instead of the in-memory cache
Michael Tremer [Mon, 10 Feb 2025 11:20:51 +0000 (11:20 +0000)] 
registy: Use the new cache instead of the in-memory cache

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agocache: Add a simple key/value cache with expiry time
Michael Tremer [Mon, 10 Feb 2025 11:20:20 +0000 (11:20 +0000)] 
cache: Add a simple key/value cache with expiry time

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agobuilds: Fix typo in class name
Michael Tremer [Mon, 10 Feb 2025 10:51:42 +0000 (10:51 +0000)] 
builds: Fix typo in class name

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoregistry: Don't fail if we could not find a file inside an image
Michael Tremer [Mon, 10 Feb 2025 10:50:52 +0000 (10:50 +0000)] 
registry: Don't fail if we could not find a file inside an image

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoregistry: Add a simple in-memory cache for indexes
Michael Tremer [Mon, 10 Feb 2025 10:50:31 +0000 (10:50 +0000)] 
registry: Add a simple in-memory cache for indexes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoregistry: Respond with the correct code when manifest was not found
Michael Tremer [Mon, 10 Feb 2025 10:49:32 +0000 (10:49 +0000)] 
registry: Respond with the correct code when manifest was not found

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 months agoregistry: Add a tags handler
Michael Tremer [Mon, 10 Feb 2025 10:49:00 +0000 (10:49 +0000)] 
registry: Add a tags handler

This lists all available tags

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoregistry: Send proper API error if something wasn't found
Michael Tremer [Sun, 9 Feb 2025 13:56:00 +0000 (13:56 +0000)] 
registry: Send proper API error if something wasn't found

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoregistry: Split the combined handlers
Michael Tremer [Sun, 9 Feb 2025 13:31:04 +0000 (13:31 +0000)] 
registry: Split the combined handlers

I think this might all be slightly better to read instead of all the ifs
and elses.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoregistry: Stream blobs from a separate thread
Michael Tremer [Sun, 9 Feb 2025 13:26:23 +0000 (13:26 +0000)] 
registry: Stream blobs from a separate thread

We need this to not block the main thread on really large blobs.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agodecorators: Create a decorator to run something in a thread
Michael Tremer [Sun, 9 Feb 2025 13:24:31 +0000 (13:24 +0000)] 
decorators: Create a decorator to run something in a thread

This is just for convenience and to write less code since we are using
this pattern a lot.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoregistry: Create a function to find a blob
Michael Tremer [Sun, 9 Feb 2025 13:23:48 +0000 (13:23 +0000)] 
registry: Create a function to find a blob

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoregistry: Build a basic read-only OCI registry
Michael Tremer [Sun, 9 Feb 2025 13:14:30 +0000 (13:14 +0000)] 
registry: Build a basic read-only OCI registry

This allows us to easily run any OCI images in Docker/podman/etc. for CI
testing without engaging any external storage, etc.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoimages: Build out class and add the table
Michael Tremer [Sun, 9 Feb 2025 11:45:46 +0000 (11:45 +0000)] 
images: Build out class and add the table

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Fix relationship to groups
Michael Tremer [Fri, 7 Feb 2025 18:10:01 +0000 (18:10 +0000)] 
builds: Fix relationship to groups

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Fix creating test groups
Michael Tremer [Fri, 7 Feb 2025 16:27:55 +0000 (16:27 +0000)] 
builds: Fix creating test groups

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Fix dedicated log streaming page
Michael Tremer [Fri, 7 Feb 2025 16:26:35 +0000 (16:26 +0000)] 
jobs: Fix dedicated log streaming page

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Wrap avatars in <figure>
Michael Tremer [Fri, 7 Feb 2025 16:26:07 +0000 (16:26 +0000)] 
builds: Wrap avatars in <figure>

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Put most recently finished jobs to the top
Michael Tremer [Fri, 7 Feb 2025 16:25:44 +0000 (16:25 +0000)] 
jobs: Put most recently finished jobs to the top

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilders: Fix the watchers
Michael Tremer [Fri, 7 Feb 2025 15:48:37 +0000 (15:48 +0000)] 
builders: Fix the watchers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Let Apache deliver the log files
Michael Tremer [Fri, 7 Feb 2025 15:07:03 +0000 (15:07 +0000)] 
jobs: Let Apache deliver the log files

This will be even more efficient than sending them in the main process.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Call the right function to create a group
Michael Tremer [Fri, 7 Feb 2025 12:43:52 +0000 (12:43 +0000)] 
builds: Call the right function to create a group

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Fix fetching reverse requires
Michael Tremer [Fri, 7 Feb 2025 12:17:11 +0000 (12:17 +0000)] 
builds: Fix fetching reverse requires

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Fix log streaming
Michael Tremer [Fri, 7 Feb 2025 11:58:48 +0000 (11:58 +0000)] 
jobs: Fix log streaming

This will now dynamically turn this on and off whenever it is needed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Drop the old log stream module
Michael Tremer [Thu, 6 Feb 2025 23:08:57 +0000 (23:08 +0000)] 
jobs: Drop the old log stream module

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agomessages: Fix sending emails
Michael Tremer [Thu, 6 Feb 2025 23:08:19 +0000 (23:08 +0000)] 
messages: Fix sending emails

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Move log stream frontend code
Michael Tremer [Thu, 6 Feb 2025 23:07:56 +0000 (23:07 +0000)] 
jobs: Move log stream frontend code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Fix sending emails to watchers
Michael Tremer [Thu, 6 Feb 2025 23:00:15 +0000 (23:00 +0000)] 
builds: Fix sending emails to watchers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Send a push notification when a build is ready
Michael Tremer [Thu, 6 Feb 2025 22:59:25 +0000 (22:59 +0000)] 
builds: Send a push notification when a build is ready

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilders: Hash builders by hostname for their stats connections
Michael Tremer [Thu, 6 Feb 2025 21:24:39 +0000 (21:24 +0000)] 
builders: Hash builders by hostname for their stats connections

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilders: Fix memory usage calculation
Michael Tremer [Thu, 6 Feb 2025 21:08:05 +0000 (21:08 +0000)] 
builders: Fix memory usage calculation

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Add a combined operation to flush and refresh
Michael Tremer [Thu, 6 Feb 2025 20:30:27 +0000 (20:30 +0000)] 
builds: Add a combined operation to flush and refresh

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Fix fetching watchers
Michael Tremer [Thu, 6 Feb 2025 20:25:21 +0000 (20:25 +0000)] 
builds: Fix fetching watchers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilders: Fix sending stats
Michael Tremer [Thu, 6 Feb 2025 20:24:50 +0000 (20:24 +0000)] 
builders: Fix sending stats

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilders: Fix fetching the value for enabled
Michael Tremer [Thu, 6 Feb 2025 20:23:39 +0000 (20:23 +0000)] 
builders: Fix fetching the value for enabled

It has to be a boolean.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilders: Move stats JS into the main file
Michael Tremer [Thu, 6 Feb 2025 20:22:56 +0000 (20:22 +0000)] 
builders: Move stats JS into the main file

We currently cannot easily add more files in the right place, so since
there is only so little code, we just ship it all together.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Associate imported packages with the job
Michael Tremer [Thu, 6 Feb 2025 17:52:58 +0000 (17:52 +0000)] 
jobs: Associate imported packages with the job

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Flush and refresh to read the finished timestamp
Michael Tremer [Thu, 6 Feb 2025 17:52:05 +0000 (17:52 +0000)] 
jobs: Flush and refresh to read the finished timestamp

This feels like a stupid hack but this at least prevents utter mayhem
happening after this.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Turn JobPackage into a model
Michael Tremer [Thu, 6 Feb 2025 17:50:57 +0000 (17:50 +0000)] 
jobs: Turn JobPackage into a model

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agodatabase: Log less
Michael Tremer [Thu, 6 Feb 2025 16:46:23 +0000 (16:46 +0000)] 
database: Log less

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agopackages: Remove some dead code
Michael Tremer [Thu, 6 Feb 2025 16:46:09 +0000 (16:46 +0000)] 
packages: Remove some dead code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Let's try running autoscaling in the background
Michael Tremer [Thu, 6 Feb 2025 16:44:27 +0000 (16:44 +0000)] 
jobs: Let's try running autoscaling in the background

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agopackages: Use the renamed checksum functions
Michael Tremer [Thu, 6 Feb 2025 16:44:01 +0000 (16:44 +0000)] 
packages: Use the renamed checksum functions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilders: Simplify the queue estimation
Michael Tremer [Thu, 6 Feb 2025 16:41:09 +0000 (16:41 +0000)] 
builders: Simplify the queue estimation

It is not a very exact science anyways to try to guess how long a job
will take, so we are now just counting them which should save a couple
of complex database queries when running this.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoaws: Be a little bit less verbose
Michael Tremer [Thu, 6 Feb 2025 16:34:00 +0000 (16:34 +0000)] 
aws: Be a little bit less verbose

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Commit to the database as soon as we have dispatched it
Michael Tremer [Thu, 6 Feb 2025 16:27:59 +0000 (16:27 +0000)] 
jobs: Commit to the database as soon as we have dispatched it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Fix finishing jobs
Michael Tremer [Thu, 6 Feb 2025 16:27:17 +0000 (16:27 +0000)] 
jobs: Fix finishing jobs

Obviously the database field is nullable and NULL by default.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Actually call the add_watcher() coroutine
Michael Tremer [Thu, 6 Feb 2025 16:25:54 +0000 (16:25 +0000)] 
builds: Actually call the add_watcher() coroutine

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Ensure that we have packages when a job finishes
Michael Tremer [Thu, 6 Feb 2025 15:00:10 +0000 (15:00 +0000)] 
jobs: Ensure that we have packages when a job finishes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobackend: Allow passing keyword arguments to background tasks
Michael Tremer [Thu, 6 Feb 2025 14:43:39 +0000 (14:43 +0000)] 
backend: Allow passing keyword arguments to background tasks

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Don't cache preceeding jobs
Michael Tremer [Wed, 5 Feb 2025 17:38:26 +0000 (17:38 +0000)] 
jobs: Don't cache preceeding jobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilds: Break some dependency cycle somewhere
Michael Tremer [Wed, 5 Feb 2025 17:27:59 +0000 (17:27 +0000)] 
builds: Break some dependency cycle somewhere

SQLAlchemy failed to load alljobs in Builds and I could not quite figure
out why. It seems that when both properties that form the relationship
should be fetched in a single join, nothing happens and SQLAlchemy does
not even seem to complain about it. Oh well.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agodatabase: Require builders to be created by someone
Michael Tremer [Wed, 5 Feb 2025 17:13:59 +0000 (17:13 +0000)] 
database: Require builders to be created by someone

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agodb: Drop the settings table
Michael Tremer [Wed, 5 Feb 2025 17:13:28 +0000 (17:13 +0000)] 
db: Drop the settings table

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agodatabase: Use as many inner joins as possible
Michael Tremer [Wed, 5 Feb 2025 17:07:50 +0000 (17:07 +0000)] 
database: Use as many inner joins as possible

We also are very unlikely to fetch any deleted objects, so let's rather
pull in the users that have deleted something by "SELECT IN" so that the
queries will be smaller and we don't add any joins which almost never
will find anything.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agomessages: Fetch messages in badges
Michael Tremer [Wed, 5 Feb 2025 16:20:19 +0000 (16:20 +0000)] 
messages: Fetch messages in badges

We would have otherwise looped for forever since we cannot check in
advance whether the iterator actually has any elements, but we don't
want to connect to the mail relay if there is literally nothing to send.
So as a compromise we fetch messages in batches.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilders: Fix fetching running jobs
Michael Tremer [Wed, 5 Feb 2025 16:06:06 +0000 (16:06 +0000)] 
builders: Fix fetching running jobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>