Commit graph

877 commits

Author SHA1 Message Date
Tomas Kopecek
2eff45f763 Drop pre-2.6 compat function koji.util._relpath
Fixes: https://pagure.io/koji/issue/818
2018-03-08 10:23:44 -05:00
Mike McLean
42b3d596ea update listBuilds docstring 2018-03-06 12:26:43 -05:00
Tomas Kopecek
f468aeb19a extend listBuilds for search by source
Fixes: https://pagure.io/koji/issue/701
2018-03-06 12:26:43 -05:00
Franz Chih-Ping Hsieh
ac88d5aa91 avoid using backslash and fix typo issue. 2018-03-01 16:01:47 -05:00
Franz Chih-Ping Hsieh
47c85e8833 Use function.cmp_to_key to wrap cmp function only in Python3 2018-03-01 16:01:47 -05:00
Franz Hsieh
2c04c4f960 replace cmp keyword parameter with key in sorted() for python3 support
related: #713
https://pagure.io/koji/issue/713
2018-03-01 16:01:47 -05:00
Yuming Zhu
35dd4c942b hub: make list_archives to accept strict argument
fixes: #721
2018-03-01 10:30:27 -05:00
Yuming Zhu
77af6d6688 hub: fix KeyError in get_notification_recipients 2018-02-28 08:07:17 -05:00
Mikolaj Izdebski
276d519ef8 Fix AttributeError during archive import
Fixes #811

Signed-off-by: Mikolaj Izdebski <mizdebsk@redhat.com>
2018-02-20 10:34:38 -05:00
Patrick Uiterwijk
0c4f702bc7 Fix comparison with Enum value
The CHECKSUM_TYPES[...] call returns the index in the Enum field, not a string,
which meant that the comparison would never work.

Reported-by: Clement Verna <cverna@tutanota.com>
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2018-02-20 10:25:44 -05:00
Tomas Kopecek
d58989d777 tests for notifications 2018-02-20 09:39:27 -05:00
Tomas Kopecek
ad62cce51e create/edit notification checks for duplicity
createNotification and updateNotification allows to have more
notification on same event/e-mail. This doesn't make much sense, so add
limitations to have only one combination.

As postgresql ignore NULL values in constraints, it is done on
application-level.

Fixes: https://pagure.io/koji/issue/687
2018-02-20 09:39:27 -05:00
Tomas Kopecek
715330ab6e update docs for listRPMFile
Fixes: https://pagure.io/koji/issue/752
2018-02-19 12:05:16 -05:00
Mike McLean
2c76b3970e use a savepoint 2018-02-13 13:42:31 -05:00
Mike McLean
12a993a2cf recheck for duplicate external rpm on insertion errors
fixes: https://pagure.io/koji/issue/788
2018-02-13 13:42:31 -05:00
Tomas Kopecek
7d8b31232e don't join users table if countOnly
Improves performance

Fixes: https://pagure.io/koji/issue/782
2018-02-06 11:27:01 +01:00
Tomas Kopecek
b852381a3a remove simplejson imports
Fixes: https://pagure.io/koji/issue/727
2017-12-20 12:42:31 -05:00
Tomas Kopecek
aecd3022e9 incorrect py3 syntax 2017-12-19 12:30:22 -05:00
Tomas Kopecek
fb48f62c4d drop migrateImage call
The migrateImage call allows migrating pre-1.8 image builds from the old
model (no build entry) to the new model (image build type). This call
was added in 1.8 (4.5 years ago) as a one-time tool for migration.  It
is only available if the EnableImageMigration is set on the hub.

See also: https://docs.pagure.org/koji/migrating_to_1.8/

Related: https://pagure.io/koji/issue/612
2017-12-19 09:56:45 -05:00
Mike McLean
49853afed6 Check for login earlier
Ensure that assertLogin is called early to avoid confusing error messages.

