Commit graph

1193 commits

Author SHA1 Message Date
Tomas Kopecek
8165f17f16 user proper type for buildroot state comparison
Fixes: https://pagure.io/koji/issue/1959
2020-02-11 10:48:10 +01:00
Tomas Kopecek
3c6fb59814 improve sql speed in build_references
Fixes: https://pagure.io/koji/issue/1961
2020-02-10 16:29:05 +01:00
Brendan Reilly
74e085572e Deprecating list-tag-history and tagHistory 2020-02-10 15:50:30 +01:00
Ken Dreyer
5210da0d30 hub: improve search() API documentation
Reformat this text to match Sphinx's conventions. This makes it easier
for developers to read this documentation.

There are a couple small corrections here as well:

- matchType accepts more values than "glob" or "regex", and it treats
  any other value as a plain "=" (strict string match).

- Only globs and regexes are searched insensitively
2020-02-07 10:56:48 -07:00
Tomas Kopecek
e016e6624d Emit user in PackageListChange messages
Fixes: https://pagure.io/koji/issue/1035
2020-02-04 09:22:43 +01:00
Tomas Kopecek
a63c801e3e check permission id in edit_tag
Fixes: https://pagure.io/koji/issue/1429
2020-02-04 09:20:48 +01:00
Tomas Kopecek
5494ea7632 check package list existence before blocking
Fixes: https://pagure.io/koji/issue/1177
2020-02-04 09:19:13 +01:00
Tomas Kopecek
72811e5fd1 don't allow setTaskPriority on closed task
Fixes: https://pagure.io/koji/issue/1153
2020-02-04 09:18:31 +01:00
Tomas Kopecek
512e43cbce add strict to getChangelogEntries
If srpm doesn't exist and strict is specified, raise GenericError
instead of returning empty list.

Fixes: https://pagure.io/koji/issue/1147
2020-02-04 09:17:04 +01:00
Yu Ming Zhu
810dfe5751 hub: [newRepo] raise error when tag doesn't exist
fixes: #1910
2020-01-23 16:29:25 +01:00
Yu Ming Zhu
bce5afdf0c hub: remove debugFunction API
testcase of list-api has some litaral reference. It doesn't matter but changed as well

fixes: #1833
2020-01-23 16:27:38 +01:00
Tomas Kopecek
906d039e3e raise GenericError on existing build reservation
Fixes: https://pagure.io/koji/issue/1888
2020-01-07 10:32:34 +01:00
Yu Ming Zhu
75f4c24bf2 hub: [distRepo] fix input tag arg for getBuildConfig call
fixes: #1630
2020-01-05 14:46:05 +00:00
Tomas Kopecek
27df9ed497 docstrings for API
Relates: https://pagure.io/koji/issue/1831
2020-01-02 12:25:40 +01:00
Tomas Kopecek
aacb1ba0ce use getBuildConfig 2020-01-02 11:26:20 +01:00
Tomas Kopecek
4d03794657 limit distRepo tasks per tag
Introduces 'distrepo.cancel_others` extra flag for tags. If enabled, new
distRepo task will cancel previous non-finished ones leaving only new
one.

Fixes: https://pagure.io/koji/issue/1630
2020-01-02 11:26:20 +01:00
Tomas Kopecek
327793f01f listTags needn't permissions every time
There is a performance penalty for joining permission table. Especially
koji-gc doesn't need this info, so it can be ignored by an option.
2020-01-02 11:23:36 +01:00
Yu Ming Zhu
350b04eb37 hub: getUser: default krb_princs value is changed to True
fixes: #1822
2019-12-19 14:55:35 +01:00
Yu Ming Zhu
a58148a7ed sort imports in hub 2019-12-12 11:00:57 +00:00
Tomas Kopecek
857fe4c871 extend docstrings for CGInit/RefundBuild
Fixes: https://pagure.io/koji/issue/1867
2019-12-11 09:22:25 +01:00
Tomas Kopecek
20b91e85a0 fix CGRefundBuild to release build properly
CGInitBuild will fail on already existing build (even canceled/failed),
so it can't be used to reuse previously refunded nvr.

CGRefund build doesn't delete reservation. Having reservation token for
build which is no more in BUILDING doesn't make much sense and blocks
and reservation of same NVR.

Fixes: https://pagure.io/koji/issue/1852
2019-12-10 16:58:33 +01:00
Yu Ming Zhu
b92143370e fix countOnly for group sql
fixes: #1844
2019-12-05 15:41:08 +01:00
Yu Ming Zhu
876a0501ac hub: fix BulkInsertProcessor call in CGImport
fixes: #1846
2019-11-29 06:31:04 +00:00
Yuming Zhu
7a6ebc851f improve test and clean targets in Makefiles 2019-11-27 15:42:30 +01:00
Tomas Kopecek
83b92da7e4 drop buildMap API call
It was originally designed for garbage-collector, but it is now using
buildReferences call which supersedes this one.

