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
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
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
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
Tomas Kopecek
44c89e3516
DBConnectionString/dsn option for db connection
...
Alternative DSN connection string fro connecting to postgres. Allow us
to specify e.g. sslmode without adding separate DB* options.
Fixes: https://pagure.io/koji/issue/2838
2021-07-20 11:49:06 +02:00
Jana Cupova
ee44d136e9
Read config options from main hub config and hub config dir
...
Fixes: https://pagure.io/koji/issue/2839
2021-06-08 15:49:48 +02:00
Tomas Kopecek
e711e7dbe5
utils in py3
2020-10-06 15:00:23 +02:00
Tomas Kopecek
02a630ec3a
fix table name
...
Fixes: https://pagure.io/koji/issue/2055
2020-03-26 14:25:46 +01:00
Yuming Zhu
cf34706f04
use Exception instead of BaseException for bare expection
2020-03-03 21:38:22 +08:00
Yuming Zhu
c5db34a8e1
flake8: apply E501 with max-line-length=99
2020-03-03 21:38:22 +08:00
Yuming Zhu
f1ba6cefd7
flake8: apply all rest E7 rules
2020-03-03 21:38:22 +08:00
Yuming Zhu
0f727a2ab4
flake8: apply E3 rules
2020-03-03 21:38:22 +08:00
Yuming Zhu
450f9249cd
flake8: apply E265 for util/koji-*
2020-03-03 21:35:08 +08:00
Tomas Kopecek
4e404fcc7c
analyze/vacuum all affected tables
...
Fixes: https://pagure.io/koji/issue/1941
2020-02-04 10:30:17 +01:00
Tomas Kopecek
b09fd01677
additional options to clean database
...
Fixes: https://pagure.io/koji/issue/1707
2019-12-19 13:55:06 +01:00
Yu Ming Zhu
a00df18546
sort imports in util
2019-12-12 11:00:55 +00:00
Jim Foraker
a668aaccd8
koji-sweep-db: Turn on autocommit to eliminate VACUUMing errors
...
psycopg2 leaves transactions open by default, which causes VACUUM to
fail. Turning on autocommit disables this behavior.
2019-11-27 16:15:35 +01:00
Tomas Kopecek
6d72bba3fd
fix typo in table column name
...
Fixes: https://pagure.io/koji/issue/1759
2019-11-05 16:42:07 -05:00
Tomas Kopecek
ba54425854
clean build_reservations table
2019-10-15 09:00:22 +02:00
Tomas Kopecek
54d6630345
Add vaccum to sessions cleanup
2019-10-15 09:00:22 +02:00
Tomas Kopecek
f68eeb6cc0
bundle db maintenance script to hub
...
Fixes: https://pagure.io/koji/issue/1478
2019-10-15 09:00:22 +02:00