Mike McLean
8a472ed94e
allow setting ttl in protonmsg
2025-04-29 16:17:20 +02:00
Yuming Zhu
87409499a3
draft builds
2024-01-05 10:00:29 +00:00
Tomas Kopecek
0a48d6a688
fix flake8
...
Related: https://pagure.io/koji/issue/3790
2023-05-17 11:02:32 +02:00
Mike McLean
4913bd0c0a
use db_lock in protonmsg
2023-05-17 11:02:08 +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
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
1ca5db555a
proton: save messages when connection fails
...
Fixes: https://pagure.io/koji/issue/3327
2022-07-26 11:43:30 +02:00
Jana Cupova
ff500a2c4e
Age in protonmsg config file is deprecated
...
Fixes: https://pagure.io/koji/issue/3332
2022-05-09 13:59:10 +02:00
Tomas Kopecek
6aaa6b3248
rename option
2022-02-07 10:07:26 +01:00
Tomas Kopecek
e7db7d8b53
db: logging option for cursor
...
In some cases we expect query to fail (LOCK NOWAIT) but it still
clutters the logs. Option for not logging cursor-level errors.
Fixes: https://pagure.io/koji/issue/2837
2022-02-07 10:01:21 +01:00
Ken Dreyer
dbacf1f985
protonmsg: allow users to specify router-specific topic prefixes
...
Prior to this change, Koji would always send messages with a hard-coded
topic:// prefix.
This works fine for ActiveMQ 5 and Artemis, but RabbitMQ does not
support that syntax. Instead, RabbitMQ brokers expect clients to use
topic addresses with a "/topic/" prefix.
The RFE for RabbitMQ to support "topic://" prefixes is
https://github.com/rabbitmq/rabbitmq-server/issues/2583
In the meantime, allow users to specify "topic://" or "/topic/"
explicitly in their configuration.
For backwards-compatibility, if the user chose neither "topic://" nor
"/topic/", prepend the "topic://" string, preserving the plugin's
existing behavior.
(Note: ActiveMQ 5 advertises its expected topic:// prefix in the initial
connection properties, so we could read that value dynamically, but
RabbitMQ and Artemis do not send an expected topic prefix connection
properties, so we just make the user choose explicitly here.)
2021-12-20 08:44:27 +01:00
Tomas Kopecek
0e2ebb4e25
Revert "PR#2944: decode protonmsg props field when loading from db"
...
This reverts commit 34d1c8eb9e , reversing
changes made to fdccd38148 .
Proper solution was part of https://pagure.io/koji/pull-request/2955 , so
this merge was a mistake. Reverting.
2021-10-20 13:00:04 +02:00
Mike McLean
b4b83c8251
decode protonmsg props field when loading from db
2021-10-19 13:11:20 +02:00
Tomas Kopecek
c41559f1e9
move btypes from headers to body of proton message
...
Fixes: https://pagure.io/koji/issue/3017
2021-09-14 09:28:21 +02:00
Yu Ming Zhu
243e114b1f
protonmsg: cast body to text
2021-08-06 09:48:47 +02:00
Jana Cupova
e689602be5
Add btype to protonmsg
...
Fixes: https://pagure.io/koji/issue/1217
2021-07-20 10:36:53 +02:00
Mike McLean
5045f96bb4
protonmsg: actually remove messages from db queue
...
Fixes: https://pagure.io/koji/issue/2846
2021-05-10 09:51:03 +02:00
Mike McLean
bd00cddc2b
protonmsg: drop bad key reference
...
This is a relic of an earlier version of the db work.
At this point in the code, there is never an id field.
We don't re-store messages from the db. We only delete them
after confirmed send.
2021-05-10 09:51:03 +02:00
Mike McLean
158232ab81
protonmsg: avoid calling _send_msgs on empty list
2021-05-10 09:51:03 +02:00
Mike McLean
1c633dd37b
protonmsg: use consistent type for messages
...
Previously messages were represented as either tuples or
dictionaries. Now they are always dictionaries.
Fixes: https://pagure.io/koji/issue/2841
2021-05-10 09:51:03 +02:00
Jana Cupova
fa774f0a9b
Add default task ID to prep_repo_init/done
...
Fixes: https://pagure.io/koji/issue/888
2021-04-28 13:33:22 +02:00
Jana Cupova
6a2c6e7586
Repo info with task id
...
Fixes: https://pagure.io/koji/issue/888
2021-04-19 15:15:10 +02:00
Mike McLean
4ddc48e72a
avoid message re-insertion, extend test mode, schema and docs updates
...
include new table in main schema, since this plugin is part of Koji itself
clean up and expand the docs for this plugin
refactor query_from_db() into handle_db_msgs()
* fix lock error cases
* only delete messages from queue if we successfully send them
* handle test_mode
allow test_mode to exercise db queue via test_mode_fail setting
2020-09-30 10:14:49 +02:00
Tomas Kopecek
aff74c4b3a
proton: handling of lock failure
2020-09-30 10:14:49 +02:00
Tomas Kopecek
99c21690c2
delete too old messages
2020-09-30 10:14:49 +02:00
Tomas Kopecek
8c253396e8
proton: persistent message queue
...
Fixes: https://pagure.io/koji/issue/2230
2020-09-30 10:14:49 +02:00
Tomas Kopecek
0457065312
proton: short-circuit extra_limit = 0
...
Fixes: https://pagure.io/koji/issue/2455
2020-09-01 15:09:49 +02:00
Tomas Kopecek
af311184fc
dropping six from hub/web
2020-06-18 15:41:35 +02:00
Tomas Kopecek
475bf17f05
fix tests
2020-03-30 15:10:30 +02:00
Tomas Kopecek
f039220a9c
better logging in protonmsg
...
Related: https://pagure.io/koji/issue/2017
2020-03-30 15:10:30 +02:00
Tomas Kopecek
dd9c929729
use correct json dump
...
Related: https://pagure.io/koji/issue/2017
2020-03-30 15:10:30 +02:00
Tomas Kopecek
52236bab4b
use buildinfo copy
2020-03-25 09:07:15 +01:00
Tomas Kopecek
d1e055f1b2
limit size of extra field in proton msgs
...
Fixes: https://pagure.io/koji/issue/2017
2020-03-25 09:07:15 +01:00
Yuming Zhu
0f727a2ab4
flake8: apply E3 rules
2020-03-03 21:38:22 +08:00
Tomas Kopecek
e016e6624d
Emit user in PackageListChange messages
...
Fixes: https://pagure.io/koji/issue/1035
2020-02-04 09:22:43 +01:00
Yu Ming Zhu
90cc76573f
sort imports in plugins
2019-12-12 11:00:56 +00:00
Yuming Zhu
b2b8d5f9cc
strict per item in config_files
2019-10-15 09:14:16 +02:00
Yu Ming Zhu
4c1928f377
extract read_config_files util for config parsing
2019-10-15 09:14:16 +02:00
Yu Ming Zhu
dc208d0555
fix invokings and unittests
2019-02-17 21:26:13 -05:00
Yu Ming Zhu
9ddae41877
using ConfigParser.read_file for PY3
2019-02-17 21:26:13 -05:00
Tomas Kopecek
17db100db5
few sort speedups
...
Fixes: https://pagure.io/koji/issue/963
2018-12-04 00:05:26 -05:00
Tomas Kopecek
be535c2854
python-modernize -f libmodernize.fixes.fix_imports_six
2018-07-11 17:37:39 -04:00
Tomas Kopecek
7f6b717eb6
python-modernize -f libmodernize.fixes.fix_import
2018-07-11 17:37:39 -04:00
Tomas Kopecek
5712c8efb6
Don't raise error on unserializable data
2018-03-21 15:08:26 -04:00
Tomas Kopecek
3bfcc6a66e
json serialize additional types in protonmsg
...
Fixes: https://pagure.io/koji/issue/741
2018-03-21 15:08:26 -04:00
Mike Bonnet
661dd3a70c
protonmsg: include the arch in the headers of rpm sign messages
...
Including the arch in the headers may be useful for filtering.
2017-10-25 12:01:08 -04:00
Mike Bonnet
c6a1e0952a
protonmsg: don't send rpm.sign messages when the sigkey is empty
...
When a build completes, we store the original, unsigned rpm headers
to disk. This results in the postRPMSign callback being called, and
a rpm.sign message being sent with an empty sigkey. The intended
sematics of the rpm.sign message is to notify a service when an rpm
has been signed. Therefore, we should not be sending a message when
the sigkey is empty.
2017-10-24 21:20:24 -04:00
Mike McLean
bce4e28ed8
protonmsg plugin: test mode
2017-08-25 00:10:10 -04:00
Mike McLean
1df193ea2b
use datetime compatibility for messagebug and protonmsg plugins
2017-08-07 12:41:40 -04:00