Commit Graph

326 Commits

Author SHA1 Message Date
d7c4fccf98 feat: add ability to log sql statements 2024-09-04 22:28:25 +03:00
1e30838be4 feat: serve logs and events from the newest to oldest, but keep the
ordering

So basically initial implementation, with limit=1, would emit the oldest
record in series. New implementation will return the most recent one
instead

The response is still sorted by ascension
2024-09-04 22:28:25 +03:00
d57276f214 feat: log package update events 2024-09-04 22:28:25 +03:00
31e59df2c8 refactor: allow event to receive keyword arguments
This change also replaces the dataclass implementation of the class to
custom one
2024-09-04 22:28:25 +03:00
23cd843e44 feat: add timer for metrics purposes 2024-09-04 22:28:25 +03:00
c08a292070 docs: update booleans in docs 2024-09-04 22:28:25 +03:00
5163aa4dca feat: implement audit log tables and methods (#129) 2024-09-04 22:28:25 +03:00
69f0966ff1 feat: replace scan paths options to single one
It has been found that previous system didn't allow to configure
specific cases (e.g. a whitelisted directory inside /usr/lib/cmake). The
current solution replaces two options to single one, which also allows a
regular expressions

Also PackageArchive class has been moved to core package, because it is
more about service rather than model
2024-09-04 22:25:54 +03:00
962599e937 bug: fix removal of the packages
It has been broken since reporter improvements, because it effectivelly
1) didn't call remove functions in database
2) used empty repository identifier for web service

With those changes it also raises exception when you try to call id on
empty identifier
2024-09-04 21:50:33 +03:00
84942e3c98 refactor: fix some IDE warnings 2024-09-04 21:49:31 +03:00
300f5026c4 feat: add ability to suppress git hints
It can be done by setting options in command. The commit author/email is
also now using this logic
2024-08-23 14:33:07 +03:00
10aa91a033 feat: add blacklisted paths to implicit dependencies processing
It has been found that in some cases additional packages have been added
as dependencies, like usr/share/applications, usr/lib/cmake, etc

This commit adds an ability to blacklist specific paths from processing
2024-08-23 14:33:07 +03:00
4d9e06156d feat: add support of pam authentication
Add naive implementation of user password check by calling su command.
Also change some authentication method to require username to be string
instead of optional string
2024-08-20 16:44:40 +03:00
af2269c64a fix: print current and updated version correctly
The issue appears in case if versions ar the same (e.g. rebuild); in
this case printer doesn't increment version as builder does.

Also util has been renamed to utils, keeping backward compatibiltiy
2024-08-16 16:24:11 +03:00
f44fa19c42 feat: optimize archive reading
Instead of trying to load every database and look for files, this commit
introduces the optimization in which, the service loads packages first,
groups them by database and load files later.