Fixes: https://pagure.io/koji/issue/1721
2019-11-26 12:26:29 +01:00
Tomas Kopecek
f0aa13bf0e no notifications in case of deleted tag
Fixes: https://pagure.io/koji/issue/1379
2019-11-25 11:13:27 +01:00
Mike McLean
1344062bdd fix typo and extend unit test to cover where it occurred 2019-11-19 12:01:14 -05:00
Mike McLean
727de7d953 support batch operation in BulkInsertProcessor 2019-11-19 12:01:14 -05:00
Tomas Kopecek
116bf7adbc rename set_record to add_record 2019-11-19 12:01:14 -05:00
Tomas Kopecek
6de0700ac8 use BulkInsertProcessor for hub mass inserts
Fixes: https://pagure.io/koji/issue/1712
2019-11-19 12:01:14 -05:00
Yu Ming Zhu
ac91dc857b policy test: ImportedTest - accept dict as build
and invalid build will raise `koji.GenericError`

fixes: #1796
2019-11-19 14:13:57 +01:00
Ken Dreyer
e800b1d5a6 hub: new addArchiveType RPC
Add a new hub method for inserting new archivetype records.

This closely matches addBType.

The purpose of this change is to make it easier to permit content
generators to import files with extensions that we have not defined in
the upstream packaged koji SQL file.
2019-11-19 09:06:47 +01:00
Ken Dreyer
68bcc06427 rm old test code
Some files in the tree had bits of code that you could run if you
executed the files directly as scripts. Now that we have unit tests and
the "fakehub" tool, we do not need this code.
2019-11-18 10:45:57 +01:00
Ken Dreyer
0589e5ca46 hub: document cg_import parameters
Document the parameters for the CGImport API call.
2019-11-18 09:42:30 +01:00
Jim Foraker
fde8aab177 hub: Fix issue with listing users and old versions of Postgres
Koji was using the array_remove() SQL function, which was not introduced
until Postgres 9.4.  RHEL 7 ships with Postgres 9.2.  This construct
was being used to ensure that the krb_principals arrays in user
dictionaries were empty if no principals were defined, instead of
having a single value of None.  Instead we use QueryProcessor's result
transformation support to remove the None entry.

Signed-off-by: Jim Foraker <foraker1@llnl.gov>
2019-11-06 13:01:25 -05:00
Jim Foraker
b1aaf531aa hub: Fix permissions in readPackageList()
The recent changes to kerberos principal handling broke proper reporting
of package ownership, due to an obvious typo.

Signed-off-by: Jim Foraker <foraker1@llnl.gov>
2019-11-04 15:05:23 -08:00
Tomas Kopecek
1a2b10ae8e More default values in example kojihub.conf
Fixes: https://pagure.io/koji/issue/1661
2019-10-31 11:24:40 +01:00
Tomas Kopecek
79a7da7c0b CGUninitBuild for cancelling CG reservations
Fixes: https://pagure.io/koji/issue/1610
2019-10-16 10:03:46 +02:00
Tomas Kopecek
86fc5cdbd3 fix log message to show package name
Fixes: https://pagure.io/koji/issue/1693
2019-10-16 09:20:51 +02:00
Yu Ming Zhu
3e124f685a fix editUser api for multiple kerberos support 2019-10-15 09:16:43 +02:00
Yu Ming Zhu
180cf894e2 hub: [get_group_members] return field is not named as alias 2019-10-15 09:16:43 +02:00
Yu Ming Zhu
68901dde1c hub: [getUser] support dict userInfo 2019-10-15 09:16:43 +02: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
Ken Dreyer
c01820e50d hub: new listCGs RPC
Add a new hub method for listing new content generator records.

The purpose of this change is to make it easier for administrators to
determine what content generators are present and what user accounts
have access to those.
2019-10-15 08:54:34 +02:00
Brendan Reilly
fb82f04837 Tag permission can be used for un/tagBuildBypass
Fixes: #1510
2019-10-14 10:25:39 +02:00
Brendan Reilly
fda86ce710 Added editUser api call
Fixes: #862
2019-10-14 10:14:50 +02:00
Ken Dreyer
d2a8c10efc hub: remove reference to PythonOption
With mod_python we could use Apache's PythonOption directive. That
directive does not exist with mod_wsgi and we have to use SetEnv
instead.

Remove the PythonOption directive and describe how to use SetEnv.
2019-10-14 10:05:08 +02:00
Yu Ming Zhu
5629ff59a0 doc: GssapiLocalName should be off 2019-10-10 13:04:06 +00:00
Yuming Zhu
7b60e0e7eb backwards compatibility for ProxyDNs change 2019-10-10 13:04:06 +00:00