]>
git.ipfire.org Git - pbs.git/log
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>