Tomas Kopecek
c13bcecbc7
fix error message
2020-07-01 14:01:01 +02:00
Ken Dreyer
c1511ae182
hub: remove "GssapiLocalName off" setting
...
mod_auth_gssapi already defaults "GssapiLocalName" to "off". Simplify
our configuration and just remove this line.
2020-07-01 11:40:29 +02:00
Tomas Kopecek
dd4f39208e
fix option order
...
Related: https://pagure.io/koji/issue/2086
2020-06-30 14:51:23 +02:00
Tomas Kopecek
03b55bf39e
hub: allow glob matching for listTags
...
server-side filtering would be better than CLI/client side filtering.
Fixes: https://pagure.io/koji/issue/2086
2020-06-30 14:20:32 +02:00
Tomas Kopecek
76cf735aed
hub: fix typo
...
Fixes: https://pagure.io/koji/issue/1969
2020-06-24 15:10:35 +02:00
Ken Dreyer
9014fac420
hub: remove "GssapiSSLonly Off" option
...
mod_auth_gssapi already defaults "GssapiSSLonly" to "off", and in fact
this is not something we want to recommend to users.
2020-06-24 14:48:51 +02:00
Yu Ming Zhu
1be2064df1
fix flake8 for kojihub.py
2020-06-24 14:42:01 +02:00
Yuming Zhu
65f5b6489b
fix param name for uploadFile
2020-06-24 14:42:01 +02:00
Tomas Kopecek
50bcb6f3bc
replace md5 with sha256
2020-06-24 14:42:01 +02:00
Yu Ming Zhu
a893e8bf2b
a wrapper ignoring FIPS for hashlib.md5
2020-06-24 14:42:00 +02:00
Tomas Kopecek
ba02c1b977
improve race condition for getNextRelease / images
...
Fixes: https://pagure.io/koji/issue/2138
2020-06-24 13:36:23 +02:00
Mike McLean
b2dd73fa03
avoid redundant clauses and joins
...
Fixes https://pagure.io/koji/issue/2300
2020-06-24 10:40:36 +02:00
Ken Dreyer
993be46a4c
hub: document listChannels arguments
...
Describe the arguments and return value for the listChannels() method.
2020-06-23 12:24:04 +02:00
Tomas Kopecek
af311184fc
dropping six from hub/web
2020-06-18 15:41:35 +02:00
Ken Dreyer
d7d745295a
hub: simplify recipients condition in build_notification()
...
If get_notification_recipients() returns a non-empty list of recipients,
then the build_notification() method creates a new buildNotification task.
Simplify the conditional that checks the get_notification_recipients()
return value so that it is easier to read. Python treats an empty list
as False and a non-empty list as True, so we don't need to explicitly
test the list length here.
The purpose of this change is to make this code easier to read and
understand.
2020-06-18 15:22:44 +02:00
Ken Dreyer
4e9a1590f3
hub: fix "opt-outs" comment in get_notification_recipients()
...
Fix a typo in the comment that describes the block of code that
assembles the set of opt-outs.
2020-06-16 12:31:36 +02:00
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