Commit graph

1251 commits

Author SHA1 Message Date
Tomas Kopecek
d231fa02cb to_list is not needed in py3 code
Fixes: https://pagure.io/koji/issue/2514
2020-10-27 12:55:59 +01:00
Tomas Kopecek
f1b6cdc401 doc: api docs
Fixes: https://pagure.io/koji/issue/2110
2020-10-23 09:06:23 +02:00
Tomas Kopecek
309c4e0a62 builder: fix error logging to accept more types 2020-10-21 17:03:05 +02:00
Tomas Kopecek
fedf3ee9f9 extend to config_inheritance 2020-10-05 12:35:07 +02:00
Tomas Kopecek
172c861442 hub: getBuildConfig - return inheritance info 2020-10-05 12:34:57 +02:00
Tomas Kopecek
5f472413c9 drop host versions 2020-09-30 10:43:19 +02:00
Tomas Kopecek
ba908fd2de report versions of components
Fixes: https://pagure.io/koji/issue/2430
2020-09-30 10:43:19 +02:00
Tomas Kopecek
08494de774 block inherited extra tag info
Fixes: https://pagure.io/koji/issue/2283
2020-09-28 11:03:43 +02:00
Michal Privoznik
0ef3c75185 Simplify obtaining of PKGDIR
So far, in all Makefiles we have a complicated way to construct
PKGDIR path which is used to install python modules into.
Firstly, python version is obtained, and then system prefix and
these are then used to construct the PKGDIR path. Well, we can do
better. We can use 'site.getsitepackages()[0]' to obtain exactly
the path we are after.

This also fixes the problem on distributions which have split
/usr/lib and /usr/lib64 directories, because with the way we are
constructing the PKGDIR path we assume that the directories are
the same (or one is a symlink to another). Well, that is not
always the case.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2020-09-22 13:45:48 +02:00
Tomas Kopecek
59b97d56f1 hub: deleteBuild should skip deleted builds
We can return ASAP from the call if build is already deleted.

Fixes: https://pagure.io/koji/issue/2475
2020-09-10 13:24:02 +02:00
Tomas Kopecek
e72a7be0a1 stricter config file permissions
Fixes: https://pagure.io/koji/issue/2124
2020-09-07 09:37:11 +02:00
Tomas Kopecek
0eec5acd34 lowercase sigkeys during import/query where needed
Fixes: https://pagure.io/koji/issue/2434
2020-09-01 14:06:06 +02:00
Yu Ming Zhu
1b9cd6a95e hub: [multicall] cast args of exception to str
fixes: #2381
2020-09-01 11:23:04 +02:00
Tomas Kopecek
7cd78cb54b hub: deprecate getGlobalInheritance
with final removal in 1.25

Fixes: https://pagure.io/koji/issue/2240
2020-08-27 13:38:37 +02:00
Tomas Kopecek
45224e5b52 hint psql planner to do proper index scan
Fixes: https://pagure.io/koji/issue/2383
2020-08-25 14:49:28 +02:00
Tomas Kopecek
90578ddc9e hub: tagChangedSince reacts on changes in extra
Fixes: https://pagure.io/koji/issue/2284
2020-08-19 16:47:19 +02:00
Tomas Kopecek
c7a0d26123 Remove host.getTask API call
Fixes: https://pagure.io/koji/issue/2231
2020-08-18 16:32:51 +02:00
Tomas Kopecek
bcdf0165c9 remove deprecated list-tag-history / tagHistory
Fixes: https://pagure.io/koji/issue/2215
2020-08-18 16:31:21 +02:00
Christopher O'Brien
22fcdc1ad2 allow getRPMHeaders to get all headers if none are explicitly requested 2020-08-18 16:28:01 +02:00
Tomas Kopecek
00382aeb90 make age optional 2020-08-18 15:55:19 +02:00
Tomas Kopecek
a753d28064 hub: getAverageBuildDuration sliding window
Fixes: https://pagure.io/koji/issue/2420
2020-08-18 15:55:19 +02:00
Mike McLean
71a891f428 ensure that cursors are closed in QueryProcessor.iterate()
By using try..finally here, we ensure the cursor cleanup is performed
even if the generator is not exhausted before being garbage collected.

Fixes https://pagure.io/koji/issue/2435
2020-08-12 11:34:43 -04:00
Mike McLean
4e46be954e editTag: make compat perm_id option an alias for perm
Fixes https://pagure.io/koji/issue/2375
2020-07-29 15:47:02 +02:00
Ken Dreyer
07bc3a82d6 hub: document listBType return value when query matches no entries
When a user calls listBType with a query parameter and that query
matches no existing btypes, the listBType method returns an empty list.
Add this information to the listBType docstring.
2020-07-23 10:16:01 +02:00
Tomas Kopecek
a8bee1511f hub: importImage doesn't honor volume
We're not sending updated build_info to the method and it is requesting
data from db. There is not volume saved yet.

Change is reusing modified buildinfo.

Fixes: https://pagure.io/koji/issue/2355
2020-07-15 12:06:55 -04:00
Yu Ming Zhu
f68f277ee6 hub: make sure checksum_type is int for DB
fixes: #2368
2020-07-13 06:16:24 +00:00
Mike McLean
1305fe8cf2 also consider task data in apply_volume_policy() 2020-07-02 16:54:22 +02:00
Mike McLean
da8fe93755 policy_get_build_tags: use target data if available
Fixes https://pagure.io/koji/issue/2305
2020-07-02 16:54:22 +02:00
Mike McLean
c90a6ced65 fix handling of indirectionimage in policy_data_from_task_args() 2020-07-02 16:54:22 +02:00
Mike McLean
e1a53b971a use policy_data_from_task in complete*Build calls 2020-07-02 16:54:22 +02:00
Mike McLean
9a90a3edf5 split off "policy data from task" logic 2020-07-02 16:54:22 +02:00
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