]> git.ipfire.org Git - pbs.git/log
pbs.git
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>
6 months agobuilders: Consider a builder running when it is online
Michael Tremer [Wed, 5 Feb 2025 15:53:38 +0000 (15:53 +0000)] 
builders: Consider a builder running when it is online

This is a lot cheaper to test and should be sufficiently accurate.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Fix formatting timeout time
Michael Tremer [Wed, 5 Feb 2025 15:50:14 +0000 (15:50 +0000)] 
jobs: Fix formatting timeout time

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agomessages: Ensure we commit to the database after each message
Michael Tremer [Wed, 5 Feb 2025 15:49:01 +0000 (15:49 +0000)] 
messages: Ensure we commit to the database after each message

We have this weird problem that after any background tasks, SQLAlchemy
won't automatically commit. Therefore all those changes were lost.

But since we want to avoid sending messages again if something else
later in a batch fails we will commit any changes immediately after each
message has been sent.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agosettings: Remove database settings
Michael Tremer [Wed, 5 Feb 2025 15:41:07 +0000 (15:41 +0000)] 
settings: Remove database settings

We read stuff from the configuration file now.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agorelease monitoring: Read the API key from configuration file
Michael Tremer [Wed, 5 Feb 2025 15:38:45 +0000 (15:38 +0000)] 
release monitoring: Read the API key from configuration file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agomessages: Refactor the whole thing
Michael Tremer [Wed, 5 Feb 2025 15:34:47 +0000 (15:34 +0000)] 
messages: Refactor the whole thing

This will now asynchronously send messages from the main thread.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobackend: Load SSL context from certificate files
Michael Tremer [Wed, 5 Feb 2025 15:23:37 +0000 (15:23 +0000)] 
backend: Load SSL context from certificate files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoconfig: Don't log arch which can be empty
Michael Tremer [Wed, 5 Feb 2025 14:32:17 +0000 (14:32 +0000)] 
config: Don't log arch which can be empty

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agopackages: Fix rename installsize field
Michael Tremer [Wed, 5 Feb 2025 11:31:13 +0000 (11:31 +0000)] 
packages: Fix rename installsize field

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agorepos: Fix relaunching pending jobs
Michael Tremer [Wed, 5 Feb 2025 11:30:36 +0000 (11:30 +0000)] 
repos: Fix relaunching pending jobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Fix importing DependencyError
Michael Tremer [Wed, 5 Feb 2025 11:30:10 +0000 (11:30 +0000)] 
jobs: Fix importing DependencyError

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoconfig: Set cache path in context
Michael Tremer [Wed, 5 Feb 2025 11:13:48 +0000 (11:13 +0000)] 
config: Set cache path in context

This has now been fixed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Don't abort when already aborted
Michael Tremer [Wed, 5 Feb 2025 10:19:51 +0000 (10:19 +0000)] 
jobs: Don't abort when already aborted

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoconfig: Initialize Pakfire in stub mode
Michael Tremer [Wed, 5 Feb 2025 10:19:02 +0000 (10:19 +0000)] 
config: Initialize Pakfire in stub mode

This way, Pakfire does not need a path, won't initialize the database
and so on. It simply can be used to perform dependency solving which is
all we need here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Drop unused control connection stuff
Michael Tremer [Wed, 5 Feb 2025 09:42:34 +0000 (09:42 +0000)] 
jobs: Drop unused control connection stuff

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Update message to abort
Michael Tremer [Wed, 5 Feb 2025 09:41:01 +0000 (09:41 +0000)] 
jobs: Update message to abort

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Rename the finished handler
Michael Tremer [Tue, 4 Feb 2025 14:07:59 +0000 (14:07 +0000)] 
jobs: Rename the finished handler

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoweb: Make fetching multiple uploads async
Michael Tremer [Tue, 4 Feb 2025 14:07:07 +0000 (14:07 +0000)] 
web: Make fetching multiple uploads async

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Drop the control connection
Michael Tremer [Tue, 4 Feb 2025 11:46:31 +0000 (11:46 +0000)] 
jobs: Drop the control connection

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoweb: Consider spaces when splitting Accept-Enconding headers
Michael Tremer [Mon, 3 Feb 2025 10:13:31 +0000 (10:13 +0000)] 
web: Consider spaces when splitting Accept-Enconding headers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Import log files as they are when they are already compressed
Michael Tremer [Mon, 3 Feb 2025 10:12:54 +0000 (10:12 +0000)] 
jobs: Import log files as they are when they are already compressed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agouploads: Commit the database session before sending response
Michael Tremer [Mon, 3 Feb 2025 10:10:52 +0000 (10:10 +0000)] 
uploads: Commit the database session before sending response

The client could reconnect very quickly, before the database has session
has been commited which will result on the upload failing. Therefore we
make sure that the implicitely opened transaction has been commited
before we send the response.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agomirrors: Use existing URLs to compose mirror URLs
Michael Tremer [Mon, 3 Feb 2025 10:10:19 +0000 (10:10 +0000)] 
mirrors: Use existing URLs to compose mirror URLs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agorepos: Don't include the build service in the mirrorlist
Michael Tremer [Mon, 3 Feb 2025 10:05:29 +0000 (10:05 +0000)] 
repos: Don't include the build service in the mirrorlist