In some cases it significantly descreases times for loading files
2024-08-14 17:07:10 +03:00
fd3c6343f1 fix: explicitly process list of packages
Small workaround to remove debug packages from being processed
2024-08-14 17:07:10 +03:00
434057ec49 feat: remove excess dependencies leaves (#128)
This mr improves implicit dependencies processing by reducing tree leaves by using the following algorithm:

* remove paths which belong to any base package
* remove packages which are (opt)dependencies of one of the package which provides same path. It also tries to handle circular dependencies by excluding them from being "satisfied"
* remove packages which are already satisfied by any children path
2024-08-14 17:07:10 +03:00
a01b090c2b feat: improve lock mechanisms
* improve lock mechanisms

* use /run/ahriman for sockett

* better water
2024-08-14 17:07:10 +03:00
8ffc1299f0 feat: implement local reporter mode (#126)
* implement local reporter mode

* simplify watcher class

* review changes

* do not update unknown status

* allow empty key patches via api

* fix some pylint warnings in tests
2024-08-14 17:07:10 +03:00
02b13de7f4 feat: allow to use simplified keys for context
Initial implementation requires explicit context key name to be set.
Though it is still useful sometimes (e.g. if there should be two
variables with the same type), in the most used scenarios internally
only type is required. This commit extends set and get methods to allow
to construct ContextKey from type directly

Also it breaks old keys, since - in order to reduce amount of possible
mistakes - internal classes uses this generation method
2024-08-14 17:07:10 +03:00
50a045434d feat: add abillity to check broken dependencies (#122)
* implement elf dynamic linking check

* load local database too in pacman wrapper
2024-08-14 17:07:10 +03:00
f8b725d175 fix: parse array variable from command 2024-05-09 13:21:42 +03:00
3cd9cff4ee refactor: update code to the latest python (3.12+) 2024-05-05 21:17:30 +03:00
9e02d7a38f fix: remove debug packages together with normal ones (#124) 2024-05-05 21:17:30 +03:00
99ca0cb2fd fix: update Repo.init to the latest pacman release 2024-04-04 13:16:05 +03:00
855b55237b feat: add ability to disable debug packages distribution
The feature is implemented as supplying !debug option to makepkg when
generating package list. In this case debug packages still will be
built, however, they will not be added to the repository
2024-04-04 13:14:17 +03:00
f68e48fb47 refactor: rename packages http methods to own package
docs: update docs import
2024-01-22 02:20:11 +02:00
91598951c5 fix: do not raise 404 in case of unknown package on patches endpoints
Previous improvements raise 404 error in case if no packages were found
for patches endpoints. However, in case of multirepo setup this feature
doesn't work properly because package can be located in any other
repository different from default
2024-01-08 14:32:40 +02:00
29bb6284b0 test: add pytlint imports plugin and fix errors 2024-01-05 19:52:51 +02:00
70b7fcf47a refactor: fix pylint warnings in tests 2024-01-05 16:40:38 +02:00
706808fc97 refactor: simplify lock processing in worker trigger 2024-01-05 16:11:32 +02:00
56e97040d6 feat: read username if email is not available for oauth provider
Also add recipe for OAuth with GitHub setup
2024-01-05 12:28:31 +02:00
6eeef39fe5 fix: safe urls for packages
String catenation used for url generators didn't encode package names
which could lead to missing data in case if e.g. there is slash (/) in
package name
2024-01-03 14:28:20 +02:00
0e6434faad refactor: remove custom access logger
It is fine when application is able to log request, however, normally it
produces a lot noise, which has been handled by adding special logger.
However, nowadays it requires a lot endpoints to be filtered and doesn't
provide any choice.

Instead of it lets disable access logger by default and let users decide
do they need or not to see access log messages
2024-01-03 12:18:50 +02:00
f1095fe007 feat: raise 404 in case if package is unknown for logs and patches 2024-01-03 12:09:10 +02:00
1af04448c9 feat: threadsafe services
In the most cases it was enough to just add lock. In case of worker
trigger, since there is atomic operation on timer, it was also required
to add queue (coz python doesn't have atomics)
2024-01-03 12:09:10 +02:00
aad607eaef feat: add workers autodicsovery feature (#121)
* add workers autodicsovery feature

* suppress erros while retrieving worker list

* update recipes

* fix tests and update docs

* filter health checks

* ping based workers
2024-01-03 02:25:24 +02:00
f3e9fbf9d0 refactor: fix warnings and typos, cleanup code 2023-12-28 16:53:45 +02:00
215fe7a592 test: add tests to check args list
Some parsers are shared between different subcommands. It causes errors
when wwe add new arguments to one of them. This commit adds some tests
to cover those cases (except for well-known differencies)
2023-12-27 15:01:07 +02:00
dd8d5d130b refactor: use AppKey's instead of string identifiers for web application 2023-12-27 13:53:23 +02:00
b4fa10781b feat: allow to run daemon mode with split packages check (#120) 2023-12-27 03:05:44 +02:00
f6cdd806b2 feat: add healh-check like endpoint, support of healthcheck in docker compose 2023-12-21 17:49:35 +02:00
1b93f4f5e0 fix: drop debug toolbar 2023-12-20 16:26:14 +02:00
a872ecfc23 docs: docs review 2023-12-20 10:00:12 +02:00
e784032bc6 feat: add ability to disable specific routes (#119) 2023-12-15 14:34:03 +02:00
c54b14b833 feat: add ability to run build process to remote instances (#118) 2023-12-13 15:38:51 +02:00
e61b246216 fix: correct url for update requests in remote-call trigger 2023-12-11 15:43:28 +02:00
2a9eab5f1a feat: changes screen implementation (#117)
Add support of changes generation. Changes will be generated (unless explicitly asked not to) automatically during check process (i.e. `repo-update --dry-run` and aliases) and uploaded to the remote server. Changes can be reviewed either by web interface or by special subcommands.

Changes will be automatically cleared during next successful build
2023-11-30 14:56:41 +02:00
acc204de6d fix: use event instead of chained timer for daemon
Old solution causes amount of thread to be growing as well as stack is
increased during each iteration. Instead of cycle-free implementation,
this commit just uses while cycle
2023-11-30 13:40:59 +02:00
0991dbb59c type: update to the typed aiohttp release 2023-11-23 15:35:38 +02:00