Fixes #643
2017-12-08 09:43:25 -05:00
Mike McLean
bc2bb62032 avoid unnecessary file opening 2017-12-07 14:55:37 -05:00
Tomas Kopecek
b482e36595 move checks earlier to prep_outputs 2017-12-07 14:55:37 -05:00
Tomas Kopecek
6ad3d65a91 check all existing btypes 2017-12-07 14:55:37 -05:00
Tomas Kopecek
b81159bc2d run checks earlier for cg_import
Related: https://pagure.io/koji/issue/426
2017-12-07 14:55:37 -05:00
Mike McLean
7ce1c73777 taskWaitResults: fix canfail/canceled case when tasks=None 2017-12-05 10:28:24 -05:00
Mike McLean
621ce5b27e include faultCode in return for canceled, can-fail tasks 2017-12-05 10:28:24 -05:00
Tomas Kopecek
3701634d65 Treat canceled tasks as failed for optional_archs
Related: https://pagure.io/koji/issue/529
2017-12-05 10:28:23 -05:00
Tomas Kopecek
921fcae6fe return xmlrpc-compatible list instead of set 2017-11-22 15:54:31 -05:00
Tomas Kopecek
dd563a7c33 use explicit JOIN 2017-11-22 15:54:31 -05:00
Tomas Kopecek
cbbedd12b2 make query more secure 2017-11-22 15:54:31 -05:00
Tomas Kopecek
67149d3f91 don't send notifications to disabled users or hosts
Related: https://pagure.io/koji/issue/613
2017-11-22 15:54:31 -05:00
Mike McLean
079afeaefc docstrings for a couple volume calls 2017-11-14 17:55:39 +08:00
Tomas Kopecek
1f6ca9ae72 python-modernize -f lib2to3.fixes.fix_numliterals . -w 2017-10-31 16:07:34 +01:00
Tomas Kopecek
379ec8ae63 python-modernize -f lib2to3.fixes.file . -w 2017-10-31 16:05:16 +01:00
Tomas Kopecek
d6a5cdf987 python-modernize -f lib2to3.fixes.fix_except . -w 2017-10-31 16:05:16 +01:00
Mike McLean
b2f2ea83ed also use rmtree in delete_build/reset_build 2017-10-30 12:09:04 -04:00
Tomas Kopecek
5b23fb1629 consolidate safe_rmtree, rmtree and shutil.rmtree
shutil.rmtree should be avoided in almost all cases
safe_rmtree has its usage in tasks module, but innards are replaced with
koji.util.rmtree, so we don't have two implementations of same task

Related: https://pagure.io/koji/issue/648
2017-10-30 12:09:04 -04:00
Tomas Kopecek
fe4c83a229 typo fix + tests 2017-10-27 17:20:40 -04:00
Tomas Kopecek
facb8eca6f delete build directory if cg_import fails
Related: https://pagure.io/koji/issue/584
2017-10-27 17:20:40 -04:00
Brendan Reilly
036377352c Changed check to correct build import dir 2017-10-17 16:41:18 -04:00
Brendan Reilly
57dbc9ac01 cg_import fails immediately if build directory already exists 2017-10-17 16:41:18 -04:00
Tomas Kopecek
5139031d85 tests for handling user groups
Related: https://pagure.io/koji/issue/603
Related: https://pagure.io/koji/issue/604
Related: https://pagure.io/koji/issue/607
2017-10-12 18:07:06 -04:00
Yuming Zhu
7f302491f9 use urlparse.parse_qs instead of deprecated cgi.parse_qs 2017-10-11 14:52:48 +00:00
Mike McLean
8a81f8e9cd return dist field in getActiveRepos 2017-10-06 17:23:45 -04:00
Mike McLean
8c922d0de0 make cg info in policy data more consistent, and honor it in policy_get_cgs 2017-10-06 17:16:04 -04:00
Mike McLean
5cc3896bee drop unused "prebuild" policy data 2017-10-06 17:16:04 -04:00
Mike McLean
d1e303a560 applyVolumePolicy hub call for admins 2017-10-06 17:16:04 -04:00
Mike McLean
e1b984b561 correct docstring 2017-10-06 17:16:03 -04:00
Mike McLean
eb5f74b3c9 add a default option to check_volume_policy 2017-10-06 17:16:03 -04:00
Mike McLean
d14d16c6ef make volume policy data more consistent 2017-10-06 17:16:03 -04:00