Commit Graph

48 Commits

Author SHA1 Message Date
Martchus d3e556cea7 Notify systemd when the service is ready or stopping 2023-10-16 23:48:19 +02:00
Martchus 7cea1c5f41 Fix package search for exact name; fix use after move in `routes.cpp` 2023-09-11 21:49:43 +02:00
Martchus 85736af4bb Avoid warnings about unqualified calls to `std::move` in `routes.cpp` 2023-09-11 21:43:36 +02:00
Martchus e14eb17c60 Apply clang-format 2023-01-23 22:42:45 +01:00
Martchus 31d1025b85 Fix compilation against boost 1.81.0 2023-01-22 22:31:20 +01:00
Martchus 5f25e6e8b7 Avoid unqualified calls to `std::move` 2023-01-22 22:30:07 +01:00
Martchus 9cf0fed450 Avoid duplicating "Clone of" in task name 2022-11-13 22:44:41 +01:00
Martchus aff7853f94 Set task name of clones 2022-11-13 22:14:29 +01:00
Martchus bde385ba6b Allow auth without access to secrets (and then just don't access secrets) 2022-07-29 22:07:24 +02:00
Martchus 662c924321 Use `flagenumclass.h` for auth flags 2022-07-29 22:06:40 +02:00
Martchus 255da5b091 Allow passing secrets to build action 2022-07-11 23:33:28 +02:00
Martchus df2b5ba9f6 Allow secrets stored in encrypted files to be loaded from route handlers 2022-07-10 19:47:41 +02:00
Martchus 55c7c62c7c Speed up returning build actions table by avoiding deserializing whole obj 2022-05-31 20:54:02 +02:00
Martchus f2902f1d08 Apply clang-format 2022-05-31 20:13:21 +02:00
Martchus b74392c34d Speed up deserialization when serving providing packages as well 2022-05-31 19:40:12 +02:00
Martchus 68d67f543f Refactor to optimize deserialization of base-data
* Break backwards compatibility
* Allow to deserialize only base-data of packages and build
  actions to potentially speed up showing tables
* Speed up package search in many cases by only deserializing
  base-data (unless details are actually wanted)
2022-05-31 19:04:57 +02:00
Martchus 4c98887b02 Fix warning about possibly unused value 2022-05-12 20:33:23 +02:00
Martchus 1950619f21 Add link to UI in root page 2022-05-01 22:21:42 +02:00
Martchus 2ca6ce1eec Prevent crash in package search when index is broken 2022-04-19 00:24:31 +02:00
Martchus edb014011c Make package search more efficient
* Avoid keeping list of all packages in memory by pushing each package
  directly to the JSON array
* Avoid check for database before pushing each package; do it only before
  reaching the next database
* Remove no longer required functions
2022-04-17 23:39:25 +02:00
Martchus 7c627e6a12 Use `auto` in `getPackages()` 2022-03-22 21:03:56 +01:00
Martchus 56afe0c710 Fix returning newly retrieved AUR packages 2022-03-22 21:03:01 +01:00
Martchus d5e2b5489d Provide filename for artefact downloads 2022-03-15 23:22:34 +01:00
Martchus b0234ff02e Improve MIME-type when serving artefacts 2022-03-15 00:21:08 +01:00
Martchus ac0d64fe3e Allow everyone to see build action details 2022-03-10 23:19:02 +01:00
Martchus 7ade757c8d Avoid locking whole config when updating DBs
* Only lock the config for writing the reloading the config file
* Make sure all write operations to the database acquire an "update mutex"
  to ensure only one write operation happens at a time
* Do *not* acquire any additional locks when reading from a database as it
  should be safe to do so even when a write operation happens because
    * LMDB read and write transactions can happen at the same time
    * The package cache has its own mutex anyways
    * Write ops to the package cache try to lock the "update mutex" to
      prevent writing "old" data to the cache during updates
* Make "lastUpdate" atomic to avoid locking the config when accessing it
2022-03-05 18:55:52 +01:00
Martchus 67fa8def0b Name additional threads 2022-02-25 23:09:46 +01:00
Martchus 90ff9678fe Limit results returned by the API for better scalability 2022-02-25 00:29:43 +01:00
Martchus 93afb3883d Write build action "output" log to a logfile like for sub-processes 2022-02-20 00:11:23 +01:00
Martchus a7de520549 Use lazy-deserialization and package cache when searching in package name 2022-02-19 00:11:59 +01:00
Martchus 557fd1a738 lmdb: Use lmdb to store build actions 2022-02-13 21:04:54 +01:00
Martchus 218dfecf56 Avoid loading databases when modification date is <= last update
* Do HTTP head request first when loading database from mirror to avoid
  downloading the full database all the time
* Use the last modification date of the local database file because with
  the persistent storage even local database reloads became a bit expensive
2022-01-25 00:13:10 +01:00
Martchus 2ffa6629c8 lmdb: Use lmdb to store packages and dependency indices 2022-01-18 21:50:53 +01:00
Martchus a2fbba9713 Allow constructing BadRequest from std::string 2021-07-07 19:46:43 +02:00
Martchus d006c9ce4f Fix error handling when instantiating `std::regex` 2021-07-07 19:09:32 +02:00
Martchus 49aebdd8a5 Fix typos found via `codespell --skip .git -w` 2021-07-03 19:59:57 +02:00
Martchus 05ff6cd00f Do not set packages in conduct build actions when creating it form task
Usually this doesn't make sense because we want to build all packages which
were determined in the previous prepare action. When specifying the
packages again in the conduct build action we'd skip packages which are
pulled into the build as dependencies which is normally not desired.
2021-05-01 23:28:30 +02:00
Martchus 8e904ebfbf Fix starting first build action
* Prevent endless recursion
* Consider starting parallel sequence also as having started an action to
  prevent starting also actions which should only start after that parallel
  sequence
2021-04-16 14:05:25 +02:00
Martchus 338674a9e6 Fix returning output when no offset present 2021-04-05 21:11:13 +02:00
Martchus 7ab50a121f Split routes.cpp 2021-04-05 20:02:00 +02:00
Martchus b73bee87b5 Add test for posting build actions from pre-defined build task 2021-04-05 19:49:04 +02:00
Martchus ff1e955bde Consider concurrent flag when starting build actions from task
This allows concurrent build actions within the same task.
2021-04-05 12:10:42 +02:00
Martchus 7f0ec081c6 Allow specifying build tasks with more complicated build actions
The new data structures (e.g. concurrent flag) aren't actually used yet.
2021-04-02 00:14:00 +02:00
Martchus fa969270c1 Fix warnings 2021-03-22 15:08:41 +01:00
Martchus 3894d911d7 Fix posting build action to start it later; add basic test for the route 2021-02-08 23:54:03 +01:00
Martchus 0c8f0b04c2 Experiment with Boost.Beast to use version of async_accept accepting IO ctx
This would make more sense instead of using the (copy of the) same socket
object all the time.
2021-02-08 23:54:03 +01:00
Martchus 6b274ccc88 Improve log messages 2021-02-08 23:54:03 +01:00
Martchus c1554f4c87 Initial import 2021-02-08 23:53:56 +01:00