pakfire will already fall back to it, if baseurl is set.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agouploads: Refactor this once again
Michael Tremer [Wed, 29 Jan 2025 18:18:51 +0000 (18:18 +0000)] 
uploads: Refactor this once again

This is not 100% async but good enough. If the system cannot write to
its own file system we probably have bigger issues.

This will now spool the uploaded data for a little while but soon flush
it out once it has become too large to be kept in memory for forever.

The file will then be copied (yes I know) and the new path stored.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobackend: Drop an unused function
Michael Tremer [Wed, 29 Jan 2025 18:17:48 +0000 (18:17 +0000)] 
backend: Drop an unused function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agouploads: Calculate the digest when receiving the file
Michael Tremer [Wed, 29 Jan 2025 17:15:46 +0000 (17:15 +0000)] 
uploads: Calculate the digest when receiving the file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Fix sending configuration
Michael Tremer [Wed, 29 Jan 2025 17:14:01 +0000 (17:14 +0000)] 
jobs: Fix sending configuration

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agouploads: Return the received filename in the API response
Michael Tremer [Wed, 29 Jan 2025 17:13:27 +0000 (17:13 +0000)] 
uploads: Return the received filename in the API response

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agouploads: Add a debug handler to download any uploaded payload
Michael Tremer [Wed, 29 Jan 2025 10:40:11 +0000 (10:40 +0000)] 
uploads: Add a debug handler to download any uploaded payload

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agouploads: Send an URL to the client where to send the payload
Michael Tremer [Wed, 29 Jan 2025 10:39:39 +0000 (10:39 +0000)] 
uploads: Send an URL to the client where to send the payload

Hopefully this will give us some more flexibility in the future.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agouploads: Manually commit the session
Michael Tremer [Wed, 29 Jan 2025 10:38:58 +0000 (10:38 +0000)] 
uploads: Manually commit the session

This is required because the session might not be fast enough before the
client comes back with the payload. This ensures that we won't have a
race.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoconfig: Pass the configuration to Pakfire as string
Michael Tremer [Mon, 27 Jan 2025 15:47:45 +0000 (15:47 +0000)] 
config: Pass the configuration to Pakfire as string

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoconfigure: Check for all required Python module
Michael Tremer [Mon, 27 Jan 2025 15:07:59 +0000 (15:07 +0000)] 
configure: Check for all required Python module

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoconstants: Remove unused values
Michael Tremer [Mon, 27 Jan 2025 15:02:09 +0000 (15:02 +0000)] 
constants: Remove unused values

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoRename to PBS
Michael Tremer [Mon, 27 Jan 2025 14:58:53 +0000 (14:58 +0000)] 
Rename to PBS

This is easier than a hyphenated Python package name. This is now also
moved out of the pakfire module which has become a pure C module.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Store control connections by their UUID
Michael Tremer [Sun, 26 Jan 2025 17:27:35 +0000 (17:27 +0000)] 
jobs: Store control connections by their UUID

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Add crash handler
Michael Tremer [Sun, 26 Jan 2025 17:26:52 +0000 (17:26 +0000)] 
jobs: Add crash handler

This will be called by the builders when the build process has
unexexpectedly crashed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Fix retrying jobs
Michael Tremer [Sun, 26 Jan 2025 14:32:35 +0000 (14:32 +0000)] 
jobs: Fix retrying jobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Fix aborting jobs
Michael Tremer [Sun, 26 Jan 2025 14:28:32 +0000 (14:28 +0000)] 
jobs: Fix aborting jobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoweb: Don't fetch index data in a transaction
Michael Tremer [Sun, 26 Jan 2025 14:22:15 +0000 (14:22 +0000)] 
web: Don't fetch index data in a transaction

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agojobs: Fix fetching running jobs
Michael Tremer [Sun, 26 Jan 2025 14:21:54 +0000 (14:21 +0000)] 
jobs: Fix fetching running jobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agobuilders: Refactor dispatching jobs
Michael Tremer [Sun, 26 Jan 2025 14:01:32 +0000 (14:01 +0000)] 
builders: Refactor dispatching jobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoconfig: Tidy up code
Michael Tremer [Sun, 26 Jan 2025 13:58:25 +0000 (13:58 +0000)] 
config: Tidy up code

No functional changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agoconfig: Make it easier to generate a text configuration
Michael Tremer [Sun, 26 Jan 2025 13:54:39 +0000 (13:54 +0000)] 
config: Make it easier to generate a text configuration

We cannot use the old method any more since we need to call async
methods.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 months agodatabase: (Re-)raise any exceptions after the task is done
Michael Tremer [Sun, 26 Jan 2025 13:53:40 +0000 (13:53 +0000)] 
database: (Re-)raise any exceptions after the task is done

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