Tomas Kopecek
47210e44bf
hub: default policy allow packagelist changes with 'tag' permission
...
Fixes: https://pagure.io/koji/issue/2011
2020-06-16 11:04:14 +02:00
Tomas Kopecek
eb8d7f92a8
PR#2308: hub: return empty list in get_notification_recipients()
...
Merges #2308
https://pagure.io/koji/pull-request/2308
Fixes : #2307
https://pagure.io/koji/issue/2307
get_notification_recipients() can return None, leading to build_notification() crash
2020-06-16 09:58:40 +02:00
Ken Dreyer
4fb79b9e9f
hub: return empty list in get_notification_recipients()
...
If we find no recipients, return an empty list, rather than None.
This fixes a crash in build_notifications() where we expect to call
len() on the return value from get_notification_recipients().
Fixes: https://pagure.io/koji/issue/2307
2020-06-16 09:58:28 +02:00
Mike McLean
0b1482d924
disable notifications by default in [un]tagBuildBypass calls
...
Fixes https://pagure.io/koji/issue/2292
2020-06-11 14:42:38 -04:00
Tomas Kopecek
efecdad43a
hub: query_buildroots fix query behaviour
...
Fixes: https://pagure.io/koji/issue/2302
2020-06-10 11:06:32 +02:00
Tomas Kopecek
db41061111
hub: query_buildroots have to return ASAP
...
If candidate_buildroot_ids are pruned to zero in some point,
query_buildroots have to return. Otherwise big working queryset will be
created eating resources and returning empty list anyway.
Fixes: https://pagure.io/koji/issue/2298
2020-06-09 16:06:26 +02:00
Tomas Kopecek
5bc763ab2d
hub: log tracebacks for multicalls
...
Fixes: https://pagure.io/koji/issue/2204
2020-06-03 15:34:56 +02:00
Tomas Kopecek
ef43ba0b7b
replace deprecated function with logging
...
Relates: https://pagure.io/koji/issue/1440
warnings doesn't behave well with python 3.8 causing segfaults. Let's
user simple logging for a while.
2020-05-19 14:29:52 +02:00
Tomas Kopecek
404666d54c
hub: deprecate host.getTask call
...
Fixes: https://pagure.io/koji/issue/1440
2020-05-18 11:40:25 +02:00
Tomas Kopecek
3f109f610b
hub: API docs
...
Fixes: https://pagure.io/koji/issue/2108
2020-05-13 16:03:52 +02:00
Tomas Kopecek
64468b688e
hub: additional API docs
...
Fixes: https://pagure.io/koji/issue/2109
2020-05-13 16:03:10 +02:00
Carl George
7382eabe43
Correct docstring about deleting inheritance rules
...
The docstring for the setInheritanceData method states that a special
"remove link" key set to True will remove an inheritance rule. The
_writeInheritanceData function actually looks for a "delete link" key.
The commit updates the docstring to reflect reality.
2020-05-04 23:52:18 -05:00
Tomas Kopecek
9c7b4b91b1
don't traceback on missing user
2020-04-29 10:08:52 +02:00
Tomas Kopecek
913bc4026b
hub: admin can't force tag now
...
Fixes: https://pagure.io/koji/issue/2202
2020-04-29 10:08:52 +02:00
Ken Dreyer
0049e8604f
hub: document addExternalRepoToTag arguments
...
Describe the types of each argument to the addExternalRepoToTag() method.
2020-04-27 15:17:44 +02:00
Ken Dreyer
a14a21b2c2
hub: document createUser arguments
...
Describe the types of each argument to the createUser() method.
2020-04-23 17:33:51 -06:00
Tomas Kopecek
0132313f92
replace logging.warn with warning
...
call is deprected in python 3.7
Fixes: https://pagure.io/koji/issue/2135
2020-04-22 13:47:15 +02:00
Tomas Kopecek
4d4e569909
translate exceptions to GenericError
...
Fixes: https://pagure.io/koji/issue/2067
2020-04-22 10:37:14 +02:00
Ken Dreyer
3c7d8c8407
hub: document editUser method
...
Describe the types of each argument to the edit_user() method. Give some
example values for krb_principal_mappings.
2020-04-22 09:54:58 +02:00
Ken Dreyer
4c505be0fa
hub: document removeExternalRepoFromTag arguments
...
Describe the types of each argument to the removeExternalRepoFromTag()
method.
2020-04-22 09:42:32 +02:00
Ken Dreyer
5d86ecacf5
hub: document getTagExternalRepos
...
Describe the types of each argument to the getTagExternalRepos() method.
2020-04-22 09:42:00 +02:00
Yuming Zhu
293cc87325
hub: assert_policy - use hasPerm instead of assertPerm
...
fixes : #1930
2020-04-15 11:53:01 +02:00
Tomas Kopecek
7970e78092
drop "keys" field
2020-04-07 12:27:56 +02:00
Tomas Kopecek
9ef57c0f82
new policy for dist-repo
...
Fixes: https://pagure.io/koji/issue/1660
2020-04-07 12:27:56 +02:00
Ken Dreyer
beb7efc0e3
hub: document deleteExternalRepo arguments
...
Describe the type of the "info" argument to the delete_external_repo(),
and explain the GenericError when the repository does not exist.
2020-04-06 09:28:04 +02:00
Ken Dreyer
9247422258
hub: document getExternalRepo arguments
...
Describe the types of each argument to the get_external_repo() method.
2020-04-06 09:27:09 +02:00
Mike McLean
ab2445f1fa
fix sanity check in merge_scratch
...
Fixes https://pagure.io/koji/issue/2126
Follow up to #2058
https://pagure.io/koji/pull-request/2058
2020-04-06 09:07:23 +02:00
Tomas Kopecek
e8ba56349e
add refusal reason to log
2020-04-01 12:55:38 +02:00
Tomas Kopecek
f55c9e4d25
move admin force usage to assert_policy
...
Fixes: https://pagure.io/koji/issue/1930
2020-04-01 12:55:38 +02:00
Tomas Kopecek
357096bdf8
add param parsing also to base task
2020-03-30 09:23:07 +02:00
Tomas Kopecek
8529a1baa3
use library functions
...
Fixes: https://pagure.io/koji/issue/1903
2020-03-30 09:15:45 +02:00
Thomas Oulevey
076d54c029
Compare SCM URLs only if build from an SCM
...
This patch allow to merge source rpm not only build for SCMs.
2020-03-30 09:15:45 +02:00
Tomas Kopecek
01d8aaf3bb
use same set operators
2020-03-26 15:00:50 +01:00
Tomas Kopecek
f76f787fc1
move inner join before outer joins
2020-03-26 15:00:50 +01:00
Tomas Kopecek
7ebaf1dd42
Limit final query by prechecking buildroot ids
...
Fixes: https://pagure.io/koji/issue/1562
2020-03-26 15:00:50 +01:00
Tomas Kopecek
eae8df718f
check krb_principal before it is rewritten
2020-03-25 13:51:36 +01:00
Tomas Kopecek
226f9d8fbe
query on krb only if it is requested
2020-03-25 13:51:36 +01:00
Tomas Kopecek
360e0287a9
fix get_user params
2020-03-25 13:51:36 +01:00
Tomas Kopecek
5eafede60b
add-host work even if host already tried to log in
...
Fixes: https://pagure.io/koji/issue/1874
2020-03-25 13:51:36 +01:00
Yuming Zhu
944d105571
hub: editTagExternalRepo is able to set merge_mode
...
fixes : #1857
2020-03-25 13:39:30 +01:00
Mike McLean
0d79e839ba
propagate event to get_tag_extra
...
fixes https://pagure.io/koji/issue/2087
2020-03-25 09:19:18 +01:00
Tomas Kopecek
1638fc6d0f
fix logging package name
2020-03-24 10:57:29 +01:00
Tomas Kopecek
ccb7a15010
log --force usage by admins
...
Log everything related to package listing and build tagging done by
admin users via --force flag.
Fixes: https://pagure.io/koji/issue/1930
2020-03-24 10:57:29 +01:00
Tomas Kopecek
55307406d3
raise error on non-existing tag
...
Fixes: https://pagure.io/koji/issue/1101
2020-03-11 13:53:59 +01:00
Tomas Kopecek
1f391a7edc
raise GenericError on non-existing API call
...
count, filterResults and countAndFilterResults now raises GenericError
if unknown API call is made
Fixes: https://pagure.io/koji/issue/1421
2020-03-05 16:27:32 +01:00
Tomas Kopecek
1919ce80de
raise GenericError instead of TypeError in filterResults
...
Fixes: https://pagure.io/koji/issue/1421
2020-03-05 16:23:02 +01:00
Yu Ming Zhu
853953b625
CG: add and update buildinfo.extra.typeinfo if it doesn't exist
...
fixes : #2008
2020-03-05 15:17:54 +01:00
Yuming Zhu
fa613108a5
build_references: fix the type of event_id used by max
...
fixes : #1961
2020-03-04 16:58:29 +08: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