Mike McLean
895d0cf8ec
avoid double fork in kojira rmtree
2024-04-10 11:20:15 +02:00
Yu Ming Zhu
f41b8c70a7
Bandit [B411]: use defusedxml to prevent remote XML attacks
...
- putting xmlrpc stuff into koji.xmlrpcplus
- adding koji.xmlrpcplus.xmlrpc_server to refer
- replacing refs of original xmlrpc.client.dumps to enhanced
koji.xmlrpcplus.dumps
fixes : #3964
2024-02-02 09:08:18 +01:00
Mike McLean
e10a79493b
handle new task refs in clean_scratch_tasks
2024-01-22 09:22:21 +01:00
Tomas Kopecek
bd45f7976a
unify clauses handling
2023-10-03 15:23:02 +02:00
Tomas Kopecek
baa432303f
remove typo
2023-10-03 15:23:02 +02:00
Tomas Kopecek
08a822dddf
delete old scheduler log messages
2023-10-03 15:23:02 +02:00
Mike McLean
2360e6f9a2
typo
2023-05-23 17:54:17 +02:00
Mike McLean
b5950bb209
kojira no_repo_effective_age setting
2023-05-23 17:54:17 +02:00
Mike McLean
f112e96f97
flake8
2023-04-25 10:49:20 -04:00
Mike McLean
f58e6ad92b
bugfixes and additional debug logging
2023-04-25 10:42:54 -04:00
Tomas Kopecek
b1acd55d84
error handling
2023-04-25 10:42:54 -04:00
Tomas Kopecek
1c7e9a1a99
kojira: prioritize awaited repos
...
Related: https://pagure.io/koji/issue/3757
2023-04-25 10:42:54 -04:00
Tomas Kopecek
aa8a3f634a
koji-gc: fail on additional arguments
...
Related: https://pagure.io/koji/issue/3685
2023-03-09 11:33:34 +01:00
Jana Cupova
e2e0914eb9
Set daemon = true instead of call deaprecated setDaemon
...
Fixes: https://pagure.io/koji/issue/3698
2023-03-03 09:36:25 +01:00
Tomas Kopecek
b0e91e378c
Move db/auth to kojihub module
...
Related: https://pagure.io/koji/issue/3666
2023-03-01 11:46:24 +01:00
Jana Cupova
78dee69de4
Create DeleteProcessor class and use it
...
Fixes: https://pagure.io/koji/issue/3580
2022-12-08 09:18:55 +01:00
Tomas Kopecek
752c76ab7d
fix flake8
2022-12-07 15:35:00 +01:00
Mike McLean
4899aba292
koji-gc: clean up handle_delete() a bit
2022-12-07 15:30:18 +01:00
Mike McLean
3c0fc0b4b1
koji-gc: use history to query trashcan contents
...
as a side effect, we get the hub to apply our grace period for us
2022-12-07 15:30:18 +01:00
Jana Cupova
5836307056
Add absolute to clean sessions in koji-sweep-db
...
Fixes: https://pagure.io/koji/issue/3571
2022-11-08 13:26:43 +01:00
Jana Cupova
26f2a4d889
koji-gc: fix check for type cc_addr, bcc_addr
...
Fixes: https://pagure.io/koji/issue/3572
2022-11-07 11:35:54 +01:00
Jana Cupova
1909602687
Fix koji-sweep-db
...
Fixes: https://pagure.io/koji/issue/3466
2022-11-02 13:35:52 +01:00
Jana Cupova
3999667a8c
Fix Makefile for RHEL7
2022-10-11 14:29:05 +02:00
Tomas Kopecek
92a773a19d
fix koji-sweep-db
2022-10-11 14:29:05 +02:00
Jana Cupova
1cfe6538db
Move database classes and functions from kojihub.py to koji/db.py
...
Move QueryProcessor, InsertProcessor, UpdateProcessor,
BulkInsertProcessor, _applyQueryOpts, get_event, _dml,
_fetchMulti, _fetchSingle, _singleValue, _multiRow, _singleRow
Update koji-sweep-db script to DB Processors
Fixes: https://pagure.io/koji/issue/3466
2022-10-11 14:29:05 +02:00
Alex Iribarren
8113448282
Catch koji.AuthError and bail out
2022-08-17 10:49:41 +02:00
Tomas Kopecek
5b8465a0e8
Revert "PR#3276: Use PrivateTmp for kojid/kojira"
...
This reverts commit 1728c07f03 , reversing
changes made to a7179d7edb .
2022-05-19 13:47:22 +02:00
Tomas Kopecek
2d132aebc2
missing option action
2022-05-18 14:56:27 +02:00
Tomas Kopecek
93f0f91f97
koji-sidetag-cleanup: delete inactive tags
...
Sidetags which don't have any activity (un/tagging builds) are not worth
of existence. They just trigger unnecessary repo regenerations. It
should be safe to delete them e.g. after one month. It is an additional
check compared to --old-delay and --empty-delay. These can hit the
middle ground between these two limits (empty shortest, inactive middle,
old longest).
Related: https://pagure.io/koji/issue/3293
2022-05-18 14:55:23 +02:00
Tomas Kopecek
2af7e756dd
fix mode
2022-05-16 10:54:03 +02:00
Pat Riehecky
10cf1e494e
Weak ordering on httpd.service for kojid/ra
...
If you're running `kojid` or `kojira` on the same
host as as the koji-hub, it is helpful to have
these startup after the `httpd.service` has loaded.
2022-05-13 14:26:47 +02:00
Jana Cupova
9bfefe782e
Hub, plugins and tools inputs validation
...
Fixes: https://pagure.io/koji/issue/3319
2022-05-02 06:55:44 +02:00
Pat Riehecky
b16e271c46
Use PrivateTmp for kojid/kojira
2022-04-26 13:05:29 +02:00
Tomas Kopecek
9d568cb828
kojira: don't call listTags more than once
...
Fixes: https://pagure.io/koji/issue/3258
2022-03-28 13:46:37 +02:00
Tomas Kopecek
6b64222ab7
kojira: don't fail on deleted items
...
py2 relict - dict.values() is now iterator, so
RuntimeError: dictionary changed size during iteration
can be raised when needed repo was deleted during the iteration.
Simple fix to use copy instead of iterator will fix this.
2021-12-15 15:23:56 +01:00
Mike McLean
5b32d76865
rework a bit
2021-11-15 09:07:01 +01:00
Mike McLean
623131c96f
we should still track repos that the hub tells us about
2021-11-15 09:07:01 +01:00
Joe Simmons-Talbott
a58ce6bb38
Fix for case where 'info' is None.
2021-11-15 09:07:01 +01:00
Joe Simmons-Talbott
61645c6cd9
kojira: make 'ignore_other_volumes' a config only option.
...
* pull 'DEFAULT' repo handling out of the loop.
* Add 'ignore_other_volumes' to kojira.conf
2021-11-15 09:07:01 +01:00
Joe Talbott
b5bf4f9a3f
Prevent kojira from attempting to remove repos on other volumes.
...
* Adds '--ignore-other-volumes' flag and configuration option.
2021-11-15 09:07:01 +01:00
Jana Cupova
2118a24e7a
Kojira throw exception when auth failed
...
Fixes: https://pagure.io/koji/issue/2852
2021-11-07 11:06:27 +00:00
Jana Cupova
32b5377392
Remove translation stub functions
...
Fixes: https://pagure.io/koji/issue/3072
2021-10-21 13:25:16 +02:00
Vasil Velichkov
c21f102114
Restart kojid and kojira services automatically
...
Wait 60sec before restarting the service
2021-10-20 16:14:20 +02:00
Tomas Kopecek
a3ea37b173
remove unused imports
2021-10-20 15:20:14 +02:00
Tomas Kopecek
3ec6e87d5b
replace urlopen with requests.get
2021-10-20 15:20:14 +02:00
Tomas Kopecek
ba2e1e520b
basic security checks with bandit
...
Fixes: https://pagure.io/koji/issue/3042
2021-10-20 15:20:14 +02:00
Tomas Kopecek
dfce69f6bf
PR#2958: DBConnectionString/dsn option for db connection
...
Merges #2958
https://pagure.io/koji/pull-request/2958
Fixes : #2838
https://pagure.io/koji/issue/2838
Option for using SSL is missing, when the pgsql server is an network one.
2021-08-06 09:57:05 +02:00
Tomas Kopecek
79b7eb36f2
add debug message
2021-08-06 09:50:51 +02:00
Igor Raits
c972415dec
kojira: Do not ever clean up repositories where 'latest' points to
...
We don't want to leave symlink broken… Ideally we would find out stuff
where we should even remove "latest" but it is not straightforward and I
believe this simple check is good enough for the time being.
Fixes: https://pagure.io/koji/issue/2832
Signed-off-by: Igor Raits <igor.raits@gmail.com>
2021-08-03 14:56:52 +02:00
Tomas Kopecek
a5f4bd736e
fix flake8 line length
2021-07-21 09:52:29 +02:00