Compare commits

...

872 commits

Author SHA1 Message Date
0b7269ede1 Merge pull request 'Drop fedora jenkins docs' (#4676) from tkopecek/koji:drop-jenkins into master
All checks were successful
/ flake8 (push) Successful in 12s
/ bandit (push) Successful in 14s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 51s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 55s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m32s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 47s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m29s
Reviewed-on: #4676
Reviewed-by: Mike McLean <mikem@redhat.com>
2026-10-05 18:35:40 +00:00
cdb4c5266a Drop fedora jenkins docs
All checks were successful
/ flake8 (pull_request) Successful in 11s
/ bandit (pull_request) Successful in 16s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 1m3s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m42s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 56s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m2s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m44s
2026-10-05 13:52:24 +02:00
a3d33845f8 Merge pull request 'Pointing docs links to readthedocs' (#4675) from mikem/koji:docs-links into master
All checks were successful
/ flake8 (push) Successful in 13s
/ bandit (push) Successful in 16s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 55s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 57s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m38s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 50s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m39s
Reviewed-on: #4675
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-10-05 11:50:52 +00:00
4b1a918e4a fix refs to "Pagure"
All checks were successful
/ flake8 (pull_request) Successful in 12s
/ bandit (pull_request) Successful in 14s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 54s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 50s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m31s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 52s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m27s
2026-10-02 12:57:27 -04:00
285f93e181 update maintainer docs
All checks were successful
/ flake8 (pull_request) Successful in 11s
/ bandit (pull_request) Successful in 15s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 52s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 50s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m31s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 50s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m27s
2026-10-02 12:36:55 -04:00
0adbff11cd update pagure links in kojid comments
All checks were successful
/ flake8 (pull_request) Successful in 11s
/ bandit (pull_request) Successful in 14s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 52s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 57s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m33s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 52s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m30s
2026-10-02 11:28:09 -04:00
41fe3de43f remove more pagure links 2026-10-02 11:21:11 -04:00
f92be423e2 update koji docs links 2026-10-02 10:43:57 -04:00
684f97e326 Merge pull request 'add readthedocs config' (#4674) from mikem/koji:readthedocs-config into master
All checks were successful
/ flake8 (push) Successful in 12s
/ bandit (push) Successful in 15s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 56s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 54s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m33s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 48s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m33s
Reviewed-on: #4674
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-10-02 14:17:40 +00:00
c54d15c233 .readthedocs.yaml
All checks were successful
/ flake8 (pull_request) Successful in 11s
/ bandit (pull_request) Successful in 14s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 51s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 52s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m28s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 46s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m29s
2026-10-01 14:40:25 -04:00
78159374cb Merge pull request 'Replace pagure/forgejo references' (#4664) from tkopecek/koji:fix-forgejo into master
All checks were successful
/ bandit (push) Successful in 16s
/ flake8 (push) Successful in 13s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 53s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 1m0s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m33s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 50s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m36s
Reviewed-on: #4664
Reviewed-by: Mike McLean <mikem@noreply.forge.fedoraproject.org>
2026-09-29 07:47:42 +00:00
98543a81af Fix flake8 2026-09-29 07:47:42 +00:00
beeb331138 Rest of references 2026-09-29 07:47:42 +00:00
8e5cae7a96 Update issue and PR URLs from pagure to forgejo
Update issue and pull request URLs in Python source code to reflect
the migration from pagure.io to forge.fedoraproject.org. Changes:
- pagure.io/koji/issue/N → forge.fedoraproject.org/koji/koji/issues/N
- pagure.io/koji/pull-request/N → forge.fedoraproject.org/koji/koji/pulls/N
- pagure.io/pungi/issue/N → forge.fedoraproject.org/pungi/pungi/issues/N

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-09-29 07:47:42 +00:00
18dcb80d07 Merge pull request 'more size limits for protonmsg' (#4630) from mikem/koji:protonmsg-more-size-limits into master
All checks were successful
/ flake8 (push) Successful in 12s
/ bandit (push) Successful in 15s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 53s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 58s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m32s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 48s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m35s
Reviewed-on: #4630
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-09-24 13:56:31 +00:00
914fb32c06 another unit test for coverage 2026-09-24 13:56:31 +00:00
c6f397ebb5 Log error on unusable message 2026-09-24 13:56:31 +00:00
d2d2a82e56 avoid reading config file on load 2026-09-24 13:56:31 +00:00
9ef4a0fc03 report omitted keys 2026-09-24 13:56:31 +00:00
fd2a3e4d1c more unit tests 2026-09-24 13:56:31 +00:00
b1017d6000 fixes 2026-09-24 13:56:31 +00:00
64a2653baf fix unit tests 2026-09-24 13:56:31 +00:00
ccb3767c03 more size limit options for protonmsg 2026-09-24 13:56:31 +00:00
778362ae8e log body size 2026-09-24 13:56:31 +00:00
bddd0f1613 Merge pull request 'updated message plugin for hub' (#4652) from mikem/koji:message-plugin-alt-2 into master
All checks were successful
/ flake8 (push) Successful in 12s
/ bandit (push) Successful in 16s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 58s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 54s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m46s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 49s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m35s
Reviewed-on: #4652
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-09-24 13:52:34 +00:00
3e2904ffc2 cursor access time non-null 2026-09-24 13:52:34 +00:00
d36325c4ab pass limit to do_flush 2026-09-24 13:52:34 +00:00
54806b08c9 Refactor message plugin 2026-09-24 13:52:34 +00:00
40732adcd5 update docs 2026-09-24 13:52:34 +00:00
f302f7fc94 more tests 2026-09-24 13:52:34 +00:00
498bb9928a handle OmittedValue at top 2026-09-24 13:52:34 +00:00
b02e58202b fix unit tests 2026-09-24 13:52:34 +00:00
97645dc90d add item_limit and string_limit config, drop extra_limit 2026-09-24 13:52:34 +00:00
a0fe8da0f9 add assert for test_prep_rpm_sign_no_sigkey 2026-09-24 13:52:34 +00:00
4754c1f894 add some documentation 2026-09-24 13:52:34 +00:00
b63c21d5f1 add the new perm in the schema 2026-09-24 13:52:34 +00:00
5134a76916 skip update on duplicate ack 2026-09-24 13:52:34 +00:00
7b697c1636 schema upgrade script 2026-09-24 13:52:34 +00:00
2ff0d32e34 saner boolean config handling and more tests 2026-09-24 13:52:34 +00:00
f2ba573baa clearer error on empty list 2026-09-24 13:52:34 +00:00
ac455243cd auto_clean configuration 2026-09-24 13:52:34 +00:00
ae03e384c1 more tests 2026-09-24 13:52:34 +00:00
82a89899df flake8 2026-09-24 13:52:34 +00:00
dbe82e75fa implement max_sent_age and limit param 2026-09-24 13:52:34 +00:00
fb7f6d66ce validate ack params 2026-09-24 13:52:34 +00:00
88427d7db7 include uuid in message 2026-09-24 13:52:34 +00:00
aa3760a6dd unit tests 2026-09-24 13:52:34 +00:00
65faba1ab5 include topic in return 2026-09-24 13:52:34 +00:00
049a7ec498 flake8 2026-09-24 13:52:34 +00:00
0acef25b9b fix 2026-09-24 13:52:34 +00:00
5ac1f6bf32 handle message plugin config via hub 2026-09-24 13:52:34 +00:00
95f37268e7 option to use main hub config with plugins 2026-09-24 13:52:34 +00:00
cce7a6ca45 first stab at message plugin 2026-09-24 13:52:34 +00:00
c3350e0558 Merge pull request 'handle missing web search form values gracefully' (#4632) from mikem/koji:search-form-values into master
All checks were successful
/ flake8 (push) Successful in 15s
/ bandit (push) Successful in 17s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 1m8s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 1m11s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m49s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 51s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m42s
Reviewed-on: #4632
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-09-15 09:47:15 +00:00
fec4839bef handle missing web search form values gracefully 2026-09-15 09:47:15 +00:00
59934bb10d Merge pull request 'cli: fix handling of host arg in scheduler-info' (#4650) from mikem/koji:scheduler-info-fix into master
Some checks failed
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Has been cancelled
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Has been cancelled
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Has been cancelled
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Has been cancelled
/ bandit (push) Has been cancelled
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Has been cancelled
/ flake8 (push) Has been cancelled
Reviewed-on: #4650
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-09-15 09:47:06 +00:00
eeb1d98b19 cli: fix handling of host arg in scheduler-info
All checks were successful
/ flake8 (pull_request) Successful in 15s
/ bandit (pull_request) Successful in 18s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m6s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 1m17s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m51s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 54s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m40s
Fixes #4649
2026-08-19 10:15:31 -04:00
16c7ab5bca Merge pull request 'Update API' (#4648) from tkopecek/koji:update-api into master
All checks were successful
/ flake8 (push) Successful in 15s
/ bandit (push) Successful in 17s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 1m20s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 1m26s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 2m3s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 54s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m52s
Reviewed-on: #4648
Reviewed-by: Mike McLean <mikem@noreply.forge.fedoraproject.org>
2026-08-19 06:42:08 +00:00
985fbd2ee5 Update API
All checks were successful
/ flake8 (pull_request) Successful in 23s
/ bandit (pull_request) Successful in 31s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 2m44s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 4m28s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 2m12s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 2m17s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 7m8s
2026-08-18 09:17:25 +02:00
745606c9e9 Merge pull request 'better filtering of builtins in check_api' (#4646) from mikem/koji:api-check-builtins into master
All checks were successful
/ flake8 (push) Successful in 15s
/ bandit (push) Successful in 16s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 1m7s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 1m13s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m49s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 49s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m36s
Reviewed-on: #4646
2026-08-18 07:00:57 +00:00
8b2029dabf update api test data to 1.36
All checks were successful
/ flake8 (pull_request) Successful in 14s
/ bandit (pull_request) Successful in 18s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 1m19s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m58s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m7s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 56s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m43s
generated using the updated check-api script against the koji-1.36.0 tag
i.e. commit 61e99a84bd
2026-08-17 13:20:12 -04:00
47210e1551 better filtering of builtins in check_api 2026-08-17 13:20:12 -04:00
403342703a Merge pull request 'Made some help texts more informative.' (#4611) from mikem/koji:pr-4254-recover into master
All checks were successful
/ flake8 (push) Successful in 17s
/ bandit (push) Successful in 19s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 1m11s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 1m15s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m55s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 52s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m43s
Reviewed-on: #4611
2026-08-17 12:58:53 +00:00
d0d27e6783 unit tests 2026-08-17 12:58:53 +00:00
102571a5c6 also adjust wrapper-rpm opts for consistency 2026-08-17 12:58:53 +00:00
698204bd60 language tweaks 2026-08-17 12:58:53 +00:00
Björn Persson
45672b69d9 Made some help texts more informative. 2026-08-17 12:58:53 +00:00
461dd5681e Merge pull request 'Docs about dnf5/gpg signature checking' (#4635) from tkopecek/koji:issue4544 into master
All checks were successful
/ flake8 (push) Successful in 15s
/ bandit (push) Successful in 17s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 1m4s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 1m18s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m48s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 56s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m34s
Reviewed-on: #4635
Reviewed-by: Mike McLean <mikem@noreply.forge.fedoraproject.org>
2026-08-14 14:21:28 +00:00
386068a40f Docs about dnf5/gpg signature checking
All checks were successful
/ flake8 (pull_request) Successful in 17s
/ bandit (pull_request) Successful in 19s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m8s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 1m11s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m52s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 53s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m39s
Related: #4544
2026-07-31 11:00:43 +02:00
06add5e72e Merge pull request 'avoid masking AuthError details' (#4608) from mikem/koji:masked-auth-errors into master
All checks were successful
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 1m13s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m54s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 54s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m42s
/ flake8 (push) Successful in 18s
/ bandit (push) Successful in 19s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 1m11s
Reviewed-on: #4608
2026-07-17 15:55:19 +00:00
43b421f1a5 avoid masking AuthError details
All checks were successful
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 1m17s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m0s
/ flake8 (pull_request) Successful in 17s
/ bandit (pull_request) Successful in 20s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m12s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m54s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m41s
Fixes koji/koji#4607
2026-07-17 11:51:09 -04:00
ab11f28684 Merge pull request 'More selection options in scheduler-logs cli' (#4561) from scheduler-logs-cli-options into master
All checks were successful
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 1m9s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 1m11s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m41s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m55s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 55s
/ flake8 (push) Successful in 18s
/ bandit (push) Successful in 18s
Reviewed-on: #4561
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-07-17 15:47:12 +00:00
57563c6200 more output tweaks 2026-07-17 15:47:12 +00:00
965ff34c83 strict lookups and keep header aligned 2026-07-17 15:47:12 +00:00
ffaa863727 tweak output format 2026-07-17 15:47:12 +00:00
b9ced60c50 more query options for scheduler logs 2026-07-17 15:47:12 +00:00
6ec00b08f8 Merge pull request 'Basic forgejo test actions' (#4616) from tkopecek/koji:actions into master
All checks were successful
/ flake8 (push) Successful in 18s
/ bandit (push) Successful in 19s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 1m11s
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (push) Successful in 1m14s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (push) Successful in 1m54s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (push) Successful in 54s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (push) Successful in 2m40s
Reviewed-on: #4616
2026-07-17 14:36:04 +00:00
398c089830 Move images to forgejo's registry 2026-07-17 14:36:04 +00:00
3828aa2b28 Basic forgejo test actions 2026-07-17 14:36:04 +00:00
c3239d46c1 Merge pull request 'release notes for 1.36.1 and version bump' (#4612) from mikem/koji:koji-1.36.1-release into master
Reviewed-on: #4612
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-07-08 17:25:44 +00:00
0b55dafdd1 include pr 4587 in notes, fix typo, and bump date 2026-07-08 13:24:11 -04:00
02529ebdc3 release notes for 1.36.1 and version bump 2026-07-08 13:24:11 -04:00
9bc57c3c60 Merge pull request 'Allow restarted tasks to recycle their existing draft builds' (#4587) from mikem/koji:draft-recycle into master
Reviewed-on: #4587
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-06-24 07:47:20 +00:00
dec25644da unit tests 2026-06-24 07:47:20 +00:00
e37e27d7c5 attempt to recycle draft builds when a task is restarted 2026-06-24 07:47:20 +00:00
ba571578fb Merge pull request 'multicall-docstring' (#4610) from mikem/koji:multicall-docstring into master
Reviewed-on: #4610
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-06-23 06:41:28 +00:00
64c06980a7 Better error if client mixes multicall methods 2026-06-23 06:41:28 +00:00
9714b5e2ee update old multiCall docstring 2026-06-23 06:41:28 +00:00
6e24be12c7 Merge pull request 'better scm path normalization' (#4585) from mikem/koji:scm-normalization into master
Reviewed-on: #4585
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-06-10 14:57:37 +00:00
bec209c437 better scm path normalization 2026-06-10 14:57:37 +00:00
b23c30d1e8 Merge pull request 'handle BuildRoot.getList in fakepolicy' (#4599) from mikem/koji:fakepolicy-buildroot into master
Reviewed-on: #4599
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-06-10 06:09:45 +00:00
8cdf1a859f handle BuildRoot.getList in fakepolicy
Needed for testing policies that use koji/koji!4598
2026-06-09 16:41:38 -04:00
5e149d7521 Merge pull request 'add by_tag_subtask policy test' (#4578) from mikem/koji:tag-subtask-test into master
Reviewed-on: #4578
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-06-05 14:02:02 +00:00
16ed2b3e47 fix task.getInfo args and make sure tests will catch this error 2026-06-05 14:02:02 +00:00
611684eca3 basic unit test for host.tagBuild 2026-06-05 14:02:02 +00:00
9834a34df5 unit test for new policy test 2026-06-05 14:02:02 +00:00
e492abfef4 fakepolicy hook 2026-06-05 14:02:02 +00:00
35f126dfa1 by_tag_subtask test 2026-06-05 14:02:02 +00:00
e41a862f74 Merge pull request 'download-build: add --nofailarch' (#4575) from adamwill/koji:download-no-fail-arch into master
Reviewed-on: #4575
Reviewed-by: Tomas Kopecek <tkopecek@redhat.com>
2026-06-05 12:17:18 +00:00
e4b6984b76 download-build: add --nofailarch
This arg makes `koji download-build` warn, but exit 0, if the
specified build has no packages for any of the specified arches.

This is useful for `bodhi update download`. An update can contain
many builds. If you want to download "the update" for a given
arch, and just one or two builds within it aren't built on all
arches, that's fine. It's useful for Bodhi to not have to deal
with Koji exiting 1 in this case, and distinguish it from the
download failing for other reasons.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-06-05 12:17:18 +00:00
55481bcac2 Merge pull request 'Reset callnum when a session is renewed' (#4588) from mikem/koji:renew-reset-callnum into master
Reviewed-on: #4588
Reviewed-by: Tomas Kopecek <tkopecek@noreply.forge.fedoraproject.org>
2026-06-05 12:14:03 +00:00
e1db1571e0 unit test for createSession 2026-06-05 12:14:03 +00:00
4909950747 reset callnum on session renewal 2026-06-05 12:14:03 +00:00
d3f78c5110 Merge pull request 'parallel-tests' (#4592) from tkopecek/koji:parallel-tests into master
Reviewed-on: #4592
2026-06-04 16:22:22 +00:00
2e82b2fb63 avoid patching optparse 2026-06-04 16:22:22 +00:00
e7e8ac64c1 Locale-independent tests
Fixing places where local-dependent string are introduced to test suite.

Assisted-by: Claude Sonnet 4.5
2026-06-04 16:22:22 +00:00
a5f7b72afd Improve test parallelism
Fixing:
- timezone races
- LANGUAGE/COLUMNS restoration
- module-level assignment
- sys.path pollution

Assisted-by: Claude Sonnet 4.5
2026-06-04 16:22:22 +00:00
8eeeb1fc85 Merge pull request 'Extend sidetag documentation' (#4280) from sidetag-docs into master
Reviewed-on: #4280
2026-06-01 17:17:52 +00:00
246e3120a8 Extend sidetag documentation 2026-06-01 17:17:52 +00:00
54eda8f626 Merge pull request 'Additional docs for policy tests' (#4294) from docs-policies into master
Reviewed-on: #4294
2026-06-01 17:06:08 +00:00
9e35476cad Additional docs for policy tests 2026-06-01 17:06:08 +00:00
f267d8116e Merge pull request 'Add volume toplink info to release notes' (#4557) from volume-toplink-info into master
Reviewed-on: #4557
2026-06-01 16:47:06 +00:00
f6dabe9f39 Add volume toplink info to release notes
Fixes https://pagure.io/koji/issue/4556
2026-06-01 16:47:06 +00:00
3fbe1301af Merge pull request 'fakepolicy hooks for scm policy' (#4586) from mikem/koji:fakepolicy-scm into master
Reviewed-on: #4586
Reviewed-by: Tomas Kopecek <tkopecek@noreply.forge.fedoraproject.org>
2026-06-01 12:57:12 +00:00
04a6ec476f fakepolicy hooks for scm policy 2026-06-01 12:57:12 +00:00
dcfd5d6e6a Merge pull request 'Unify format of CLI help messages' (#4594) from jlibrova/koji:issue-4593 into master
Reviewed-on: #4594
Reviewed-by: Tomas Kopecek <tkopecek@noreply.forge.fedoraproject.org>
2026-06-01 10:56:31 +00:00
f65a3a3810 Unify format of CLI help messages
Fixes: #4593
2026-06-01 10:56:31 +00:00
877c35d3cb Merge pull request 'fix unit tests for rhel8' (#4564) from fix-rhel8-tests into master
Reviewed-on: #4564
2026-05-28 17:58:57 +00:00
e4e33b13ff skip api test on older pythons 2026-05-28 17:58:57 +00:00
1bb74678b3 path.join doesn't like mocks on el8 2026-05-28 17:58:57 +00:00
905efae0cc more compat fix for mocks 2026-05-28 17:58:57 +00:00
7e9ec379f0 adjust pathinfo mocking 2026-05-28 17:58:57 +00:00
cda90ad9e7 unit test fixes for rhel8 compat 2026-05-28 17:58:57 +00:00
5f059daa97 Merge pull request 'Add a default value for --single in daemon.py' (#4583) from tkopecek/koji:issue4581 into master
Reviewed-on: #4583
Reviewed-by: Mike McLean <mikem@noreply.forge.fedoraproject.org>
2026-05-14 06:39:08 +00:00
3f5c69f4a7 Add a default value for --single in daemon.py
Kojivmd doesn't support --single option.

Related: #4581
2026-05-14 06:37:21 +00:00
44f5866174 Merge pull request 'Fix flag data leaks' (#4553) from flag-leaks into master
Reviewed-on: #4553
2026-05-12 16:27:43 +00:00
33eb6d470e make a copy of data since we can modify it now 2026-05-12 16:27:43 +00:00
d18428952d add unit test for flag data leaks in policy 2026-05-12 16:27:43 +00:00
8ef46e28e3 Merge pull request 'rpmdiff: fix ignore behavior' (#4546) from rpmdiff-fixes into master
Reviewed-on: #4546
2026-05-12 16:26:56 +00:00
5895940a3a update index mapping to align with rpmlint 2026-05-12 12:22:58 -04:00
a73343feac fix old tests 2026-05-12 12:22:58 -04:00
3d2cdca66c new unit tests for rpmdiff 2026-05-12 12:22:58 -04:00
7ad862d78d fix FILEIDX values 2026-05-12 12:22:58 -04:00
58f16dd5ec fix kojihash 2026-05-12 12:22:58 -04:00
df814d516b Merge pull request 'Rpmdiff doesn't correctly check hashes' (#4542) from fixrpmdiff into master
Reviewed-on: #4542
2026-05-12 16:19:24 +00:00
d94ee47d85 Rpmdiff doesn't correctly check hashes
Keys to hash dict are incorrectly derived. So, even if the hashes are
same, rpmdiff is run every time.

Related: https://pagure.io/koji/issue/4541
2026-05-12 16:18:18 +00:00
9db1c31201 Merge pull request 'better handling of volume topdir problems' (#4558) from volume-toplink-fix into master
Reviewed-on: #4558
2026-05-12 16:04:58 +00:00
c33ffd3ee4 catch samefile errors, more tests 2026-05-12 16:04:58 +00:00
00c3919090 just create the toplink when we need it 2026-05-12 16:04:58 +00:00
18671f6ca1 better handling of volume topdir problems 2026-05-12 16:04:58 +00:00
3976f48e2d Merge pull request 'fix string escapes in archivetype queries' (#4573) from mikem/koji:archivetypes-old-pg-escape into master
Reviewed-on: #4573
2026-05-06 12:00:59 +00:00
3d9e1e32e7 unit tests 2026-05-06 12:00:59 +00:00
f58a73644e fix string escapes in archivetype queries for older postgres 2026-05-06 12:00:59 +00:00
3af455de29 Merge pull request 'make templates compatible for jinja 2.10' (#4563) from jinja-compat-rhel8 into master
Reviewed-on: #4563
2026-04-29 18:36:00 +00:00
478d21b358 tweak the tests to minimize changes 2026-04-29 12:47:55 -04:00
3810c573a9 make templates compatible for jinja 2.10 2026-04-29 12:47:55 -04:00
6b87cd8ac6 Merge pull request 'more draft tests and gc tests' (#4577) from mikem/koji:gc-draft-tests into master
Reviewed-on: #4577
2026-04-29 06:24:40 +00:00
a1d3266b5a unit tests 2026-04-28 20:34:16 -04:00
15a4cbcde8 safe behavior for get_promoted_build 2026-04-28 19:11:38 -04:00
c1246f8d01 new cg tests, draft_superceded test, getPromotedBuild call 2026-04-28 18:47:01 -04:00
a1b3c01455 PR#4538: Extend fakepolicy tool to simulate cg policy checks
Merges #4538
https://pagure.io/koji/pull-request/4538

Fixes #4539
https://pagure.io/koji/issue/4539
2026-03-30 14:26:19 +02:00
38203577f4 fix package entry for cg policy data 2026-03-30 14:26:13 +02:00
bafb8ae1e4 fix metadata_only check 2026-03-30 14:26:13 +02:00
3914c2a2c2 also work with metadata file 2026-03-30 14:26:13 +02:00
2b752aa949 simulate cg_import in fakepolicy 2026-03-30 14:26:13 +02:00
61e99a84bd PR#4543: Release notes and version bump for 1.36
Merges #4543
https://pagure.io/koji/pull-request/4543

Fixes: #4537
https://pagure.io/koji/issue/4537
1.36 release notes
2026-03-23 17:11:18 -04:00
dc7c079d9c fix wrapping 2026-03-05 17:01:23 -05:00
1b21b9b4a7 more typos 2026-03-05 17:01:23 -05:00
0a988dab9f typo 2026-03-05 17:01:23 -05:00
3602b58c34 version bump 2026-03-05 17:01:23 -05:00
62062bc8fd first stab at release notes for 1.36 2026-03-05 17:01:23 -05:00
86057e1b12 PR#4446: rpm v6 support
Merges #4446
https://pagure.io/koji/pull-request/4446

Fixes: #4200
https://pagure.io/koji/issue/4200
Rpm v6 readiness issues
2026-03-05 10:25:38 -05:00
47f4c64452 drop debug output in rpminfo page 2026-02-23 12:20:18 -05:00
3c78edde1c allow rpminfo.size to be null 2026-02-23 12:18:46 -05:00
4e86267186 include size in rpm ident fields 2026-02-23 12:18:46 -05:00
2f856dff13 update schema upgrade script 2026-02-23 12:18:46 -05:00
f9c2e21c89 rpm v6 support 2026-02-23 12:18:44 -05:00
fa4cb46caf PR#4472: AllowDraftComponents hub option
Merges #4472
https://pagure.io/koji/pull-request/4472

Fixes: #4482
https://pagure.io/koji/issue/4482
AllowDraftComponents hub option
2026-02-23 13:07:41 +01:00
643912f9e7 AllowDraftComponents hub option 2026-02-23 13:07:34 +01:00
cbc052c5ce PR#4532: Allow querying headers from signed copy
Merges #4532
https://pagure.io/koji/pull-request/4532

Fixes: #4533
https://pagure.io/koji/issue/4533
Allow querying headers from signed copy
2026-02-16 13:37:32 +01:00
d2680640d6 test coverage 2026-02-16 13:37:25 +01:00
850813f868 option to query signed rpm headers 2026-02-16 13:37:25 +01:00
f1a8c638db PR#4498: adjust repo log logic
Merges #4498
https://pagure.io/koji/pull-request/4498

Fixes: #4499
https://pagure.io/koji/issue/4499
repo log logic can result in overlapping regens
2026-02-10 14:11:10 -05:00
5670c12c1d drop test refs to RepoLagWindow 2026-02-10 14:09:13 -05:00
114731f911 docs 2026-02-10 14:09:13 -05:00
c160e472c0 drop incorrect comment 2026-02-10 14:09:13 -05:00
564280f28e add some unit tests 2026-02-10 14:09:13 -05:00
d59729c54b fix logic; cleanup 2026-02-10 14:09:13 -05:00
228279f603 coverage, cleanup 2026-02-10 14:09:13 -05:00
ebc9922c94 unit tests + fixes 2026-02-10 14:09:13 -05:00
8d9b5b7e65 flake8 2026-02-10 14:09:13 -05:00
12e1e72d56 stab at simpler lag logic 2026-02-10 14:09:13 -05:00
249d84bbf7 PR#4494: allow recycling in get_next_build
Merges #4494
https://pagure.io/koji/pull-request/4494

Fixes: #4490
https://pagure.io/koji/issue/4490
get_next_build can fail if there are a lot of matching failed builds
2026-02-10 14:07:50 -05:00
362cdf930c backwards compatible fstring quoting 2026-02-10 14:04:06 -05:00
4be7657d9d add more tries in get_next_build 2026-02-10 14:04:06 -05:00
9327a3f3a7 fix ref for consistency 2026-02-10 14:04:06 -05:00
97261f2582 a bit more logging 2026-02-10 14:04:06 -05:00
d49a989b56 fix unit tests 2026-02-10 14:04:06 -05:00
6bd5d69c21 add a row lock in recycle_build 2026-02-10 14:04:06 -05:00
338da4d25a drop strict 2026-02-10 14:04:06 -05:00
b66ff6c69e PR#4505: handler disabled hosts in scheduler
Merges #4505
https://pagure.io/koji/pull-request/4505

Fixes: #4504
https://pagure.io/koji/issue/4504
scheduler doesn't handle disabled builders well
2026-02-10 14:01:31 -05:00
f5aa99ff1d flake8 2026-01-30 05:41:13 -05:00
370b1ff03a handler disabled hosts in scheduler
Fixes https://pagure.io/koji/issue/4504
2026-01-30 05:41:13 -05:00
cded89305b PR#4535: Fix reject_draft options
Merges #4535
https://pagure.io/koji/pull-request/4535

Fixes: #4525
https://pagure.io/koji/issue/4525
reject_draft called with wrong options
2026-01-29 16:07:01 +01:00
58a7d5d704 Fix reject_draft options
Fixes: https://pagure.io/koji/issue/4525
2026-01-29 16:06:54 +01:00
77d8b633aa PR#4534: catch nvra dups on promote
Merges #4534
https://pagure.io/koji/pull-request/4534

Fixes: #4530
https://pagure.io/koji/issue/4530
Better error when nvra overlap blocks draft promotion
2026-01-29 16:05:56 +01:00
6607d5e04a drop redundant parentheses 2026-01-29 16:05:48 +01:00
27183511ac catch nvra dups on promote
Fixes https://pagure.io/koji/issue/4530
2026-01-29 16:05:48 +01:00
4294012610 PR#4524: Adds sysuser kojibuilder which is required by koji-builder package
Merges #4524
https://pagure.io/koji/pull-request/4524

Fixes: #4523
https://pagure.io/koji/issue/4523
Missing sysuser kojibuilder on builder
2026-01-29 16:04:12 +01:00
627249fab7 Fix issues with sysuser.d approach 2026-01-29 16:04:00 +01:00
ccb6a51961 Adds sysuser kojibuilder which is required by koji-builder package
Fixes: https://pagure.io/koji/issue/4523
2026-01-29 16:04:00 +01:00
22b275d62d PR#4531: fix duplicate check in add_archive_type
Merges #4531
https://pagure.io/koji/pull-request/4531

Fixes: #4527
https://pagure.io/koji/issue/4527
add_archive_type() does not identify duplicate file extensions correctly
2026-01-29 15:39:43 +01:00
365d8ac687 fix duplicate check in add_archive_type
Fixes https://pagure.io/koji/issue/4527
2026-01-29 15:39:37 +01:00
18a3919506 PR#3704: support multi-action policies and negated tests
Merges #3704
https://pagure.io/koji/pull-request/3704

Fixes: #4491
https://pagure.io/koji/issue/4491
support multi-action policies and negated tests
2026-01-27 17:43:28 -05:00
59584b4de7 note actions in debug output 2026-01-27 17:30:38 -05:00
bafd830418 fix rule_str() 2026-01-27 17:30:38 -05:00
e6a7c474c9 unit test for flag action 2026-01-27 17:30:38 -05:00
c6ad3a4cf5 add flag action and flagged test 2026-01-27 17:30:38 -05:00
d37c0e9c2e support multi-action policies and negated tests
Based partially on work by cobrien from 2009.

This extends the existing policy handling code as follows
* Supports multi match rules
* Supports negated tests
* Supports break N action
* Supports stop action
* Backwards compatible
* adds unit tests for new functionality
* requires no fixes to existing unit tests
2026-01-27 17:30:38 -05:00
e3d0fe96eb PR#4463: merge misnamed schema upgrade script
Merges #4463
https://pagure.io/koji/pull-request/4463
2026-01-27 16:04:28 +01:00
8bb008137d merge misnamed schema upgrade script 2026-01-27 16:04:21 +01:00
47641208ef PR#4519: always prefer task arch in find_arch()
Merges #4519
https://pagure.io/koji/pull-request/4519

Fixes: #4518
https://pagure.io/koji/issue/4518
buildroots don't always prefer task arch
2026-01-27 15:42:57 +01:00
9166510897 always prefer task arch in find_arch()
Fixes https://pagure.io/koji/issue/4518
2026-01-27 15:42:50 +01:00
076f600dd2 PR#4514: recursive task policy data
Merges #4514
https://pagure.io/koji/pull-request/4514

Fixes: #4513
https://pagure.io/koji/issue/4513
rfe: recursive task policy data
2026-01-27 15:41:35 +01:00
a974ac0b43 avoid specialized helper function 2026-01-27 15:41:29 +01:00
a2295faf99 unit tests 2026-01-27 15:41:29 +01:00
7739fabe2c update fakepolicy to match 2026-01-27 15:41:29 +01:00
e90c062f21 recursive task policy data 2026-01-27 15:41:29 +01:00
8331df287f PR#4506: capture more events in scheduler logs
Merges #4506
https://pagure.io/koji/pull-request/4506

Fixes: #4507
https://pagure.io/koji/issue/4507
rfe: capture more events in scheduler logs
2026-01-27 15:39:20 +01:00
8728fa262e capture more events in scheduler logs 2026-01-27 15:39:13 +01:00
a21fa086c9 PR#4520: Fix typo in kojihub: get_build_targets docstring
Merges #4520
https://pagure.io/koji/pull-request/4520
2026-01-10 13:58:51 +01:00
c19d21a94b PR#4517: enable anonymous retries by default
Merges #4517
https://pagure.io/koji/pull-request/4517

Fixes: #4516
https://pagure.io/koji/issue/4516
Enable anon_retry by default
2026-01-07 08:21:29 -05:00
Rohitashv Kumar
5f0ee908d1 Fix typo in get_build_targets docstring
":param int, str, dist info:" should be
":param int, str, dict info:"

Signed-off-by: Rohitashv Kumar <roohiit@amazon.de>
2026-01-07 10:48:05 +00:00
6105617355 enable anonymous retries by default 2025-12-18 11:52:40 -05:00
86b0fc28d4 PR#4470: write-signed-rpm: fix nvr fallback
Merges #4470
https://pagure.io/koji/pull-request/4470

Fixes: #4469
https://pagure.io/koji/issue/4469
cli: write-signed-rpm errors on some valid NVR values
2025-12-03 10:02:55 -05:00
126cb52e5e fix unit test 2025-12-03 09:59:59 -05:00
5d37978ac0 write-signed-rpm: fix nvr fallback 2025-12-03 09:59:59 -05:00
8bbf8386be PR#4496: show more info on waitrepo task failures
Merges #4496
https://pagure.io/koji/pull-request/4496

Fixes: #4497
https://pagure.io/koji/issue/4497
show more info on waitrepo task failures
2025-11-21 15:29:17 -05:00
4f66d8dd69 show more info on waitrepo task failures 2025-11-21 15:22:48 -05:00
9582079741 PR#4493: SidetagTest/SidetagOwnerTest: don't raise an error when the tag/from_tag value in data is None
Merges #4493
https://pagure.io/koji/pull-request/4493

Fixes: #4492
https://pagure.io/koji/issue/4492
is_sidetag test doesn't accept None value with tag in policy_data, but it's the input of untagging
2025-11-21 15:14:03 -05:00
ecad287de3 update unit tests 2025-11-21 15:14:01 -05:00
385f35641a SidetagOwnerTest: fix none value of tag/fromtag as well 2025-11-21 15:14:01 -05:00
b9064320fe SidetagTest: treat None tag(untagging) a false assertion rather than an error 2025-11-21 15:14:01 -05:00
8518d4ff78 PR#4487: Migration deprecated %py3_* macros in spec
Merges #4487
https://pagure.io/koji/pull-request/4487

Fixes: #4419
https://pagure.io/koji/issue/4419
Deprecated %py3_* macros in spec
2025-11-21 15:13:37 -05:00
fec0baa0fe Migration deprecated %py3_* macros in spec
Fixes: https://pagure.io/koji/issue/4419
2025-11-21 15:13:36 -05:00
68f7f97bb7 PR#4486: CLI: add override option to assign-task
Merges #4486
https://pagure.io/koji/pull-request/4486

Fixes: #4465
https://pagure.io/koji/issue/4465
Manually assigned tasks should not (?) hit assignment timeout
2025-11-21 15:12:58 -05:00
da74a50420 CLI: add override option to assign-task
Fixes: https://pagure.io/koji/issue/4465
2025-11-21 15:12:58 -05:00
1a7ef0726e PR#4500: avoid stray comment after bandit annotation
Merges #4500
https://pagure.io/koji/pull-request/4500

Fixes: #4501
https://pagure.io/koji/issue/4501
 avoid stray comment after bandit annotation
2025-11-20 11:47:35 -05:00
3c2816a81c avoid stray comment after bandit annotation
bandit complains about this
2025-11-20 00:47:13 -05:00
0db0d21d8a PR#4495: Add new salutation.
Merges #4495
https://pagure.io/koji/pull-request/4495
2025-11-12 17:13:08 -05:00
Robby Callicotte
4c55c333a3 Add new salutation.
Adds a Texan salutation to cli output.
2025-11-12 13:36:34 -06:00
bd05c42e38 PR#4483: fakepolicy dev tool
Merges #4483
https://pagure.io/koji/pull-request/4483
2025-11-10 12:09:32 -05:00
2e75652ac9 avoid variable name overlap 2025-11-10 12:07:48 -05:00
1366ee2379 compact result output 2025-11-10 12:07:48 -05:00
2fc1e59bb6 fakepolicy devtool 2025-11-10 12:07:48 -05:00
5ff8bab254 PR#4481: Enable parent tag as name, not ID only
Merges #4481
https://pagure.io/koji/pull-request/4481

Fixes: #4479
https://pagure.io/koji/issue/4479
RFE: enable setInheritanceData with named parents
2025-11-06 14:33:33 -05:00
836143c712 Enable parent tag as name, not ID only
Fixes: https://pagure.io/koji/issue/4479
2025-11-06 14:33:29 -05:00
4a9746346a PR#4480: Add weblink to NVR build for draft builds
Merges #4480
https://pagure.io/koji/pull-request/4480

Fixes: #4438
https://pagure.io/koji/issue/4438
Web: add link from duplicate draft to promoted build
2025-11-06 14:32:03 -05:00
Avinash Singh
af978d0029 use non breaking spaces 2025-11-06 14:31:59 -05:00
Avinash Singh
54518b88a1 Fixes: https://pagure.io/koji/issue/4438 2025-11-06 14:31:59 -05:00
Avinash Singh
5b9950f15c add weblink to NVR build 2025-11-06 14:31:59 -05:00
0f59454399 PR#4475: web: add cg and draft filters for builds page
Merges #4475
https://pagure.io/koji/pull-request/4475

Fixes: #4476
https://pagure.io/koji/issue/4476
web: add cg and draft filters for builds page
2025-11-06 14:27:50 -05:00
24a0549ece unit test 2025-11-06 14:26:37 -05:00
23ada380fe web: add cg and draft filters for builds page 2025-11-06 14:26:37 -05:00
9a3ecaae7f PR#4473: show source files on srpm info page
Merges #4473
https://pagure.io/koji/pull-request/4473

Fixes: #4474
https://pagure.io/koji/issue/4474
 show source files on srpm info page
2025-11-06 13:49:27 -05:00
3f7f8edd53 show source files on srpm info page 2025-11-06 13:47:32 -05:00
cd3a1e10bc PR#4467: use label for waitrepo subtasks
Merges #4467
https://pagure.io/koji/pull-request/4467

Fixes: #4464
https://pagure.io/koji/issue/4464
Freeing 'build' task will create another 'waitrepo' task
2025-11-06 13:46:18 -05:00
a82be2a048 use label for waitrepo subtasks 2025-11-06 13:44:17 -05:00
ff90fb9bf1 PR#4484: addition data for cg volume policy
Merges #4484
https://pagure.io/koji/pull-request/4484

Fixes: #4485
https://pagure.io/koji/issue/4485
addition data for cg volume policy
2025-10-24 10:45:53 -04:00
dfeb79b4e0 addition data for cg volume policy 2025-10-23 13:07:19 -04:00
3999728651 PR#4461: unit test mocking fixes for test_download_file and test_list_tagged
Merges #4461
https://pagure.io/koji/pull-request/4461

Fixes: #4462
https://pagure.io/koji/issue/4462
intermittent failures for test_download_file and test_list_tagged
2025-09-30 07:35:50 -04:00
0b83bcf3ac fix fallout 2025-09-29 11:42:41 -04:00
cab4bf70f2 also mock BASEDIR 2025-09-29 11:02:57 -04:00
a2a82efa7e tweak mock data 2025-09-25 17:45:22 -04:00
77cd4546b5 avoid mocking os.path in test_list_tagged.py 2025-09-25 17:45:22 -04:00
a93d9fed2f avoid mocking open in test_download_file 2025-09-25 17:45:22 -04:00
a2d2e35dc1 PR#4369: import-cg: print build when done
Merges #4369
https://pagure.io/koji/pull-request/4369

Fixes: #4450
https://pagure.io/koji/issue/4450
import-cg: print build when done
2025-09-16 09:56:32 -04:00
1d09764bea import-cg: print build when done 2025-09-16 09:54:25 -04:00
5b72b7bea2 PR#4459: fully honor sigkey option in import-sig command
Merges #4459
https://pagure.io/koji/pull-request/4459

Fixes: #4460
https://pagure.io/koji/issue/4460
fully honor sigkey option in import-sig command
2025-09-16 09:49:23 -04:00
ae1bb9c655 add unit test 2025-09-16 09:39:58 -04:00
3b7633eb1c fully honor sigkey option in import-sig command 2025-09-16 09:39:58 -04:00
b270ee618f PR#4448: disable url sessions by default
Merges #4448
https://pagure.io/koji/pull-request/4448

Fixes: #4420
https://pagure.io/koji/issue/4420
Disable url sessions by default
2025-09-15 16:56:40 -04:00
df835631dd disable url sessions by default
Fixes https://pagure.io/koji/issue/4420
2025-09-15 16:55:25 -04:00
ef042172b2 PR#4409: Update links to yum/dnf/dnf5
Merges #4409
https://pagure.io/koji/pull-request/4409
2025-09-15 16:23:30 -04:00
6218a49d81 Update links to yum/dnf/dnf5 2025-09-15 16:23:08 -04:00
407b8ef1a9 PR#4457: fix some mocking in unit tests
Merges #4457
https://pagure.io/koji/pull-request/4457

Fixes: #4458
https://pagure.io/koji/issue/4458
incorrect mocking in some unit tests
2025-09-12 10:21:13 -04:00
820e2eb62c stabilize file list in test_draft_backlink.py 2025-09-10 16:35:19 -04:00
213c58141f fix some mocking in unit tests 2025-09-08 10:17:44 -04:00
b1814f5796 PR#4456: Force terminal width to 80 chars.
Merges #4456
https://pagure.io/koji/pull-request/4456

Fixes: #4439
https://pagure.io/koji/issue/4439
Some unit tests fail sporadically
2025-09-08 09:33:21 -04:00
Joe VLcek
c37b7dcd89 Force terminal width to 80 chars.
Fixes: #4356
2025-09-08 09:33:16 -04:00
5dcdaf1cc6 PR#4452: fix default volume case for draft symlinks
Merges #4452
https://pagure.io/koji/pull-request/4452

Fixes: #4451
https://pagure.io/koji/issue/4451
missing draft symlinks on default volume
2025-09-05 14:44:38 -04:00
aa4db84aa1 flake8 2025-09-05 14:00:02 -04:00
55238524b8 fix 2025-09-05 14:00:02 -04:00
01bd5c88f7 unit test that shows the problem 2025-09-05 14:00:02 -04:00
fb3fd87966 PR#4444: additional validation for sigkey value
Merges #4444
https://pagure.io/koji/pull-request/4444

Fixes: #4443
https://pagure.io/koji/issue/4443
Don't allow slash in sigkey value
2025-08-22 11:07:29 -04:00
2734d5276f require lowercase sigkey 2025-08-22 11:04:39 -04:00
6ea68825c7 allow sigkey="" 2025-08-22 11:04:39 -04:00
8ba268eecc tweak unit test 2025-08-22 11:04:39 -04:00
984e2f5146 extra validation for sigkey values 2025-08-22 11:04:39 -04:00
67cc2cdbac PR#4348: kojid --single mode
Merges #4348
https://pagure.io/koji/pull-request/4348

Fixes: #4440
https://pagure.io/koji/issue/4440
kojid --single mode
2025-08-20 09:51:59 -04:00
1ecba244e6 fix unit tests 2025-08-20 09:48:18 -04:00
e7bb3ed14b handle foreground override in TaskManager 2025-08-20 09:48:18 -04:00
7d9b22a75b koji --single 2025-08-20 09:48:18 -04:00
49338e91f9 PR#4416: distrepos: support "x86_64_v2" arch
Merges #4416
https://pagure.io/koji/pull-request/4416

Fixes: #4449
https://pagure.io/koji/issue/4449
distrepos: support "x86_64_v2" arch
2025-08-20 06:51:01 -04:00
Matyas Selmeci
3614eff7a2 Do not list x86_64_v2 as a compatible arch for x86_64 2025-08-20 06:50:56 -04:00
Matyas Selmeci
7e675c1469 distrepos: support "x86_64_v2" arch
This fixes a KeyError when trying to make a distrepo for the arch "x86_64_v2".
2025-08-20 06:50:56 -04:00
b1e2e4b3af PR#4442: Improve reliability of kojid service start
Merges #4442
https://pagure.io/koji/pull-request/4442

Fixes: #4441
https://pagure.io/koji/issue/4441
kojid.service does not reliably start
2025-08-15 15:57:51 -04:00
Jason Montleon
20d016f5b2 Improve reliability of kojid service start
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
2025-08-15 15:57:44 -04:00
d5d3ea7693 PR#4134: indexes for standard_buildroot
Merges #4134
https://pagure.io/koji/pull-request/4134

Fixes: #3963
https://pagure.io/koji/issue/3963
Add indices to standard_buildroot.
2025-08-13 09:48:11 -04:00
5b760315e1 indexes for standard_buildroot
Fixes https://pagure.io/koji/issue/3963
2025-08-13 09:46:04 -04:00
010ec6b954 PR#4428: cli access for sigkey naming
Merges #4428
https://pagure.io/koji/pull-request/4428

Fixes: #4430
https://pagure.io/koji/issue/4430
cli access for sigkey naming

Relates: #4415
https://pagure.io/koji/issue/4415
Better handling of complex rpm signatures
2025-08-13 09:27:47 -04:00
4547e7ed0a simplify error handler 2025-08-13 09:25:35 -04:00
b592d0eee1 adjust unit tests 2025-08-13 09:25:35 -04:00
895665cbb9 enable new signature features in cli 2025-08-13 09:25:35 -04:00
6beb0d52fd PR#4437: Add firewall configuration
Merges #4437
https://pagure.io/koji/pull-request/4437
2025-08-08 12:18:15 -04:00
Arif Badar
7cf3d94bff Add firewall configuration 2025-08-08 12:18:09 -04:00
3980afb821 PR#4436: Replace deprecated MaxRequestsPerChild in the docs.
Merges #4436
https://pagure.io/koji/pull-request/4436

Fixes: #4176
https://pagure.io/koji/issue/4176
Deprecated apache option noted in the manual
2025-08-05 12:26:14 -04:00
Joe VLcek
1ae0d3bddd Replace deprecated MaxRequestsPerChild in the docs.
Fixes: #4176
2025-08-05 12:26:09 -04:00
58440960f7 PR#4396: channel defaults
Merges #4396
https://pagure.io/koji/pull-request/4396

Fixes: #4399
https://pagure.io/koji/issue/4399
channel policy cannot distinguish override from default
2025-08-05 10:30:30 -04:00
0e1addf6fe add unit tests 2025-08-05 10:28:41 -04:00
2ebed21dae compat option for previous behavior 2025-08-05 10:28:41 -04:00
d5e695d6c9 update api data for new defaults 2025-08-05 10:28:41 -04:00
3fa0ba2c3e separate channel default from overrides 2025-08-05 10:28:41 -04:00
ff1b2b2f6b PR#4427: work around nfs glitch in ensuredir
Merges #4427
https://pagure.io/koji/pull-request/4427

Fixes: #4417
https://pagure.io/koji/issue/4417
Task can fail with FileExistsError exception if session expires while uploads are happening
2025-08-05 10:25:31 -04:00
f74c3b232f work around nfs glitch in ensuredir 2025-08-05 10:23:58 -04:00
5619342ef3 PR#4432: avoid loading system hub config in unit test
Merges #4432
https://pagure.io/koji/pull-request/4432

Fixes: #4431
https://pagure.io/koji/issue/4431
unit test reads system hub config
2025-08-01 15:12:43 -04:00
c8c1e65f77 fix mock import 2025-08-01 15:08:54 -04:00
9225bd6b44 avoid loading system hub config in unit test 2025-08-01 15:08:54 -04:00
7c2d768d22 PR#4433: fix some utils tests for newer platforms
Merges #4433
https://pagure.io/koji/pull-request/4433

Fixes: #4434
https://pagure.io/koji/issue/4434
unit tests error on F42+
2025-08-01 15:01:40 -04:00
24d9466915 also fix a leaking mock
stop() must be called on the patcher, not the patched object
2025-08-01 09:18:53 -04:00
7bf0ae833a fix some utils tests for newer platforms
1. error message has changed in a library
2. multiprocessing can't handle a local function anymore
2025-08-01 08:27:01 -04:00
930a285e60 PR#4373: allow renaming rpm signatures
Merges #4373
https://pagure.io/koji/pull-request/4373

Fixes: #4415
https://pagure.io/koji/issue/4415
Better handling of complex rpm signatures
2025-07-31 10:21:01 -04:00
f630251944 unit test updates 2025-07-30 18:41:37 -04:00
60008fbc5b typo 2025-07-30 18:41:37 -04:00
a3fc36fa85 allow renaming rpm signatures 2025-07-30 18:41:37 -04:00
311dfde77b PR#4397: Clean up cli for comps management
Merges #4397
https://pagure.io/koji/pull-request/4397

Fixes: #3199
https://pagure.io/koji/issue/3199
RFE: remove-group-pkg

Fixes: #4393
https://pagure.io/koji/issue/4393
Removing a package from a group doesn't work
2025-07-22 10:21:24 -04:00
c45a392146 update mock imports 2025-07-22 10:19:10 -04:00
3d42de2a99 flake8 2025-07-22 10:19:10 -04:00
6b5eb875af docs updates 2025-07-22 10:19:10 -04:00
0f06d749ef unit tests 2025-07-22 10:19:10 -04:00
da3938fbc1 ... 2025-07-22 10:19:10 -04:00
96fc238737 clean up block-group; add unblock-group 2025-07-22 10:19:10 -04:00
fb292aeca1 update sanity check for remove-group 2025-07-22 10:19:10 -04:00
f4435d4a9c remove-group-req too 2025-07-22 10:19:09 -04:00
c5828a4b8e update remove-group-pkg with sanity checks 2025-07-22 10:19:09 -04:00
Jana Cupova
f7464aec2c Add remove-group-pkg CLI command
Fixes: https://pagure.io/koji/issue/3199
2025-07-22 10:19:09 -04:00
f2b13a9ae2 PR#4423: docs: remove repetition in "Writing Koji plugins"
Merges #4423
https://pagure.io/koji/pull-request/4423

Fixes: #4424
https://pagure.io/koji/issue/4424
docs: remove repetition in "Writing Koji plugins
2025-07-16 15:16:50 -04:00
Dmitrii Kuvaiskii
f6a64fbc0b docs: remove repetition in "Writing Koji plugins"
There was a redundant subsection on "Ensuring the user has the required
permissions". The same information is already covered in the main
section. This commit removes this redundant subsection.
2025-07-16 15:16:44 -04:00
adbe584a4c PR#4413: Fix race handling in get_next_build
Merges #4413
https://pagure.io/koji/pull-request/4413

Fixes: #4414
https://pagure.io/koji/issue/4414
Fix race handling in get_next_build
2025-07-10 11:49:54 -04:00
ecfa7766b5 fix a separate race case
In a very close race, one side can first see the duplicate nvr
during the get_build check in new_build, which leads to an
attempt to recycle, which fails because the duplicate is in the
BUILDING state.
2025-07-10 11:48:13 -04:00
bf27153e1e unit test 2025-07-10 11:48:13 -04:00
1cd8585b29 rollback on IntegrityError in get_next_build 2025-07-10 11:48:13 -04:00
134ec54d56 PR#4304: Enable specific number of builds for dist-repo tasks
Merges #4304
https://pagure.io/koji/pull-request/4304

Fixes: #3943
https://pagure.io/koji/issue/3943
RFE : specifying number of builds for dist-repo tasks
2025-07-07 17:32:32 -04:00
32d74ec28c Enable specific number of builds for dist-repo tasks
Fixes: https://pagure.io/koji/issue/3943
2025-07-07 17:32:26 -04:00
b3ea825a4f PR#4418: add jinja2 in requirements.txt
Merges #4418
https://pagure.io/koji/pull-request/4418
2025-07-07 11:57:57 -04:00
46be4dacb0 add jinja2 in requirements.txt 2025-07-07 09:52:09 +00:00
2083513aab PR#4411: support --wait-repo/--wait-build in wrapper-rpm command
Merges #4411
https://pagure.io/koji/pull-request/4411

Fixes: #4412
https://pagure.io/koji/issue/4412
 support --wait-repo/--wait-build in wrapper-rpm command
2025-07-02 16:29:15 -04:00
c9578b5163 unit test 2025-07-02 15:58:35 -04:00
91d743c35a support --wait-repo/--wait-build in wrapper-rpm command 2025-07-02 15:58:35 -04:00
2df628b41f PR#4392: add listBuilds query params for promotion data
Merges #4392
https://pagure.io/koji/pull-request/4392
2025-06-26 14:34:03 -04:00
fc4f197b6a add listBuilds query params for promotion data 2025-06-26 14:33:03 -04:00
c60830797d PR#4311: kojivmd: refuse tasks instead of ignoring them
Merges #4311
https://pagure.io/koji/pull-request/4311

Fixes: #4312
https://pagure.io/koji/issue/4312
kojivmd: refuse tasks instead of ignoring them
2025-06-26 14:31:19 -04:00
fe1127cedb kojivmd: refuse tasks instead of ignoring them 2025-06-26 14:29:30 -04:00
724dbe317f PR#4150: fix callnum lookup on hub
Merges #4150
https://pagure.io/koji/pull-request/4150

Fixes: #4149
https://pagure.io/koji/issue/4149
callnum not recorded for sessions
2025-06-26 14:27:01 -04:00
95325009a5 fix unit tests 2025-06-25 15:46:31 -04:00
ffd1f38cb2 test_client_session.py 2025-06-25 15:21:11 -04:00
255eadcf2f fix callnum lookup on hub
Fixes https://pagure.io/koji/issue/4149
2025-06-25 15:21:11 -04:00
45c290dd74 PR#4387: repo requests web ui
Merges #4387
https://pagure.io/koji/pull-request/4387

Fixes: #4289
https://pagure.io/koji/issue/4289
repo requests web ui
2025-06-12 13:24:20 +02:00
c6e368200e html fixes 2025-06-12 13:24:12 +02:00
c04784cb14 fix malformed html element 2025-06-12 13:24:12 +02:00
e8b02860fb fix missing tr element 2025-06-12 13:24:12 +02:00
cd36bb2826 test_pages updates
This fixes issues with test_pages that I found while checking
coverage. The environ dict was recycled across each call in the loop,
but those calls can modify it, leaking data from one pass to another.
Also, the mocking for _getServer was not placing the session in the
environ, which was causing the tests to miss some cases.
2025-06-12 13:24:12 +02:00
c7a5622934 update test_pages to cover new code 2025-06-12 13:24:12 +02:00
c8ae2835fa fix json handling in template 2025-06-12 13:24:12 +02:00
cc4d88e99e install svg file 2025-06-12 13:24:12 +02:00
52cc8b9d41 flake8 2025-06-12 13:24:12 +02:00
9163e476cb fix None display in query form 2025-06-12 13:24:12 +02:00
1d929d0d71 update call data for unit test 2025-06-12 13:24:12 +02:00
140aeacda0 port new templates to jinja 2025-06-12 13:24:12 +02:00
a2f9fbfd06 typo 2025-06-12 13:24:12 +02:00
357587a57c repo requests web ui
* new page for request details
* new page for querying requests
* add links in taginfo and taskinfo pages
* show more data in repoinfo page
2025-06-12 13:24:12 +02:00
573bd41654 PR#4383: handle cross-volume draft symlinks
Merges #4383
https://pagure.io/koji/pull-request/4383

Fixes: #4386
https://pagure.io/koji/issue/4386
Promoting a draft build can leave broken symlink at original draft location
2025-06-12 13:23:08 +02:00
456263b109 clean up test dir 2025-06-12 13:22:59 +02:00
88efb9dbef typo 2025-06-12 13:22:59 +02:00
12f9d239df unrelated docs typo 2025-06-12 13:22:59 +02:00
8b98a949f7 update volume docs 2025-06-12 13:22:59 +02:00
ad071502c1 update tests for add_volume 2025-06-12 13:22:59 +02:00
51c130e290 more unit tests 2025-06-12 13:22:59 +02:00
cd31945637 don't require new_binfo 2025-06-12 13:22:59 +02:00
40d7a30f1b require volume toplink to exist 2025-06-12 13:22:59 +02:00
3a7656015f check/create volume toplink in add_volume 2025-06-12 13:22:59 +02:00
a7bc882aa5 initial fix 2025-06-12 13:22:59 +02:00
cf95af0992 test showing an issue with cross volume promotion links 2025-06-12 13:22:59 +02:00
fca44b55b2 PR#4355: listUsers excepts userType as int, list and Nonetype
Merges #4355
https://pagure.io/koji/pull-request/4355

Fixes: #4325
https://pagure.io/koji/issue/4325
listUsers doesn't behave according to docs
2025-06-02 11:21:41 +02:00
037d9e468e listUsers excepts userType as int, list and Nonetype
Fixes: https://pagure.io/koji/issue/4325
2025-06-02 11:21:21 +02:00
b2eb8d94ee PR#4403: schemas: wsl file suffix
Merges #4403
https://pagure.io/koji/pull-request/4403

Fixes #4404
https://pagure.io/koji/issue/4404
2025-06-02 10:17:45 +02:00
Simon de Vlieger
d16c16a668
schemas: wsl file suffix
The "new" WSL images need a WSL suffix. Currently this is managed on a
per-instance basis but it's a bit of work to sync across them.

Instead add it be default.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-05-30 21:09:54 +02:00
40e6286bd6 PR#4391: Less log noise for empty or invalid requests
Merges #4391
https://pagure.io/koji/pull-request/4391

Fixes #4394
https://pagure.io/koji/issue/4394
2025-05-20 14:31:04 +02:00
733294c87d Less log noise for empty or invalid requests 2025-05-20 14:30:58 +02:00
c44a33ceb6 PR#4370: adjust upload offset and overwrite logic
Merges #4370
https://pagure.io/koji/pull-request/4370

Fixes: #4371
https://pagure.io/koji/issue/4371
Surprising upload failure on koji.fp.o
2025-05-20 14:30:09 +02:00
b71e690b94 drop unused import in test 2025-05-20 14:30:01 +02:00
85c1a1b2c9 adjust upload offset and overwrite logic 2025-05-20 14:30:01 +02:00
4f00e8e245 PR#4219: Add archive types for erofs and squashfs
Merges #4219
https://pagure.io/koji/pull-request/4219

Fixes: #4218
https://pagure.io/koji/issue/4218
koji doesn't know to archive erofs images produced by Kiwi
2025-05-20 14:28:39 +02:00
Davide Cavalca
eed5c7377e Add archive types for erofs and squashfs
Fixes: #4218
2025-05-20 14:28:32 +02:00
3f58c4c6b8 PR#4380: Restart kojivmd in same way as kojid
Merges #4380
https://pagure.io/koji/pull-request/4380

Fixes #4381
https://pagure.io/koji/issue/4381
2025-05-20 14:14:21 +02:00
24bfa3e335 Restart kojivmd in same way as kojid
Related: https://pagure.io/koji/issue/4381
2025-05-20 14:14:13 +02:00
83b4fb5aeb PR#4388: kojikamid fixes
Merges #4388
https://pagure.io/koji/pull-request/4388

Fixes #4398
https://pagure.io/koji/issue/4398
2025-05-20 10:34:12 +02:00
c863895c3e kojikamid fixes
defusedxml needn't be available in older cygwin envs
typo in md5constructor usage

Related: https://pagure.io/koji/issue/4398
2025-05-20 10:33:04 +02:00
e17671c51c PR#4316: ensure repos dir
Merges #4316
https://pagure.io/koji/pull-request/4316

Fixes: #4315
https://pagure.io/koji/issue/4315
In clean installation topdir/repos is not created
2025-05-19 09:48:28 +02:00
274395a7c5 fix unit test 2025-05-19 09:48:20 +02:00
7e71f18212 ensure repos dir
Fixes https://pagure.io/koji/issue/4315
2025-05-19 09:48:20 +02:00
2a7585bc99 PR#4389: set user of kojikamid service to Administrator
Merges #4389
https://pagure.io/koji/pull-request/4389

Fixes: #4390
https://pagure.io/koji/issue/4390
kojikamid service created by cygrunsrv isn't owned by Administrator
2025-05-19 09:40:27 +02:00
cdf14ac781 set user of kojikamid service to Administrator 2025-05-15 16:21:53 +00:00
c057c290d0 PR#4346: port kojiweb to jinja2
Merges #4346
https://pagure.io/koji/pull-request/4346

Fixes: #4361
https://pagure.io/koji/issue/4361
kojiweb jinja2 port
2025-05-07 14:07:12 +02:00
132a734347 flake8 2025-05-07 14:07:04 +02:00
8bc1c1b466 fix bandit B704 2025-05-07 14:07:04 +02:00
2270a85687 drop custom coverage config 2025-05-07 14:07:04 +02:00
64d6b3f0f7 drop builder changes for now 2025-05-07 14:07:04 +02:00
96e7cc1634 minor output compatibility fixes
- suppress "None" in api page
- show yes/no for dist repo flag
2025-05-07 14:07:04 +02:00
5a6c6757df fix template install path 2025-05-07 14:07:04 +02:00
aa2192d233 alternate coverage config to check template coverage
E.g. using https://github.com/MrSenko/coverage-jinja-plugin
2025-05-07 14:07:04 +02:00
0fa58716cc move templates into subdir 2025-05-07 14:07:04 +02:00
4e407c7f1b fixes 2025-05-07 14:07:03 +02:00
0321b7128b Unit tests, fixes, and cleanup 2025-05-07 14:07:03 +02:00
402f319283 rename template files to .html.j2 2025-05-07 14:07:03 +02:00
dee1127ce8 Initial jinja2 porting work 2025-05-07 14:07:03 +02:00
dbb60e91f3 PR#4385: Add unit tests for add-external-repo
Merges #4385
https://pagure.io/koji/pull-request/4385
2025-05-06 17:19:24 +02:00
97b1f802e3 Add unit tests for add-external-repo 2025-05-06 15:43:01 +02:00
b63ef8ae3d PR#4382: deprecate pathinfo.tmpdir
Merges #4382
https://pagure.io/koji/pull-request/4382

Fixes #4384
https://pagure.io/koji/issue/4384
2025-05-06 12:50:15 +02:00
666d263b65 deprecate pathinfo.tmpdir 2025-05-05 16:04:35 -04:00
67974ae7d8 PR#4322: Return BuildError when kickstart file is not exists
Merges #4322
https://pagure.io/koji/pull-request/4322

Fixes: #4190
https://pagure.io/koji/issue/4190
fetchKickstart could fail with better error in case of non-existent kickstart
2025-05-05 10:24:18 +02:00
dd6b839330 Return BuildError when kickstart file is not exists
Fixes: https://pagure.io/koji/issue/4190
2025-05-05 10:24:10 +02:00
57473d848d PR#4375: Update Cheetah3 to CT3 PyPI repository
Merges #4375
https://pagure.io/koji/pull-request/4375

Fixes: #4374
https://pagure.io/koji/issue/4374
Cheetah3 is hosted under CT3 in PyPi now
2025-04-29 17:30:00 -04:00
a149d9b7a9 Update Cheetah3 to CT3 PyPI repository
Project is using new repo due to 2FA changes on PyPI
https://cheetahtemplate.org/news.html#id5

Related: https://pagure.io/koji/issue/4374
2025-04-29 17:29:54 -04:00
be3407dcd5 PR#4349: Raise weight cap
Merges #4349
https://pagure.io/koji/pull-request/4349

Fixes #4360
https://pagure.io/koji/issue/4360
2025-04-29 16:39:15 +02:00
e5cee65d75 Raise weight cap
Currently weight is limited to 4.5. As they are now builder with very
different setups (number of cpus/memory) it seems to be better to raise
the limit and leave it to fill larger builders capacities.
2025-04-29 16:39:08 +02:00
742e5de5fa PR#4354: add-external-repo excepts comma-separated and space-separated list
Merges #4354
https://pagure.io/koji/pull-request/4354

Fixes: #4353
https://pagure.io/koji/issue/4353
CLI: add-external-repo doesn't parse archlist according to help
2025-04-29 16:37:40 +02:00
b7488d1c96 add-external-repo excepts comma-separated and space-separated list
Fixes: https://pagure.io/koji/issue/4353
2025-04-29 16:37:31 +02:00
26198f6114 Fix flake8 and unit test 2025-04-29 16:30:33 +02:00
15d604f32e download-build: allow fallback to unsigned with --key
If you pass --key to download-build and signed packages aren't
available, Koji will skip the unsigned package, or error out.
This adds a modified behavior controlled by the new
--fallback-unsigned arg. If this is passed with --key, unsigned
copies will be downloaded for packages for which no signed copy
can be found.

This is primarily intended to work with a proposed Bodhi feature:
https://github.com/fedora-infra/bodhi/pull/5859 . That would
make Bodhi's `bodhi updates download` command automatically try
to download signed copies, but I think it would be best if it
falls back to getting unsigned copies if that doesn't work. Just
failing out entirely seems wrong for that case. Implementing the
fallback in Bodhi itself is more awkward and messy than adding it
in Koji, and it may be useful for others in Koji I guess.

Note there are two distinct 'no signed copies' cases. In the
simple one, queryRPMSigs tells us Koji has no record of the
package ever being signed with the key in question. In this case
we don't bother trying to download a signed copy. In the other
case, queryRPMSigs tells us the package *has* been signed with
the key, but it turns out that signed copy has been garbage-
collected and we can no longer download it. In this case we have
to catch the failure on the download attempt and retry the
download with sigkey set to None.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-04-29 16:25:37 +02:00
fd1c383909 PR#4224: Match longest extension first for archivetype
Merges #4224
https://pagure.io/koji/pull-request/4224

Fixes: #4291
https://pagure.io/koji/issue/4291
Match longest extension first for archivetype
2025-04-29 16:22:13 +02:00
7be49b3a04 fix unit test 2025-04-29 16:22:07 +02:00
cbfa648549 make sure extension matching is case insensitive 2025-04-29 16:22:07 +02:00
1b3990cec9 simplify extension match
this avoids errors if the ext value contains special characters
2025-04-29 16:22:07 +02:00
6afde19a8a match longest archivetype extension first 2025-04-29 16:22:07 +02:00
18fa1c3fea PR#4145: report tag_external_repos.arches in query_history
Merges #4145
https://pagure.io/koji/pull-request/4145

Fixes: #4290
https://pagure.io/koji/issue/4290
report tag_external_repos.arches in query_history
2025-04-29 16:20:48 +02:00
66335f03e5 unit test 2025-04-29 16:20:41 +02:00
d9d3c6238a report tag_external_repos.arches in query_history 2025-04-29 16:20:41 +02:00
023e5d0e46 PR#4268: ensure macros and env values passed to mock are strings
Merges #4268
https://pagure.io/koji/pull-request/4268

Fixes: #4279
https://pagure.io/koji/issue/4279
Mock can error if a non-string is placed in the config
2025-04-29 16:19:16 +02:00
d9795530d7 ensure macros and env values passed to mock are strings 2025-04-29 16:19:08 +02:00
9e0d9612c9 PR#4259: allow setting ttl in protonmsg
Merges #4259
https://pagure.io/koji/pull-request/4259

Fixes: #4260
https://pagure.io/koji/issue/4260
rfe: set ttl in protonmsg
2025-04-29 16:17:27 +02:00
026abb8311 unit test 2025-04-29 16:17:20 +02:00
8a472ed94e allow setting ttl in protonmsg 2025-04-29 16:17:20 +02:00
fa0c558912 PR#4171: koji-gc: Add ccache to koji-gc options
Merges #4171
https://pagure.io/koji/pull-request/4171

Fixes: #4116
https://pagure.io/koji/issue/4116
koji-gc: dedicated Kerberos credential cache to avoid conflicts with root user's credential cache
2025-04-29 16:15:59 +02:00
c603ff6ab6 koji-gc: Add ccache to koji-gc options
Fixes: https://pagure.io/koji/issue/4116
2025-04-29 16:15:52 +02:00
8ad473b6f2 PR#4287: Add new option for mock option - bootstrap_image_ready
Merges #4287
https://pagure.io/koji/pull-request/4287

Fixes: #3958
https://pagure.io/koji/issue/3958
RFE: New option for the Mock's option bootstrap_image_ready
2025-04-29 16:14:24 +02:00
1c923edcc8 Add new option for mock option - bootstrap_image_ready
Fixes: https://pagure.io/koji/issue/3958
2025-04-29 16:14:16 +02:00
9ba4398211 PR#4123: download-logs: prefer getBuildLogs for builds
Merges #4123
https://pagure.io/koji/pull-request/4123

Fixes: #4122
https://pagure.io/koji/issue/4122
download-logs --nvr fails to get logs in many cases
2025-04-29 16:11:39 +02:00
8b5b516227 fall back to task files for non-complete builds 2025-04-29 16:11:30 +02:00
32a609925d download-logs: prefer getBuildLogs for builds 2025-04-29 16:11:30 +02:00
f88eddb115 PR#4368: koji 1.35.3 release notes and version bump
Merges #4368
https://pagure.io/koji/pull-request/4368

Fixes: #4367
https://pagure.io/koji/issue/4367
Koji 1.35.3 release notes
2025-04-28 15:34:00 -04:00
3df7de14ee include pending PRs 2025-04-28 14:00:23 -04:00
b521a1740f koji 1.35.3 release notes and version bump 2025-04-28 14:00:23 -04:00
b21cb0bac5 PR#4335: Honor %{_sbindir} in make install
Merges #4335
https://pagure.io/koji/pull-request/4335

Fixes: #4338
https://pagure.io/koji/issue/4338
Better handling of sbindir macro
2025-04-17 10:17:59 -04:00
52cecf06c8 Use make_with_dirs macro
This effectively replaces most of https://pagure.io/koji/pull-request/4297
2025-04-17 10:13:41 -04:00
18528e563c Allow overriding sbin directory
This fixes the Koji build for Fedora 42+, where on an installed system,
`/sbin` and `/usr/sbin` are symlinks to `/usr/bin`; see:
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin

On a build root the symlink does not exist, so attempts in the spec to
manipulate binaries in `%{_sbindir}/` fail as these binaries are
installed to `%{buildroot}/usr/sbin` while the script is looking for
`%{buildroot}/usr/bin`

The default value is set to `/usr/sbin` so not passing `SBINDIR` when
installing results in the current behavior being preserved.

Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2025-04-17 10:13:41 -04:00
b6c9ce7a59 PR#4363: Revert py2 portion of mr#4214
Merges #4363
https://pagure.io/koji/pull-request/4363

Fixes: #4351
https://pagure.io/koji/issue/4351
Builds fail on py2 builders
2025-04-17 10:12:31 -04:00
204b45edcc fix py2 test failure
fix suggested by julian8628
2025-04-17 10:10:53 -04:00
26f0e3e98a drop obsolete mock 2025-04-17 10:10:53 -04:00
d970eeeb5d fix unit tests 2025-04-17 10:10:53 -04:00
60761e6936 revert py2 portion of mr#4214
See https://pagure.io/koji/pull-request/4214
2025-04-17 10:10:53 -04:00
91ec3d58e4 PR#4232: handle arch-duplicate logs in importImageInternal
Merges #4232
https://pagure.io/koji/pull-request/4232

Fixes: #4231
https://pagure.io/koji/issue/4231
Error importing build log with 1.35.1
2025-04-15 10:55:49 -04:00
62021b8119 unit tests 2025-04-15 10:53:50 -04:00
1c9b27690b handle arch-duplicate logs in importImageInternal 2025-04-15 10:53:50 -04:00
4729cf8687 PR#4358: Fix min_avail calculation
Merges #4358
https://pagure.io/koji/pull-request/4358

Fixes: #4359
https://pagure.io/koji/issue/4359
 Fix min_avail calculation
2025-04-08 15:51:27 -04:00
b3ba2fac91 unit test 2025-04-08 15:44:23 -04:00
9a161f9146 fix min_avail calculation 2025-04-08 15:44:23 -04:00
caeac8e7c7 PR#4357: Fix two unit test issues
Merges #4357
https://pagure.io/koji/pull-request/4357
2025-03-31 11:15:40 +02:00
c8e1ca7732 fix pathinfo side effect from unit test 2025-03-31 11:15:32 +02:00
785ef7df38 fix potential stall in test_gssapi.py 2025-03-31 11:15:32 +02:00
28a2da913b PR#4270: keep latest default repo for build tags
Merges #4270
https://pagure.io/koji/pull-request/4270

Fixes: #4276
https://pagure.io/koji/issue/4276
Kojira can leave build tags with no repo at all

Fixes: #4295
https://pagure.io/koji/issue/4295
kojiria seems to be gc'ing latest repos-dist
2025-03-31 11:12:16 +02:00
3f0de62389 unit test 2025-03-31 11:11:55 +02:00
e691d28cae target check makes no sense for dist repos 2025-03-31 11:11:55 +02:00
c0690c821f avoid expiring latest dist repos also
Fixes: https://pagure.io/koji/issue/4295
2025-03-31 11:11:55 +02:00
d159356713 unit tests 2025-03-31 11:11:55 +02:00
c4948587a3 recheck_period for expire check 2025-03-31 11:11:55 +02:00
0f78b9adb0 tweak unit test 2025-03-31 11:11:55 +02:00
8fb2d9acc1 kojira: adjust expire_check 2025-03-31 11:11:55 +02:00
6113ef71c1 PR#4303: Fix tasks url creation
Merges #4303
https://pagure.io/koji/pull-request/4303

Fixes: #4302
https://pagure.io/koji/issue/4302
In the deployed koji 1.35.1, the tasks link from the userinfo page is invalid
2025-03-21 15:04:10 +01:00
f4328d5969 Fix tasks url creation
Related: https://pagure.io/koji/issue/4302
2025-03-21 15:04:03 +01:00
7589738557 PR#4310: fix option data types and add unit test
Merges #4310
https://pagure.io/koji/pull-request/4310

Relates: #4308
https://pagure.io/koji/issue/4308
Wrong types in default hub values
2025-03-21 14:52:45 +01:00
eb9ada8eb5 test config dtypes 2025-03-21 14:52:37 +01:00
a7d7d9c1f5 move config map and add unit tests 2025-03-21 14:52:37 +01:00
3e48c8597f PR#4125: partial draft support for cg_import
Merges #4125
https://pagure.io/koji/pull-request/4125

Relates: #4124
https://pagure.io/koji/issue/4124
Support draft builds for CGs
2025-03-20 15:54:29 +01:00
1662bb8ee9 add epoch option to reserve-cg command 2025-03-20 15:54:22 +01:00
cee0b21061 update unit test 2025-03-20 15:54:22 +01:00
e172a9ca08 update metadata doc 2025-03-20 15:54:22 +01:00
2fabf3d74f cg draft support 2025-03-20 15:54:22 +01:00
33a76afab4 PR#4341: Fix python2 unittests
Merges #4341
https://pagure.io/koji/pull-request/4341

Fixes: #4340
https://pagure.io/koji/issue/4340
fix python2 unit tests
2025-03-13 14:23:59 +01:00
6c98b602e5 Fix python2 unittests
Fixes: https://pagure.io/koji/issue/4340
2025-03-07 22:03:57 +01:00
30cc20652d PR#4334: work around parse_qs behavior in python < 3.11
Merges #4334
https://pagure.io/koji/pull-request/4334

Fixes: #4332
https://pagure.io/koji/issue/4332
parse_qs fails on python 3.9
2025-03-03 16:34:21 +01:00
28b9ef7c64 avoid duplicate environ.get call 2025-02-25 11:10:45 -05:00
abf33cea63 unit test 2025-02-24 12:17:24 -05:00
af18c59623 work around parse_qs behavior in python < 3.11 2025-02-24 12:17:24 -05:00
8e55098458 PR#4330: drop custom threadlocal implementation
Merges #4330
https://pagure.io/koji/pull-request/4330

Fixes: #4331
https://pagure.io/koji/issue/4331
2025-02-24 12:55:27 +01:00
ad81bf3f61 drop custom threadlocal implementation 2025-02-23 21:08:57 -05:00
00a01d2522 PR#4328: use unittest.mock instead of mock
Merges #4328
https://pagure.io/koji/pull-request/4328

Fixes: #4327
https://pagure.io/koji/issue/4327
Import mock from unittest
2025-02-20 13:20:49 +01:00
root
5bdcb2a3a5 use unittest.mock instead of mock 2025-02-19 15:24:33 +01:00
9e2e7023fe PR#4326: Remove fp file using os.unlink instead of using the delete option of NamedTemporaryFile
Merges #4326
https://pagure.io/koji/pull-request/4326

Fixes: #4320
https://pagure.io/koji/issue/4320
Tests failing
2025-02-19 12:49:33 +01:00
root
5e3b697599 Remove fp file using os.unlink instead of using delete option of NamedTemporaryFile 2025-02-18 15:52:58 +01:00
77d56ccd08 PR#4314: Release notes for 1.35.2
Merges #4314
https://pagure.io/koji/pull-request/4314

Fixes: #4313
https://pagure.io/koji/issue/4313
1.35.2 release notes
2025-02-18 12:16:54 +01:00
7e79d42554 Release notes for 1.35.2
Related: https://pagure.io/koji/issue/4313
2025-02-18 12:15:08 +01:00
4270cdd4c1 PR#4277: kojira: split currency and regen
Merges #4277
https://pagure.io/koji/pull-request/4277

Fixes: #4278
https://pagure.io/koji/issue/4278
repo requests can be delayed of there are a lot of tags with auto regen
2025-02-18 12:09:18 +01:00
47c7d93767 Fix unit tests 2025-02-18 12:08:31 +01:00
67893189f7 more tests 2025-02-18 11:56:10 +01:00
2531412ad2 fixes 2025-02-18 11:56:10 +01:00
dc17a4f093 adjust unit test 2025-02-18 11:56:10 +01:00
80e236dc14 unify thread handler loops 2025-02-18 11:56:10 +01:00
00832224f2 unify thread init and include autoregen 2025-02-18 11:56:10 +01:00
941771e7b1 partial: split autoregen 2025-02-18 11:56:10 +01:00
6351c06ab3 print task info if repo request fails 2025-02-18 11:56:10 +01:00
1382934404 avoid duplicate query 2025-02-18 11:56:10 +01:00
28159f6a47 PR#4297: koji.spec Makefile /usr/sbin everywhere
Merges #4297
https://pagure.io/koji/pull-request/4297

Fixes: #4296
https://pagure.io/koji/issue/4296
F42: sbindir is now bindir
2025-02-18 11:13:58 +01:00
f67b9db83a koji.spec Makefile /usr/sbin everywhere
Fixes: https://pagure.io/koji/issue/4296
2025-02-14 22:11:23 +01:00
5e1584ec88 PR#4285: Improve min_event handling in RepoWatcher
Merges #4285
https://pagure.io/koji/pull-request/4285

Fixes: #4284
https://pagure.io/koji/issue/4284
RepoWatcher can return an old repo if no min_event specified
2025-02-10 14:15:46 +01:00
a927e0b12c unit test 2025-02-10 14:15:38 +01:00
109a5e7f21 preserve min_event for waitrepo task 2025-02-10 14:15:38 +01:00
88c18bad27 RepoWatcher: always request for non-anon case 2025-02-10 14:15:38 +01:00
68c865efaa PR#4309: Fix default types
Merges #4309
https://pagure.io/koji/pull-request/4309

Fixes: #4308
https://pagure.io/koji/issue/4308
Wrong types in default hub values
2025-02-10 14:14:05 +01:00
3f8f697a1c Fix default types
Related: https://pagure.io/koji/issue/4308
2025-02-06 15:21:38 +01:00
7d2a29c162 PR#4210: avoid malformed tasks for updated signatures
Merges #4210
https://pagure.io/koji/pull-request/4210

Fixes: #4288
https://pagure.io/koji/issue/4288
Updated task signatures can lead to "malformed task" display
2025-02-05 14:42:36 +01:00
acbb8cc521 avoid malformed tasks for update signatures 2025-02-05 14:42:29 +01:00
7904e4e079 PR#4209: include tag name in newRepo args
Merges #4209
https://pagure.io/koji/pull-request/4209

Fixes: #4208
https://pagure.io/koji/issue/4208
More readable newRepo Tasks
2025-02-04 12:45:18 +01:00
74fe5301a2 include tag name in newRepo args
Fixes https://pagure.io/koji/issue/4208
2025-02-04 12:45:11 +01:00
fb2bbaf229 PR#4307: choose correct import machinery in unit test
Merges #4307
https://pagure.io/koji/pull-request/4307

Fixes: #4306
https://pagure.io/koji/issue/4306
failures in tests/test_lib/test_plugin.py
2025-02-03 14:43:04 +01:00
c3288baa89 choose correct import machinery in unit test
Fixes https://pagure.io/koji/issue/4306
2025-02-03 08:14:15 -05:00
559dae7005 PR#4139: Remove _singleRow and _multiRow import to kojihub
Merges #4139
https://pagure.io/koji/pull-request/4139

Fixes: #3590
https://pagure.io/koji/issue/3590
Remove _singleRow and _multiRow from import in kojihub.py
2025-01-27 11:09:44 +01:00
9c6aec7755 Remove _singleRow and _multiRow import to kojihub
Fixes: https://pagure.io/koji/issue/3590
2025-01-23 18:04:49 +01:00
b7d193c418 PR#4021: newRepo: support hints for oldrepo value
Merges #4021
https://pagure.io/koji/pull-request/4021

Fixes: #4129
https://pagure.io/koji/issue/4129
Support hints for oldrepo
2025-01-10 10:11:57 +01:00
0d9777b785 add unit test. drop redundant call arg 2025-01-10 10:11:47 +01:00
1dee091b78 fix rebase issue and missing return values 2025-01-10 10:11:47 +01:00
f8adc618fc newRepo: support hints for oldrepo value 2025-01-10 10:11:47 +01:00
d77daaec63 PR#4126: consistent daemon exit codes
Merges #4126
https://pagure.io/koji/pull-request/4126

Fixes: #4131
https://pagure.io/koji/issue/4131
 consistent daemon exit codes
2025-01-10 10:09:15 +01:00
dbdeaec923 exit codes for kojivmd 2025-01-10 10:09:07 +01:00
e080e11e0a exit with an error in kojira on auth failures 2025-01-10 10:09:07 +01:00
310d087eca PR#4292: Update py2 tests
Merges #4292
https://pagure.io/koji/pull-request/4292

Fixes: #4248
https://pagure.io/koji/issue/4248
tests/test_lib should be enabled for py2
2025-01-08 12:53:32 +01:00
3a4029a097 Update py2 tests
Py2 test updates for https://pagure.io/koji/pull-request/4214

Related: https://pagure.io/koji/issue/4248
2025-01-08 12:53:24 +01:00
251a40facc PR#4245: combination of test-requirments(-py2).txt
Merges #4245
https://pagure.io/koji/pull-request/4245

Fixes: #4244
https://pagure.io/koji/issue/4244
test-requirements-py2.txt can be merged into test-requirements.txt
2025-01-07 13:37:47 +01:00
8749db575e combination of test-requirments(-py2).txt 2025-01-07 13:37:40 +01:00
177ba3510f PR#4202: RawHeader: fix store offsets when duplicate tags are present
Merges #4202
https://pagure.io/koji/pull-request/4202

Fixes: #4203
https://pagure.io/koji/issue/4203
RawHeader miscalculates offsets when there are duplicate tags
2025-01-07 12:49:06 +01:00
3696539c26 fix misleading comment 2025-01-07 12:48:59 +01:00
5973d7a13b show dups in header dump 2025-01-07 12:48:59 +01:00
1019b3af35 fix store offsets when duplicate tags are present
For context, see https://pagure.io/koji/issue/4200

If an rpm has duplicate tags in a header, Koji would miscalculate the
start of that data store.
2025-01-07 12:48:59 +01:00
d1c0d77290 PR#4249: enable tests/test_lib for py2
Merges #4249
https://pagure.io/koji/pull-request/4249

Fixes: #4248
https://pagure.io/koji/issue/4248
tests/test_lib should be enabled for py2
2025-01-06 10:55:49 +01:00
c8a27e525a unittest: enabling tests/test_lib for py2 2025-01-06 10:55:41 +01:00
51d8535eee use OSError instead of FileNotFoundError due to PY2 support 2025-01-06 10:55:41 +01:00
b04396d333 fix removeNonprintable for PY2 2025-01-06 10:55:41 +01:00
951cee051f resort tests from lib to hub for py2 2025-01-06 10:55:41 +01:00
aa54d705bc PR#4286: Adjust download-build messages
Merges #4286
https://pagure.io/koji/pull-request/4286

Fixes: #4283
https://pagure.io/koji/issue/4283
koji download-build doesn't work for scratch build?
2025-01-06 10:00:21 +01:00
dc023a3eb1 unit test 2025-01-03 15:51:17 -05:00
a4fa9595f5 tweak error message 2025-01-03 15:48:28 -05:00
e4ada43912 unit test 2025-01-03 15:44:07 -05:00
661a5cb3e8 adjust usage for download-build command 2025-01-03 15:37:54 -05:00
cd25b8ddde PR#4271: Drop cvs requirement.
Merges #4271
https://pagure.io/koji/pull-request/4271

Fixes: #4265
https://pagure.io/koji/issue/4265
Drop explicit cvs requires?
2024-12-09 13:00:41 +01:00
fd026e7353 Document supported SCMs
Related: https://pagure.io/koji/issue/4265
2024-12-09 13:00:33 +01:00
af275200ce Drop cvs requirement.
Fixes https://pagure.io/koji/issue/4265 and helps moving on in
rhbz#2319897.
2024-12-09 13:00:33 +01:00
2634e19085 PR#4267: fix repo handing for bare wrapperRPM task
Merges #4267
https://pagure.io/koji/pull-request/4267

Fixes: #4266
https://pagure.io/koji/issue/4266
no repo request issued for wrapper-rpm builds
2024-12-05 16:16:21 +01:00
d18aacfc5a fix repo handing for bare wrapperRPM task
Fixes: https://pagure.io/koji/issue/4266
2024-12-05 16:16:13 +01:00
fccf4fa3f9 PR#4274: Don't prepopulate log list for mavenBuild
Merges #4274
https://pagure.io/koji/pull-request/4274

Fixes: #4273
https://pagure.io/koji/issue/4273
mavenBuild now fails on missing log files
2024-12-04 17:16:42 +01:00
9a6b666926 include the checkout logs in task result 2024-12-04 11:28:32 +01:00
51f5a4ebef Don't prepopulate log list for mavenBuild
Related: https://pagure.io/koji/issue/4273
2024-12-03 16:54:09 +01:00
9acd993957 PR#4167: adjust arches warning message for external repo check
Merges #4167
https://pagure.io/koji/pull-request/4167

Relates: #4165
https://pagure.io/koji/issue/4165
Log of kojira floods with unclean messages
2024-12-03 14:14:11 +01:00
0929447fc9 adjust warning message 2024-12-03 14:14:03 +01:00
770da96ee0 unit tests 2024-12-03 14:14:03 +01:00
086c940f45 PR#4140: kojira: allow setting ccache in config
Merges #4140
https://pagure.io/koji/pull-request/4140

Fixes: #4137
https://pagure.io/koji/issue/4137
[1.34.0] ccache settings can't be changed in kojira
2024-11-25 14:39:28 +01:00
37a3d4e4dd kojira: allow setting ccache in config
patch contributed by frank-mdc
Fixes https://pagure.io/koji/issue/4137
2024-11-25 14:39:21 +01:00
0a7e76d9ad PR#4214: Fix for reading config files when contains UTF-8 chars
Merges #4214
https://pagure.io/koji/pull-request/4214

Fixes: #4191
https://pagure.io/koji/issue/4191
[1.34.0] Reading the config files can fail if they contain UTF-8 characters.
2024-11-20 17:05:55 +01:00
e1b55ec23c add unit test 2024-11-20 15:37:07 +01:00
729c954f3d Fix for reading config files when contains UTF-8 chars
Fixes: https://pagure.io/koji/issue/4191
2024-11-13 20:12:18 +01:00
ad221feb8b PR#4196: flake8 fix
Merges #4196
https://pagure.io/koji/pull-request/4196
2024-11-12 16:07:33 -05:00
4845ce3a92 flake8 fix 2024-11-12 16:07:28 -05:00
5a46df53e2 PR#4152: stabilize order for listTagged
Merges #4152
https://pagure.io/koji/pull-request/4152

Fixes: #4162
https://pagure.io/koji/issue/4162
stabilize order for listTagged
2024-11-12 15:56:11 -05:00
a128125bd1 stabilize order for listTagged 2024-11-12 15:49:31 -05:00
096a497938 PR#4155: CLI: Print client version when unable to connect to server
Merges #4155
https://pagure.io/koji/pull-request/4155

Fixes: #4151
https://pagure.io/koji/issue/4151
CLI: koji version fails for unreachable hub
2024-11-12 15:47:08 -05:00
d19bc73b63 CLI: Print client version when unable to connect to server
Fixes: https://pagure.io/koji/issue/4151
2024-11-12 15:47:03 -05:00
c4b6507696 PR#4207: fix latest symlink check
Merges #4207
https://pagure.io/koji/pull-request/4207

Fixes: #4206
https://pagure.io/koji/issue/4206
latest symlink generation stopped working in 1.35
2024-11-12 13:52:51 -05:00
75a214c0a2 fix latest symlink check
Fixes https://pagure.io/koji/issue/4206
2024-11-12 13:50:53 -05:00
a9e56fa44c PR#4170: provide user for scm policy check
Merges #4170
https://pagure.io/koji/pull-request/4170

Fixes: #4172
https://pagure.io/koji/issue/4172
provide user for scm policy check
2024-11-01 10:07:32 -04:00
dd221d4839 unit test 2024-11-01 10:07:26 -04:00
41c7cb7f89 provide user for scm policy check 2024-11-01 10:07:26 -04:00
d86684103f PR#4079: www: fix for non-existent target_info
Merges #4079
https://pagure.io/koji/pull-request/4079

Fixes: #4078
https://pagure.io/koji/issue/4078
taskInfo webpage failure
2024-10-31 10:50:45 -04:00
ef61ba620f www: fix for non-existent target_info
Related: https://pagure.io/koji/issue/4078
2024-10-31 10:50:40 -04:00
ac22ca9a3b PR#4251: drop cgi import
Merges #4251
https://pagure.io/koji/pull-request/4251

Fixes: #3966
https://pagure.io/koji/issue/3966
python cgi module will be dropped in 3.13
2024-10-31 09:39:58 -04:00
d94ba90a22 drop cgi import from unit tests 2024-10-30 15:27:41 -04:00
4eecaddb47 drop cgi import
Fixes https://pagure.io/koji/issue/3966
2024-10-29 22:08:58 -04:00
603f002dc2 PR#4136: no hyperlink in title
Merges #4136
https://pagure.io/koji/pull-request/4136

Fixes: #4135
https://pagure.io/koji/issue/4135
`<title>` of Koji builds includes erroneous `<a href="rpminfo?rpmID="></a>`.
2024-10-25 11:24:19 -04:00
51f236dabd no hyperlink in title 2024-10-25 11:24:14 -04:00
9b08aad4f4 PR#4228: cli: wait-repo: wait for a current repo by default
Merges #4228
https://pagure.io/koji/pull-request/4228

Fixes: #4229
https://pagure.io/koji/issue/4229
cli: wait-repo can report an older repo

Fixes: #4226
https://pagure.io/koji/issue/4226
koji wait-repo command behaviour change / regression in 1.35

Relates: #4227
https://pagure.io/koji/issue/4227
koji 1.35: blocking a package from a tag does not seem to cause newRepo tasks
2024-10-24 08:13:45 -04:00
a9f92c5039 cli: wait-repo: wait for a current repo by default
The pre-1.35 behavior was to wait for a fresh regen.
2024-10-24 08:13:38 -04:00
57040f7313 PR#4239: unittest: use unittest.mock instead of mock
Merges #4239
https://pagure.io/koji/pull-request/4239

Fixes: #4195
https://pagure.io/koji/issue/4195
Transition from python-mock to unittest.mock
2024-10-23 13:09:22 -04:00
ca05418fb5 unittest: use unittest.mock instead of mock
because the absence of unittest.mock on python2.7, we still fallback to
mock
2024-10-23 16:35:30 +00:00
589e6bbb96 PR#4241: fix check-api for python3 bin and requirement of setuptools
Merges #4241
https://pagure.io/koji/pull-request/4241

Fixes: #4240
https://pagure.io/koji/issue/4240
[devtools] check-api requires persent of /usr/bin/python
2024-10-22 14:33:21 -04:00
5413ff5c12 setuptools is required by devtools/check-api (py3) 2024-10-21 19:52:11 +08:00
3ca34171a9 fix unittest without /usr/bin/python on newer os 2024-10-21 19:52:11 +08:00
c0242a8ca4 PR#4238: Update paths in migration docs
Merges #4238
https://pagure.io/koji/pull-request/4238

Fixes: #4220
https://pagure.io/koji/issue/4220
Path error in the documentation about the database migrations
2024-10-17 14:26:34 -04:00
599de6e0c0 Update paths in migration docs
Path was changed in 1.34

Related: https://pagure.io/koji/issue/4220
2024-10-16 14:06:51 +02:00
8c72d90d7b PR#4215: Fix CVE-2024-9427
Merges #4215
https://pagure.io/koji/pull-request/4215

Fixes: #4204
https://pagure.io/koji/issue/4204
Fix CVE-2024-9427
2024-10-08 08:55:27 -04:00
8ab6c15087 version 1.35.1 2024-10-04 11:29:55 -04:00
c539dfc9a6 release notes and cve doc 2024-10-04 08:25:05 -04:00
6629adff0e use url quoting for rpm url arg 2024-09-30 10:46:29 -04:00
1fa0664452 fix tasks description 2024-09-30 10:46:29 -04:00
c948a85ad4 avoid escaping theme includes 2024-09-30 10:46:29 -04:00
05155bf9cf fix unit tests 2024-09-30 10:46:29 -04:00
b392fadf60 rework escaping in web ui 2024-09-30 10:46:26 -04:00
dc3eeded53 PR#4154: Reformat watchlogs.js indentation for consistency
Merges #4154
https://pagure.io/koji/pull-request/4154

Related #4187
https://pagure.io/koji/issue/4187
2024-09-18 09:17:42 +02:00
a3bf074d0d De-tabify .chtml files 2024-09-18 09:17:35 +02:00
0d7d34d216 Init files: expand tab indents 2024-09-18 09:17:35 +02:00
6304a37ea9 Add preliminary .editorconfig rules 2024-09-18 09:17:35 +02:00
3f0a596846 Reformat to 4-space indents throughout
watchlogs.js was a mess of mixed indentation, with some sections
using 8-column tabs with 4-column indents, and others using spaces
for indentation throughout. As a result, the formatting was
erratic, particularly when viewed with anything other than an 8-column
tab width.
2024-09-18 09:17:35 +02:00
f4035140b2 PR#4197: migration notes for repo generation
Merges #4197
https://pagure.io/koji/pull-request/4197
2024-09-18 09:09:03 +02:00
ec3558ef87 no need to defined named reference twice
https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#hyperlink-references
2024-09-17 18:15:55 -04:00
ca4dbb469f kojira migration notes 2024-09-17 18:15:55 -04:00
d2ca06930a PR#4169: Release notes 1.35
Merges #4169
https://pagure.io/koji/pull-request/4169

Fixes: #4168
https://pagure.io/koji/issue/4168
Release notes 1.35
2024-09-17 13:03:47 +02:00
e3c84e2580 Release notes 1.35
Related: https://pagure.io/koji/issue/4168
2024-09-17 13:03:39 +02:00
9ae1c89c56 PR#4192: allow None in repoInfo for backwards compat
Merges #4192
https://pagure.io/koji/pull-request/4192

Fixes: #4193
https://pagure.io/koji/issue/4193
repoInfo no longer accepts None
2024-09-17 13:00:33 +02:00
28ba9f45f6 allow None in repoInfo for backwards compat 2024-09-13 11:39:51 -04:00
a204491e2b PR#4186: Basic tests for kiwi plugin
Merges #4186
https://pagure.io/koji/pull-request/4186

Relates: #4179
https://pagure.io/koji/issue/4179
Create kiwi unit tests
2024-08-28 15:56:01 +02:00
8d0ef68bfa Basic tests for kiwi plugin
Related: https://pagure.io/koji/issue/4179
2024-08-28 15:54:17 +02:00
a17395a42c PR#4121: Provide tag data in policy_data_from_task_args
Merges #4121
https://pagure.io/koji/pull-request/4121

Relates: #3945
https://pagure.io/koji/issue/3945
Newer createrepo_c doesn't generate comps readable EL7
2024-08-28 15:45:07 +02:00
8c3755c704 Provide tag data in policy_data_from_task_args
Also included
* unit test
* only set scratch if opt is present
2024-08-28 15:44:59 +02:00
7ce96c9ec3 PR#4184: kiwi: Add support for overriding version and releasever
Merges #4184
https://pagure.io/koji/pull-request/4184

Fixes: #4183
https://pagure.io/koji/issue/4183
kiwi: Add support for overriding version and release-version attributes
2024-08-26 16:18:23 +02:00
a5dd795043 kiwi: Add support for overriding version and releasever
This allows for kiwi descriptions that are compatible across
multiple targets to be easily used without needless modifications.

Additionally, it allows for custom values when preparing milestone
releases without needlessly modifying the descriptions.
2024-08-26 10:02:43 -04:00
e18e4006cc PR#4063: kiwi: Only add buildroot repo if user repositories are not defined
Merges #4063
https://pagure.io/koji/pull-request/4063

Fixes #4062
Related: https://pagure.io/koji/issue/4062
2024-08-26 14:34:18 +02:00
0e43634af5 improve warnings for older hub 2024-08-26 14:28:40 +02:00
810836944a version check + typo fixes 2024-08-26 14:28:40 +02:00
dd594826f2 Don't use buildroot repo by default 2024-08-26 14:28:38 +02:00
b13d481d56 kiwi: option for not using buildroot repo
Related: https://pagure.io/koji/issue/4062
2024-08-26 14:28:13 +02:00
694ac41483 kiwi: Only add buildroot repo if user repositories are not defined
In general, we assume that if the user is specifying repositories,
the built-in one should not be used.
2024-08-26 14:27:21 +02:00
faf3d937f4 PR#4181: Fix a typo in the kiwi image type attribute override patch
Merges #4181
https://pagure.io/koji/pull-request/4181

Related: https://pagure.io/koji/issue/4177
2024-08-26 10:13:34 +02:00
3e0b8103d2 Fix a typo in the kiwi image type attribute override patch
This colon was duplicated, which is syntactically invalid and
prevents the file from loading at all.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-08-22 09:44:50 -07:00
6ac3fefbe3 PR#4157: kiwi: Add support for overriding kiwi image file name format
Merges #4157
https://pagure.io/koji/pull-request/4157

Fixes #4177
https://pagure.io/koji/issue/4177
2024-08-21 09:35:51 +02:00
06840501bd kiwi: Add support for overriding kiwi image file name format
In order to be able to support workflows where the exact structure
of the image filenames matter (e.g. for Linux distribution artifacts),
support optionally overriding the image file name structure.
2024-08-21 09:35:45 +02:00
bd21b60f23 PR#4156: kiwi: Add support for overriding image type attributes
Merges #4156
https://pagure.io/koji/pull-request/4156

Related #4177
https://pagure.io/koji/issue/4177
2024-08-21 09:34:59 +02:00
b22449c553 kiwi: Add support for overriding image type attributes
This allows setting things like the volume and application IDs
for ISO builds.
2024-08-21 09:34:53 +02:00
fdb00d34dd Merge #4173 fix typo in schema-upgrade-1.34-1.35.sql 2024-08-19 15:34:45 +00:00
f9cff89263 fix typo in schema-upgrade-1.34-1.35.sql 2024-08-19 23:28:58 +08:00
8a6857f546 PR#4141: Keep schema upgrade transactional
Merges #4141
https://pagure.io/koji/pull-request/4141

Relates: #4080
https://pagure.io/koji/issue/4080
[1.34.0] Database migration 1.34 -> 1.35 fails, because creating an index in this manner is not allowed.
2024-08-16 12:38:35 +02:00
3fa1b1b243 Keep schema upgrade transactional
Related: https://pagure.io/koji/issue/4080
2024-08-16 12:38:28 +02:00
007cfa0345 PR#4132: check-api: only warn for external type changes
Merges #4132
https://pagure.io/koji/pull-request/4132
2024-08-15 11:57:22 +02:00
ee83ceb1af check-api: only warn for external type changes 2024-08-15 11:57:15 +02:00
25534177dc PR#4103: make clean - more files
Merges #4103
https://pagure.io/koji/pull-request/4103
2024-08-15 11:53:47 +02:00
f82359b920 make clean - more files
Remove setup.py genereated directories and potential python stubs.
2024-08-15 11:53:40 +02:00
90b3ef7366 PR#4060: auto arch refusal for noarch tasks
Merges #4060
https://pagure.io/koji/pull-request/4060

Relates: #4047
https://pagure.io/koji/issue/4047
Scheduler randomly chose "wrong" archs for noarch packages.
2024-08-15 11:51:03 +02:00
c09780bbb5 adjust handling for tags with no arches 2024-08-15 11:50:50 +02:00
6fb33731d9 adjust comments 2024-08-15 11:50:50 +02:00
085d97fb2d one more test 2024-08-15 11:50:50 +02:00
3a8a0786be add unit test and adjust error handling
(no errors were found with the code, but needed to avoid masking them in
tests)
2024-08-15 11:50:50 +02:00
137400868a typo 2024-08-15 11:50:50 +02:00
826f8637d9 trigger auto refusals in make_task 2024-08-15 11:50:50 +02:00
8894fcbca3 auto_arch_refuse() 2024-08-15 11:50:50 +02:00
0823802908 PR#4164: better default handling for getMultiArchInfo
Merges #4164
https://pagure.io/koji/pull-request/4164

Fixes: #4161
https://pagure.io/koji/issue/4161
api test is depending on used architecture
2024-08-15 09:05:43 +02:00
23495b773b better default handling for getMultiArchInfo
Fixes https://pagure.io/koji/issue/4161
2024-08-15 09:05:36 +02:00
69dd65b01e PR#4083: refuse image tasks when required deps are missing
Merges #4083
https://pagure.io/koji/pull-request/4083

Fixes #4105
https://pagure.io/koji/issue/4105
2024-08-15 09:03:53 +02:00
4cf8edd6a4 refuse image tasks when required deps are missing 2024-08-15 09:03:46 +02:00
abfe1f20be PR#4158: Fix asserts in unit tests
Merges #4158
https://pagure.io/koji/pull-request/4158
2024-08-13 12:44:08 +02:00
b91a40c0fc restore test 2024-08-13 12:44:01 +02:00
9b9a207206 fix test name 2024-08-13 12:44:01 +02:00
8eb2078a4c Fix asserts in unit tests 2024-08-13 12:44:01 +02:00
3dd7665269 PR#3912: anonymous getGroupMembers and getUserGroups
Merges #3912
https://pagure.io/koji/pull-request/3912

Relates: #3900
https://pagure.io/koji/issue/3900
RFE: anonymous getGroupMembers and getUserGroups
2024-08-13 12:41:50 +02:00
Christopher O'Brien
a5f4b24c37 undoing api json changes 2024-08-13 12:41:42 +02:00
Christopher O'Brien
cb6da5074c change return type to list of dicts 2024-08-13 12:41:42 +02:00
Christopher O'Brien
a3f4ea5d44 make the API tests pass 2024-08-13 12:41:42 +02:00
Christopher O'Brien
0bd816c689 Make getGroupMembers anonymous and add getUserGroups 2024-08-13 12:41:42 +02:00
d982b5ac4f PR#4100: setup.py: Fix version retrieval on Python 3.13+
Merges #4100
https://pagure.io/koji/pull-request/4100

Fixes: #4101
https://pagure.io/koji/issue/4101
 setup.py: Fix version retrieval on Python 3.13+
2024-07-24 09:45:23 +02:00
7dd9a83612 setup.py: Fix version retrieval on Python 3.13+
Accessing __version__ from locals() no longer works.

This was reported to Python in https://github.com/python/cpython/issues/118888
but according to Python developers, it:

 - is an intended change of behavior described in PEP 667
 - was an illegal usage that happens to work in a favored way to begin with
2024-07-24 09:45:04 +02:00
2bf10c7010 PR#4075: taskinfo CLI and webUI info message why output is not in the list
Merges #4075
https://pagure.io/koji/pull-request/4075

Fixes: #4074
https://pagure.io/koji/issue/4074
add note that files are cleared when getTaskResults returns some results but listTaskOutput returns an empty result
2024-07-24 09:29:18 +02:00
Jana Cupova
3725053b33 taskinfo CLI and webUI info message why output is not in the list
Fixes: https://pagure.io/koji/issue/4074
2024-07-24 09:29:04 +02:00
bf6f1f4a16 PR#4133: more missing tearDowns
Merges #4133
https://pagure.io/koji/pull-request/4133

Fixes: #4020
https://pagure.io/koji/issue/4020
Parallelize tests
2024-07-18 14:22:52 +02:00
5cfc290675 more coverage filters 2024-07-18 14:22:43 +02:00
6fb91c040a also use venv coverage 2024-07-18 14:22:43 +02:00
44c16b8c68 use venv pytest, stop using ancient mock version
dropping mock from the py3 reqs entirely so we use python's lib
2024-07-18 14:22:43 +02:00
c444cd5eb5 use pytest-dist for make test3 2024-07-18 14:22:43 +02:00
6002373ff9 avoid leaving stray temp files 2024-07-18 14:22:43 +02:00
8d8274a35e fix context mocking 2024-07-18 14:22:43 +02:00
1c3b430e02 drop stray tearDown 2024-07-18 14:22:43 +02:00
d7bbc037f5 more mocks related to context 2024-07-18 14:22:43 +02:00
117164ab3f fix misuse of progname in unit tests
this was breaking parallel testing
2024-07-18 14:22:43 +02:00
dde35fdc97 fix tz issues in cli tests 2024-07-18 14:22:43 +02:00
95dacbe785 more missing tearDowns 2024-07-18 14:22:43 +02:00
690ed8cf01 PR#4115: fix tz mismatch issues with various queries
Merges #4115
https://pagure.io/koji/pull-request/4115

Fixes: #4114
https://pagure.io/koji/issue/4114
Hub encodes timestamps for db without tz
2024-07-12 10:55:48 -04:00
adda405314 use tzutc from dateutil 2024-07-12 10:55:44 -04:00
d05b0a4de1 fix unit tests 2024-07-12 10:55:44 -04:00
69d162ddff fix tz mismatch issues with various queries 2024-07-12 10:55:44 -04:00
f70ba74d43 PR#4127: handle cases where there is no event before our ts
Merges #4127
https://pagure.io/koji/pull-request/4127

Fixes: #4128
https://pagure.io/koji/issue/4128
min_event calculation can fail if koji instance is new
2024-07-11 08:42:25 +02:00
f2331ba27f handle cases where there is no event before our ts 2024-07-05 12:37:24 -04:00
9544b865a4 PR#4092: handle volumes when clearing stray build dirs
Merges #4092
https://pagure.io/koji/pull-request/4092

Fixes: #4091
https://pagure.io/koji/issue/4091
recycle_build doesn't clean up stray files on other volumes
2024-07-03 13:20:14 +02:00
e7fb5908e4 unit test 2024-07-03 13:20:04 +02:00
9f96923f7b handle volumes when clearing stray build dirs 2024-07-03 13:20:04 +02:00
4abd33640e PR#4113: cg import updates
Merges #4113
https://pagure.io/koji/pull-request/4113

Fixes: #1402
https://pagure.io/koji/issue/1402
[RFE] Restrict CG imports by build type

Fixes: #4119
https://pagure.io/koji/issue/4119
Support subdirs for cg imports
2024-07-03 13:17:51 +02:00
01988983dd provide additional data for cg policy 2024-07-03 13:17:42 +02:00
1214b806b0 cg_import: support subdir for logs and custom btypes 2024-07-03 13:17:42 +02:00
f84fff11f5 PR#4104: Add external koji dev environments' links
Merges #4104
https://pagure.io/koji/pull-request/4104

Fixes: #1558
https://pagure.io/koji/issue/1558
Create a basic Vagrant development environment
2024-07-02 13:02:11 +02:00
6927737812 Add external koji dev environments' links
Related: https://pagure.io/koji/issue/1558
2024-07-02 13:02:04 +02:00
f2da4b8e44 PR#4033: kojira on demand
Merges #4033
https://pagure.io/koji/pull-request/4033

Fixes #3176
https://pagure.io/koji/issue/3176
Kojira redesign

Fixes #3866
https://pagure.io/koji/issue/3866
Broken repos in expired state
2024-07-01 09:34:07 -04:00
a6aa4786f0 flake8 2024-06-26 10:07:29 -04:00
b54a5f258d score field was dropped 2024-06-26 10:07:29 -04:00
6cc8cbd936 minor doc updates 2024-06-24 14:49:34 -04:00
528c14ac9b drop shadowbuild case in newRepo
repos from specific events are no longer immediately expired
2024-06-24 11:25:21 -04:00
e3707bed7a use requests in sidetag plugin 2024-06-24 11:25:21 -04:00
1bdb0598b8 update koji-shadow to use repo requests 2024-06-24 11:25:21 -04:00
bd14d90bbc extend repo_init unit test 2024-06-22 18:12:12 -04:00
ca5548920b BulkUpdateProcessor: only assign for set_keys 2024-06-22 18:12:12 -04:00
6d05e15778 update api check data for host.repoInit
This is a call that should only be used by kojid, and we don't want
out-of-date builders performing regens.
2024-06-21 14:58:23 -04:00
df4a54e204 kojira on demand work
squashed to keep the history more readable

commit b4383d81f48f9c58cb53119cb453034c5676657f
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Jun 21 09:03:07 2024 -0400

    unit tests

commit 151b6ea053fc2e93b104fb3f01749602401fa0ee
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Jun 18 17:55:35 2024 -0400

    unit tests and fixes

commit 15457499665a0c0e0e45b17d19c6d07b6f681ca8
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Jun 18 17:14:01 2024 -0400

    use tag name in waitrepo task for readability

commit a20a21d39d2cb96b02046788de77aa33a7cbc906
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Jun 18 17:00:45 2024 -0400

    cleanup

commit a0058fce436a39de5cde6f11788ca4aaaa3553c0
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Jun 18 16:44:22 2024 -0400

    better approach to repo lookup from task id

commit 057527d71318d4494d80a2f24510e82ac9bc33f8
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Jun 18 10:42:08 2024 -0400

    support priority for requests

commit 882eaf2c4349e6f75db055fa36c80d66ab40526f
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Jun 18 10:16:44 2024 -0400

    track user for request

commit 273739e2f43170d80dae9e3796185230fae0607e
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Jun 17 15:37:16 2024 -0400

    update additional fields in repo_done_hook

commit d0a886eb161468675720549ad8a31921cd5c3647
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Jun 17 15:14:38 2024 -0400

    simplify updateRepos

commit 2a3ab6839299dd507835804e6326d93f08aa4040
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Jun 17 15:03:39 2024 -0400

    kojira: adjust cleanup of self.repos

commit dfc5934423b7f8f129ac9c737cc21d1798b33c2d
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Jun 17 14:03:57 2024 -0400

    docs updates

commit 4c5d4c2b50b11844d5dd6c8295b33bcc4453928b
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Jun 17 09:18:10 2024 -0400

    Apply repo_lifetime to custom repos even if current

commit 2b2d63a771244358f4a7d77766374448343d2c4c
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Jun 17 09:36:50 2024 -0400

    fix migration script

commit 447a3f47270a324463a335d19b8e2c657a99ee9b
Author: Tomas Kopecek <tkopecek@redhat.com>
Date:   Fri Jun 7 11:32:14 2024 +0200

    migration script

commit f73bbe88eea7caf31c908fdaa5231e39d0f0d0a8
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Jun 14 15:30:24 2024 -0400

    clean up some TODO items

commit 836c89131d2b125c2761cfbd3917473504d459e4
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Jun 14 11:43:13 2024 -0400

    update unit tests

commit 4822ec580b96ae63778b71cee2127364bc31d258
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Jun 14 11:17:24 2024 -0400

    streamline simple case for tag_first/last_change_event

commit 3474384c56a8a2e60288279b459000f3b9c54968
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Jun 11 16:11:55 2024 -0400

    backwards compatible age checks in kojira

commit e796db0bdc6e70b489179bcddaa899855d64b706
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Jun 14 11:49:37 2024 -0400

    repowatch unit test fixes

commit 7f17eb741502ab5417f70413f699c99e140f380d
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Jun 6 21:35:11 2024 -0400

    adjust watch output; die if request fails

commit a0318c44576d6acab459f623c8ff0ab6961bd6b4
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Jun 6 20:45:56 2024 -0400

    handle problem repos

commit d90ca6f9d41a39da86089a0fad7afdb649fd680b
Author: Mike McLean <mikem@redhat.com>
Date:   Thu May 30 22:43:56 2024 -0400

    fix typos

commit 29830d1b8125664ddeae5ccb7e6b6e53260cdc47
Author: Mike McLean <mikem@redhat.com>
Date:   Thu May 30 16:57:48 2024 -0400

    clarify --wait-repo help text

commit 43db92302643b67e7f6f419424d6813e5dca53f3
Author: Mike McLean <mikem@redhat.com>
Date:   Tue May 21 17:32:44 2024 -0400

    unit tests

commit 27f979fbccc5a286fba9caeec16ca7092fa79813
Author: Mike McLean <mikem@redhat.com>
Date:   Tue May 21 17:23:32 2024 -0400

    wait-repo compat

commit f3a8f76d9340b1bdddb5f7bab154962e848d4d10
Author: Mike McLean <mikem@redhat.com>
Date:   Thu May 16 20:14:59 2024 -0400

    fixes

commit 6638b0fd76b31aa49ad0cf79639014ad9ace09f0
Author: Mike McLean <mikem@redhat.com>
Date:   Thu May 16 16:41:50 2024 -0400

    use old regen-repo code for older hubs

commit 7f2d8ec49fe1d2d511759221a821a146a4ef6837
Author: Mike McLean <mikem@redhat.com>
Date:   Thu May 16 16:18:36 2024 -0400

    fixes

commit 791df709c10d3c10c9b79f59f4fda435ac3bd285
Author: Mike McLean <mikem@redhat.com>
Date:   Thu May 16 12:22:09 2024 -0400

    don't trigger regens from scheduler. kojira is enough

commit 75f5e695287b92d53e4f173f57b12b5a7159adaf
Author: Mike McLean <mikem@redhat.com>
Date:   Wed May 15 22:54:08 2024 -0400

    more docs

commit 0e0f53160bbe09e35409dabce63739eb50813310
Author: Mike McLean <mikem@redhat.com>
Date:   Wed May 15 21:49:27 2024 -0400

    support MaxRepoTasksMaven

commit 88da9639860cb7c0d92f7c3bc881cd480b4e1620
Author: Mike McLean <mikem@redhat.com>
Date:   Wed May 15 16:15:12 2024 -0400

    drop unused method

commit 4cdbe6c4d2ba8735312d0cd0095612c159db9cce
Author: Mike McLean <mikem@redhat.com>
Date:   Wed May 15 15:48:55 2024 -0400

    api for querying repo queue

commit 2367eb21e60865c8e5a2e19f2f840938dbbbc58b
Author: Mike McLean <mikem@redhat.com>
Date:   Wed May 15 15:24:44 2024 -0400

    flake8

commit 811378d703a68b63c577468b85f4a49a9be2c441
Author: Mike McLean <mikem@redhat.com>
Date:   Tue May 14 16:20:59 2024 -0400

    record custom opts in repo.json

commit d448b6b3417e95bff2bae3b5a3790877ac834816
Author: Mike McLean <mikem@redhat.com>
Date:   Mon May 13 15:32:33 2024 -0400

    drop unused RawClauses code

    will revisit in a later PR

commit 0422220e05ee3d43e5431a0d741f3632f42a8434
Author: Mike McLean <mikem@redhat.com>
Date:   Sat May 11 13:34:12 2024 -0400

    clean up BulkUpdateProcessor and add tests

commit 6721f847e655a3794d4f2fce383070cb6ad2d2d1
Author: Mike McLean <mikem@redhat.com>
Date:   Fri May 10 17:43:17 2024 -0400

    fix unit test after rebase

commit 833286eead2b278a99fe9ef80c13df88ca3af48c
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Apr 5 00:23:15 2024 -0400

    adjust valid_repo opts checks

commit 7f418d550d8636072292ee05f6e9748b622c2d89
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Apr 5 00:03:33 2024 -0400

    extend valid_repo unit test and fix a bug

commit eb844ba15894cb7fc2a739908e7d83c80fd82524
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Apr 4 15:41:08 2024 -0400

    test_request_existing_req_invalid

commit 2e290453abf9ac31f51a1853aa123a2a34ad9605
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Apr 4 15:22:06 2024 -0400

    test_request_at_event

commit 2c3389c24f5cabfbbaeb70512a4ba917cf5bd09b
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Apr 4 11:14:37 2024 -0400

    test_request_new_req

commit 2cdeab9b5f5b0bff4c4806ae802e5f5e571bb25e
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Apr 4 10:56:36 2024 -0400

    test_request_existing_req

commit 63c9ddab5f3e50b3537a82f390e9da5a66275a25
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Apr 4 10:45:22 2024 -0400

    test_request_existing_repo

commit 03b5ba5c57ce1ade0cf7990d23ec599c8cb19482
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Apr 4 10:04:36 2024 -0400

    more stubs

commit 92d16847f2cc2db0d8ee5afcf2d812b9bb6467ec
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Apr 3 22:44:00 2024 -0400

    fix import

commit 1f621685532564a1c1ac373e98bec57c59107e6c
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Apr 3 22:16:25 2024 -0400

    stub test

commit 45eef344e701c910f172d5642676d8f70d44049a
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Apr 3 22:01:31 2024 -0400

    link repo doc in toc

commit bfffe233051c71785c335a82f64bf2abaae50078
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Apr 3 21:57:35 2024 -0400

    unused options

commit 19f5a55faecf8229d60d21fd3e334e9a7f813384
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Apr 3 16:37:50 2024 -0400

    include new setting

commit b7f81bd18016f862d1246ab6c81172fcd9c8b0ed
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Apr 3 08:21:16 2024 -0400

    test + fixes

commit 16564cfb8e2725b395c624139ce3d878a6dd9d53
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Apr 3 07:44:15 2024 -0400

    more kojira unit tests

commit 6b55c51302331ea09a126b9f3efbc71da164c0fb
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Apr 3 07:06:20 2024 -0400

    fix unit test

commit 0b000c124b17f965c5606d30da792ba47db542cf
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Apr 2 22:07:08 2024 -0400

    refactor repo delete

commit 0a03623fb018c80c8d38896fc99686cac56307fa
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Apr 2 19:13:15 2024 -0400

    avoid circular import issue

commit 137d699b7653977f63f30041d9f5f1a88ae08d43
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Apr 2 19:03:18 2024 -0400

    some kojira cleanup

commit 252e69d6dd17bb407b88b79efbb243ca5e441765
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Apr 2 17:21:14 2024 -0400

    adjust state transition check

commit 336018081709fd44e7f12933b1ea59e02bff4aed
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Apr 2 16:05:45 2024 -0400

    update RepoQuery

commit 68bb44848d9024c5520d8e7e2cc262adaa083cd1
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Mar 12 11:46:59 2024 -0400

    decode query bytes in log

commit 818431fb9b09db162e73f7cb1adcddc8b151c821
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 29 14:47:16 2024 -0400

    sanity check requests before reusing

commit 63fee0ba1ea9d41d504bb09aeaea064246c16ff9
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 29 11:41:13 2024 -0400

    repo.query api call

commit bcf9a3cf64167612e3cd355aae7c41dd348cb8db
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 29 10:31:58 2024 -0400

    reduce some cli code duplication

commit 3e870cfd088c69c4aaaa9a0f938bcce740b3f42c
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Mar 28 18:27:18 2024 -0400

    tweak warnings in external repo check

commit 0dfda64b806f2377d9c591105c83a4f05851b17a
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Mar 28 14:43:50 2024 -0400

    clean repo queue

commit e5d328faa00c74e087f0b0d20aea7cd79ffb5ee4
Author: Mike McLean <mikem@redhat.com>
Date:   Thu Mar 28 14:05:12 2024 -0400

    implement retry limit for repo queue

commit 2185f3c9e32747c9657f2b9eb9ce6e3ca6d06ff8
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Mar 27 22:40:13 2024 -0400

    cleanup a few TODOs

commit b45be8c44367bca9819561a0e928999b9a9e2428
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Mar 27 22:22:17 2024 -0400

    tweak test

commit 546b161e20d0b310462dda705ae688e25b385cf5
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Mar 27 13:43:06 2024 -0400

    more kojira tests

commit f887fdd12e59e36be561c1a89687a523e112b9d4
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Mar 26 20:16:11 2024 -0400

    unit tests for RepoWatcher

commit e78b41431f3b45ae9e09d9a246982df9bb2c2374
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Mar 26 10:53:14 2024 -0400

    fix unit tests

commit 64328ecb27e5598ec8977617e67d6dd630bc8db7
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Mar 25 14:03:19 2024 -0400

    custom opts sorted out?

commit e3cee8c48bcf585a1a14aa8e56e43aaba2ccd63b
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Mar 25 12:50:34 2024 -0400

    allow containment operator

commit bef7bbc3b2a16a6643bedb47be044c202a2bad2d
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Mar 25 11:59:15 2024 -0400

    partial

commit 01788dfe386a07960c5c7888350e3917b44a0bab
Author: Mike McLean <mikem@redhat.com>
Date:   Sat Mar 23 13:47:22 2024 -0400

    fragment: struggling with repo opt timing

commit 44504bfbde4cf981391ea02127a05c4f0c2fc4a3
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 17:14:57 2024 -0400

    fine to have default values in the class

commit 1bfa520dd599acccd45f221f71c64fbefc3b5554
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 17:14:18 2024 -0400

    option renamed

commit a5db9d015a25f71fdb5e2dadcae55a8c5b7ec956
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 17:04:32 2024 -0400

    flake8

commit c02244f8018b651f309f39eb60f926209454dea2
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 16:59:15 2024 -0400

    more config options in repos.py

commit 9bf3edc0cf2c85a23964b79c4489bc9592656f16
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 15:39:52 2024 -0400

    use requests by default in regen-repo

commit 78c6e8a4459856fa333763b1977633307fd81cc3
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 13:49:00 2024 -0400

    adjust watch_fields

commit eadb2a24b9e0f324ac053c4bdede0865d4ed5bfa
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 12:27:23 2024 -0400

    adjust event validation

commit 3140e73cfccdcc25765c6f330073c991a44cbd9a
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 12:01:24 2024 -0400

    wait-repo tweaks

commit d1a8174cdd917bbf74882c51f1a7eaf4f02e542a
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 10:35:28 2024 -0400

    cli: wait-repo-request command

commit b2d08ac09880a1931b7f40b68d5ca765cd49a3a6
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 10:04:46 2024 -0400

    drop complex request options from wait-repo

commit b4ab55f241a693c0c0d08e386f998394a295fc7c
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 09:36:37 2024 -0400

    fix call

commit c04417439c4684342ac0d4423b341d363bc80e92
Author: Mike McLean <mikem@redhat.com>
Date:   Fri Mar 22 09:32:48 2024 -0400

    typo

commit 29be83b1523d45eb77cfe4959c9d6bc5c940ebbe
Author: Mike McLean <mikem@redhat.com>
Date:   Wed Mar 20 07:28:12 2024 -0400

    partial...

commit cd0ba3b6c2c47fe5bac4cf823b886462e092e2b3
Author: Mike McLean <mikem@redhat.com>
Date:   Tue Mar 19 23:13:47 2024 -0400

    drop event="new" code

commit 7f4f2356eceec03228e4a92b13e5593f956c390d
Author: Mike McLean <mikem@redhat.com>
Date:   Mon Mar 18 21:00:25 2024 -0400

    kojira on demand work

    squashed because the branch was getting unwieldy
    mostly working at this point, but there is a bit out outstanding work

    commit e127878460a932cc77c399f69c40f0993c765dc7
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Mar 18 11:20:33 2024 -0400

        stale comment

    commit d0849d50b865f4f3783ddde5e1e6cf10db56ed39
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 23:58:13 2024 -0400

        don't expire at_event repos

    commit 8866db0e25b072aa12cc2827c62093b000fa7897
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 23:43:24 2024 -0400

        typo

    commit e2a5fd639b88c7b88708e782f0b7398296d2f805
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 23:40:08 2024 -0400

        repos.py: support at_event

    commit 6518f1656976ea2beb2cf732c82db0f159b09d15
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 22:20:35 2024 -0400

        update repo symlink logic

    commit 50d5e179f56393dd52c7225fc6f053d0095e9599
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 22:20:01 2024 -0400

        ...

    commit 429fc85b391e0b5e637e20859f1094a37a5eab39
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 21:18:44 2024 -0400

        block owner opt in makeTask and host.subtask

    commit 40fcfe667ef70987444756f6d5554919d89fb1de
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 20:49:37 2024 -0400

        db lock for repo queue

    commit dfd94fac8fb96328b12bcf2f8f6f7e2d52deea85
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 17:47:39 2024 -0400

        ...

    commit ecd9611e5d84d8a98920c40805616a6376ca652e
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 17:45:38 2024 -0400

        move new exports around

    commit a2e086df07f7b03dc4505a61f9b213e6e2ff20a5
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 16:46:29 2024 -0400

        drop noisy debug line

    commit 497bd773baa274d205df3bba317ee80617cc56a0
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 16:20:56 2024 -0400

        ...

    commit 457c986894de754a927bc4880687e0f47c29cbdd
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 16:19:12 2024 -0400

        ...

    commit 3aa0fa4862b37b7d178b1b7bb9a521ea01e7dded
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 16:18:30 2024 -0400

        ...

    commit 391c2009671dea1270cce01666d04ad2ade0c323
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 16:15:32 2024 -0400

        ...

    commit f3794e2acc8eef38e0c65fb27d3b2b3a58f53311
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 16:12:53 2024 -0400

        ...

    commit aea5e1a91f9246cce5f162bbea3d4846e87b9811
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 16:11:53 2024 -0400

        ...

    commit dc68ed8f0a43c9418c0c813f05a761bc8303c2b0
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 16:10:34 2024 -0400

        typo

    commit 73c72c8ed08744a188e4ae977b7ba2d92c75401b
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 16:08:15 2024 -0400

        pruning tweaks

    commit d3a10f8d5ef77a86db0e64a845f360d9f2cc2e17
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 15:50:57 2024 -0400

        kojira: use ordered dict for delete queue

    commit f6d7d44bac22840ee3ae1a93375c3b5ad430869c
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 14:59:05 2024 -0400

        rework repo expiration and lifetimes a bit

    commit 8bb91611c05ccb5d91910718a07494c08665ec22
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 00:27:34 2024 -0400

        more kojira rework

    commit 368d25a31d61eae8712591183bd2db1ff78f59d1
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 17 00:27:17 2024 -0400

        cleanup

    commit 292a1e4fdcc4098137156a42072e5bfda2f711df
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Mar 16 23:51:45 2024 -0400

        track update time for repos

    commit 01a7469ef7bcd952f45d732e4bb3b5f4bab2338a
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Mar 16 17:42:42 2024 -0400

        factor in implicit joins for fields="*"

    commit f9aba4557108b2005cf518e4bf316befa7f29911
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Mar 16 15:25:34 2024 -0400

        partial repo docs

    commit 74eae7104849237a4049a78c94b05187a2219f74
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Mar 16 13:17:36 2024 -0400

        remove some obsolete code from kojira

    commit d883807967a0d6d67a6e262a119ff5e03b8a947e
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Mar 16 11:42:48 2024 -0400

        ...

    commit 3bc3aa98913463aa209bba1cecc71fc30f6ef42f
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Mar 16 11:12:50 2024 -0400

        do_auto_repos

    commit da69f05555f05ded973b4ade064ed7e5f7e70acd
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 23 14:56:30 2024 -0500

        fakehub: option to override config

    commit 13a4ffdf9cd915b6af7b85120d87d50b8f6db5ed
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 15 22:35:50 2024 -0400

        tweak logging

    commit 01af487cced25c0edaa9e98e5dc7bb7dc9c4d6bd
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 15 22:16:21 2024 -0400

        adjust archlist for external repo check

    commit eb1c66f57a508f65dcac0e32cfaa3e178ed40bad
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 15 18:45:53 2024 -0400

        tweak logging; wait-repo --new

    commit 3dab52d497926a6be80a3c98cc29f0cb6478926f
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 15 15:03:23 2024 -0400

        typo

    commit 503365a79998aa2ee0eb2bd9b412747cdec50ab1
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 14 00:17:24 2024 -0400

        ...

    commit 46ec62e96334690344de18d535f7b9c4fd87d877
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 14 00:16:09 2024 -0400

        separate get/set for erepo data

    commit 25c2861509cfebcfc38be5fff6c0b382dfcca224
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 13 09:08:45 2024 -0400

        only update erepo data in db if it changed

    commit bc5db7494a486ae39b99dba4875547a8e8bc1ee0
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 13 09:03:03 2024 -0400

        ...

    commit 55b947fe2889dcb3b6112e9e80de926ef0ab70fa
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 13 08:48:45 2024 -0400

        partial work

    commit 7e91985a378754ae2ba88e0e2182bdf6302416ef
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 13 08:22:23 2024 -0400

        handle external_repo_data history in cli

    commit 0aeae31215af98ea8580307750389873f1e2521e
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 13 08:15:50 2024 -0400

        set_external_repo_data

    commit d85e93c0c294770d2384a41a3f2c09b4a64ae3c4
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 13 07:58:18 2024 -0400

        support external_repo_data in query_history

    commit 88fcf7ac5b8893bd045af017df1eb22a3cce8cb0
    Merge: 8449ebfeb eba8de247
    Author: Mike McLean <mikem@redhat.com>
    Date:   Tue Mar 12 00:01:57 2024 -0400

        Merge remote-tracking branch 'origin' into kojira-on-demand

    commit 8449ebfeb7976f5a5bfea78322c536cf0db6aa54
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Mar 11 23:56:25 2024 -0400

        drop stray file

    commit 3d3716454b9f12c1807f8992ecd01cde3d9aade9
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Mar 11 23:49:20 2024 -0400

        flake8

    commit f9014b6b689e5a1baf355842cf13905b8c50c3d8
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Mar 11 23:44:32 2024 -0400

        handle deleted tags sanely in tag_last_change_event

    commit 7d584e99a1a580039d18210c2cc857eb3419394f
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Mar 11 14:50:07 2024 -0400

        typo

    commit 6ac5921ce55ed356ba8c66466ebf56bb424591a9
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Mar 11 14:49:35 2024 -0400

        add external_repo_data table. check ext repo tables for first/last tag change events

    commit e107400463679113971daaa400d75ec006f4dca5
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Mar 11 12:14:21 2024 -0400

        fix newer_than logic in WaitrepoTask

    commit 4a1175a35e6ad7c59b3622a6028e2cd68e29bb79
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 10 23:47:29 2024 -0400

        todos

    commit c13d9e99d19bc40e59fd136b540b6a8c6e12a50f
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 10 23:30:59 2024 -0400

        AllowNewRepo hub config

    commit e3176cda238d3357fed0b905b03dfc0319dab12e
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 10 23:00:45 2024 -0400

        fixes

    commit d486960a441fbb517492a61ef2529370035a765a
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 10 22:48:00 2024 -0400

        request min_event never null or in future

    commit 4cc0d38b8e4bf1254bb156d085614f83929e1161
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 10 22:32:45 2024 -0400

        ...

    commit bb0dc41cd6be4c42d4cd033e07210f1184c2c385
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 10 22:23:52 2024 -0400

        default min_event. don't allow future events

    commit 1dccf0a56b1e3f83107760111264249527abeb68
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 10 17:27:11 2024 -0400

        use BulkUpdateProcessor in update_end_events

    commit 03c791edd3bb49359f2a01eaf53cbb717c53833e
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Mar 10 17:26:26 2024 -0400

        BulkUpdateProcessor

    commit 4bd2a0da1c998ce14fd856e68318551747867e06
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 8 14:53:53 2024 -0500

        update_end_events()

    commit b45b13bcba141ea6b30618fb76c1a94593dfe569
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 8 13:03:33 2024 -0500

        record begin/end events in repo_init

    commit 6f1adf51d9e24f80369df8b96010c0d6d123b448
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 8 12:33:40 2024 -0500

        QueryView: accept single field value

    commit 6b292d9a4b1bda56ff8091fbcb126749f952d045
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 8 12:28:02 2024 -0500

        adjust query fields

    commit e9e8e74703de8b6c531944c05d54447f0d7cb13f
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 8 12:18:12 2024 -0500

        QueryView: adjust special field name handling

    commit 97d910d70634183a3d5ae804176a5c8691882b7a
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Mar 8 11:45:54 2024 -0500

        adjust event fields

    commit c70d34805227a61ab96176537dae64db3883e58f
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 23:37:29 2024 -0500

        honor owner opt to make_task

    commit 40601d220179eb9718023002f8811ce5cbd09860
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 23:29:50 2024 -0500

        ...

    commit 6f84ca3aa8c24d4618294027dce7a23620a3e2d7
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 23:24:22 2024 -0500

        typo

    commit c423b8a4cc5fd4ed5c762e7b5adc06449c72ea70
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 23:22:18 2024 -0500

        use kojira user for repo tasks

    commit 63dacff462ce064bbdf0b5c6e8ef14b2abe08e0c
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 23:05:12 2024 -0500

        hook to fulfill requests when repos are marked ready

    commit aa79055c1e404a4c4fa9ac894fe978c8f9827f72
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 01:08:19 2024 -0500

        no more data field

    commit 7dd029fb94e24004793e2d1232b3225b3cee5c97
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 01:01:41 2024 -0500

        use full opts in request entries too

    commit 73dc2f232b231467d12355af0ace14284f5422a8
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 00:54:41 2024 -0500

        ...

    commit 414d0a55cf66d93b6fb79e9677f68fd141edc655
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 00:54:01 2024 -0500

        propagate opts in repo_init

    commit 99c1dde4771164d215f8c9a9acc0dadb678d047b
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 00:20:57 2024 -0500

        include opts in query

    commit 08289b3444612920856e6a949a379f61cb46b5e7
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 00:15:12 2024 -0500

        missing import

    commit bc3ca72c084b8e8de678ecbdcf6bbcfe972363e1
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Mar 7 00:10:45 2024 -0500

        more opts support

    commit f7c12cfe5f5b6c6c7895cd5eb4cdeb45757022a1
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 6 23:59:08 2024 -0500

        handle repo opts in request call

    commit 02a75f3996d59ae36f046327fca766e8799ef35b
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 6 22:01:06 2024 -0500

        fix import

    commit 7fe52dc83a80c0f68580d274bd2e60c57ab2e26d
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 6 21:58:59 2024 -0500

        fix fields

    commit f016c3a46d901ca762f5e8824fcd5efad2eede57
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 6 21:47:40 2024 -0500

        move code into kojihub/repos

    commit 9953009d3cc6f08cd16cbaa593ae79796ac86fa2
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 6 21:15:17 2024 -0500

        more unit test fixes

    commit f5decfaff3f56601262752e8a06b6f97bc4cfb33
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 6 20:51:07 2024 -0500

        unit test

    commit b51d4979824abe6ddc402011d21394854f46687e
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Mar 6 20:19:06 2024 -0500

        flake8

    commit aeee5b59df4e9da93db83874f022419c24b37162
    Author: Mike McLean <mikem@redhat.com>
    Date:   Tue Feb 20 18:05:25 2024 -0500

        stub: tracking opts

    commit b5c150b52f575c681bdacb4c87e690653edc465a
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Feb 19 15:11:40 2024 -0500

        different approach for raw clauses

    commit a9001c97935f3ad90571589688b1f291242bad08
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Feb 19 14:32:57 2024 -0500

        and any necessary values and joins

    commit 84a46633b7dc1303e48367b614b99de3730a865d
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Feb 19 14:17:12 2024 -0500

        give hub code a way to raw clauses with QueryView

    commit 5d43c18f56563fc14f12d12c57f044125a5b33f9
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Feb 19 14:09:27 2024 -0500

        private vars

    commit 91992f2e7b0a6cdd5e7cf8b99f6c37cfb20b08a6
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Feb 19 14:02:07 2024 -0500

        saner data from get_fields

    commit 1e581cd5a5f3a6e257c3147a8ea763987984403c
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Feb 19 13:26:34 2024 -0500

        update test and include tag_first_change_event()

    commit 3509300b0b1c6bb516b5552f2b1d37008231efae
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Feb 19 12:42:53 2024 -0500

        revert global verbose option

    commit 4173e8610b0beed3dcea14849da1f115eb43c293
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Feb 19 07:59:48 2024 -0500

        better ordering support in QueryView

    commit 359543b95cd524d5f4d8d82854680452ee07fd00
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Feb 18 01:19:30 2024 -0500

        also include test from multirepo

    commit 1ceb8c01f92cfe5029c78688b14f643e1fa8be12
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Feb 18 00:18:39 2024 -0500

        constraint

    commit 064bfc18b3a07edd602192bc4f48ac52adeedc3f
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sun Feb 18 00:00:15 2024 -0500

        tagFirstChangeEvent, plus fix

    commit 0efbfed21ec3b66841a7e4996e59bc8aaeed352b
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 22:37:08 2024 -0500

        fix

    commit 3ead49b9ed7f643e7ba2db2077993eb515f10e38
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 21:54:05 2024 -0500

        cleanup

    commit be2beb37fd35b46a5b4d60f39c8040640dfc7800
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 21:20:29 2024 -0500

        rename request field, clean up Watcher args

    commit d392a974a1cbba119abc6a9e99e54d45a0cf0d62
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 18:38:21 2024 -0500

        ...

    commit 70ee37dbafc6c4e77a62aac44f11747c0f6bfc25
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 18:37:08 2024 -0500

        use tagLastChangeEvent for min_event=last

    commit 82d0d77679afc163bb5c36e43f834c109d7e6371
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 18:33:04 2024 -0500

        tag_last_change_event: support inheritance

    commit c3c87f8ccf4feea321d9bfa54cc1f223431a8d13
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 17:55:10 2024 -0500

        waitrepo anon mode (no request)

    commit c6994353d8daa4cb615eae4dde0368b97ea33d18
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 09:32:39 2024 -0500

        don't reuse a request for a future event

    commit 22abfadc57adcf11229336eede6459585a293da6
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 09:16:47 2024 -0500

        ...

    commit c7b899c4a62d667d96e8320b6fa96106972f5859
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 09:10:22 2024 -0500

        ...

    commit a185fd86766c283fd9c18a4d95546a8e36fd21c9
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 09:08:31 2024 -0500

        ...

    commit 87401bddac38ebb658f2e9e4fbe36af2e6010e42
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 09:06:48 2024 -0500

        ...

    commit bb72bd0e2d78f2d21168144a976e772473efeb16
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 08:59:44 2024 -0500

        ...

    commit 4dbeb0edfa55cf39f4c897b3c15345e2daf9dad6
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 08:59:10 2024 -0500

        ...

    commit 994e13d538d580ea9f7499310b8a0e4cd841af07
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 08:57:22 2024 -0500

        ...

    commit 1fee9331e72e4d48eccfd640183563a909181af6
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 08:53:06 2024 -0500

        ...

    commit e74eea41048a5ec6f4a9c52025c2e452f640a808
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 00:57:11 2024 -0500

        ...

    commit ec1a581ba23b292ab840b740dabd1f3e4854fe33
    Author: Mike McLean <mikem@redhat.com>
    Date:   Sat Feb 17 00:48:48 2024 -0500

        attempting to wire this up into newRepo and waitrepo task

    commit 7eee457230a2b0e6aa9b974e94e4ca516227a196
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 16 18:58:18 2024 -0500

        ...

    commit 1c719d642da5f5c2ca0b7ce9af170054767423c6
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 16 18:56:11 2024 -0500

        adjust checkRepoRequest return

    commit e6e5f15961c7801b1777743b799fbe2c96a08138
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 16 18:00:27 2024 -0500

        handle repo requests in scheduler loop

    commit a0dde4e3625110671bcea7abbdab0f0c03142cbc
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 16 11:06:00 2024 -0500

        tweak repo report in taginfo cli

    commit 2d860a17caf770507c67a89ac234d17c200c30ab
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 16 10:46:13 2024 -0500

        enable/clarify new repo fields

    commit 7204ce3753450981300bf78102fc40f1b41786b4
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 16 09:38:59 2024 -0500

        syntax

    commit 96236f4ef93e5babeb0800b5b4a16117a3e8c1df
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 16 10:20:34 2024 -0500

        pull tag_last_change_event and repo fields from multirepo branch

    commit a707c19eda9bc6efc22ce004367cbee960fcccb6
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 16 09:26:07 2024 -0500

        partial: check_repo_queue

    commit a208d128e60bdb4ad531938d55b2c793b65ab24b
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 15 19:35:03 2024 -0500

        ...

    commit e9a601059fb9ceb89ec9b84680afd6dc276424f9
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 15 19:22:55 2024 -0500

        ...

    commit 067e385861766d7a355d5671a1e1e73ebd737b97
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 15 19:14:11 2024 -0500

        use RepoView more

    commit e5b4a58b65c6f195f724fb135acea6dd18abc3c2
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 15 17:37:47 2024 -0500

        executeOne

    commit 45aecfeb0a32c097fc65574296958573e6405009
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 15 17:29:06 2024 -0500

        ...

    commit 41314dc10c3a1a13f39628de5caedc7486193c7b
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 15 17:27:40 2024 -0500

        only return one req

    commit c44ed9e4e3bc349e4107df79847049503a2c75be
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 15 14:57:11 2024 -0500

        ...

    commit cfd60878ada8196616fd401fb6cbaf7aa2dcc98b
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 15 11:10:31 2024 -0500

        ...

    commit 11f65335ca9c6167b8f457460a58471c37ae4098
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 15 09:12:34 2024 -0500

        testing

    commit c05f8f3b3f64c3aeef5ff0296dc181123c756952
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Feb 14 22:52:14 2024 -0500

        flesh out stub

    commit fd9c57c2c95bb5a1bd051d9d1e7e73e2f3fcb9b0
    Author: Mike McLean <mikem@redhat.com>
    Date:   Wed Feb 14 22:26:19 2024 -0500

        ...

    commit d59f38a5adc90607556a1671c85b808209389edd
    Author: Mike McLean <mikem@redhat.com>
    Date:   Tue Feb 6 22:19:36 2024 -0500

        more fragments

    commit 2d1b45c66e1cc3f41f6812b7b6d4bd66c4acf419
    Author: Mike McLean <mikem@redhat.com>
    Date:   Tue Feb 6 20:38:04 2024 -0500

        XXX DEBUG CODE

    commit d8e3a4bd205acb5ec1940fa30e29701f0a358d51
    Author: Mike McLean <mikem@redhat.com>
    Date:   Tue Feb 6 20:37:52 2024 -0500

        ...

    commit 0744a29bd303bf9b381aa48e3e5dd98e8b7373ef
    Author: Mike McLean <mikem@redhat.com>
    Date:   Tue Feb 6 20:37:40 2024 -0500

        ...

    commit 0726f8d22b227e002f7ddd927829a1e3ec66681f
    Author: Mike McLean <mikem@redhat.com>
    Date:   Tue Feb 6 20:27:22 2024 -0500

        RepoWatcher stub

    commit a74a74ef9688b1d27b528dd8e2de8ff3b63f97ae
    Author: Mike McLean <mikem@redhat.com>
    Date:   Tue Feb 6 00:05:49 2024 -0500

        ...

    commit d68c2902015a4998f59355aa224924e5ace21b0a
    Author: Mike McLean <mikem@redhat.com>
    Date:   Mon Feb 5 08:18:56 2024 -0500

        ...

    commit ff8538344e1bf24d7b94ad45f26fb1548be4782d
    Author: Mike McLean <mikem@redhat.com>
    Date:   Fri Feb 2 00:00:41 2024 -0500

        partial

    commit f618ed321108e0094ab95e054cb5d53fb2e0dfe1
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 1 23:54:57 2024 -0500

        tweak unit test

    commit 208a2f441401cefd65a7a92d91b6b76bf5dd97d3
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 1 22:52:37 2024 -0500

        comments

    commit 8fe5b4f0d773f190c037ab95520623a3d250c069
    Author: Mike McLean <mikem@redhat.com>
    Date:   Thu Feb 1 01:43:28 2024 -0500

        repo_queue stub
2024-06-21 14:35:59 -04:00
d68a9273e1 PR#4117: RetryError is subclass of AuthError
Merges #4117
https://pagure.io/koji/pull-request/4117

Fixes: #4055
https://pagure.io/koji/issue/4055
Unreachable code in (at least) kojid
2024-06-19 15:27:32 +02:00
5a5625c455 RetryError is subclass of AuthError
so, current code is unreachable.
2024-06-19 15:25:40 +02:00
cd93749a36 PR#4118: basic unit test for kojid main
Merges #4118
https://pagure.io/koji/pull-request/4118

Related #4055
https://pagure.io/koji/issue/4055
2024-06-19 15:24:11 +02:00
2a66fe2a34 basic unit test for kojid main 2024-06-19 15:24:05 +02:00
65758fea93 PR#4013: let tag.extra override tag arches for noarch
Merges #4013
https://pagure.io/koji/pull-request/4013

Fixes: #3809
https://pagure.io/koji/issue/3809
RFE: Exclude i686 builders for naorch builds
2024-06-18 13:42:59 +02:00
e93d83f5b9 honor noarch_arches for srpm tasks 2024-06-18 13:42:47 +02:00
a451226b48 let tag.extra override tag arches for noarch 2024-06-18 13:42:47 +02:00
2bd42517d3 fix test compatibility 2024-06-12 11:00:54 +02:00
2c6dba34e7 PR#4093: don't ignore files in uploadFile
Merges #4093
https://pagure.io/koji/pull-request/4093

Fixes: #4094
https://pagure.io/koji/issue/4094
uploadFile silently ignores missing or empty files
2024-06-12 10:54:07 +02:00
5f02bcf7a0 don't ignore files in uploadFile
(but preserve behavior of uploadTree)
2024-06-12 10:54:00 +02:00
c1a6fdd3b7 PR#4111: fix flake8
Merges #4111
https://pagure.io/koji/pull-request/4111
2024-06-10 09:24:51 +02:00
a090607a88 fix flake8 2024-06-10 09:23:45 +02:00
aacf7087ec PR#4110: DBHandler class dropped from API test
Merges #4110
https://pagure.io/koji/pull-request/4110
2024-06-10 09:23:19 +02:00
a9a5faeae6 DBHandler class dropped from API test
PR https://pagure.io/koji/pull-request/4070 is introducing API testing,
but https://pagure.io/koji/pull-request/4095 dropped DBHandler
meanwhile.

Related: https://pagure.io/koji/pull-request/4070
Related: https://pagure.io/koji/pull-request/4095
2024-06-10 09:22:11 +02:00
00b1163544 flake8 2024-06-10 09:02:56 +02:00
51ba6b6dfd note modules and imported globals in error 2024-06-10 09:02:56 +02:00
b96ea3934f handle koji versions back to 1.18 2024-06-10 09:02:56 +02:00
a92d6800b2 update api data 2024-06-10 09:02:56 +02:00
7cbf404366 a bit more filtering 2024-06-10 09:02:56 +02:00
db4c6de1b7 also check class methods 2024-06-10 09:02:56 +02:00
7f98bceb6b continue to import xmlrpc_client for api compat 2024-06-10 09:02:56 +02:00
eedb9352e2 basic dump-api tool 2024-06-10 09:02:56 +02:00
f85f8cf675 PR#4107: Drop unused auth options
Merges #4107
https://pagure.io/koji/pull-request/4107

Fixes: #4106
https://pagure.io/koji/issue/4106
Unused auth options
2024-06-10 09:00:22 +02:00
Jana Cupova
6b2c347a1e Drop unused auth options
Fixes: https://pagure.io/koji/issue/4106
2024-06-07 08:35:52 +02:00
8a49e03084 PR#4076: log if a restart is pending
Merges #4076
https://pagure.io/koji/pull-request/4076
2024-06-04 12:57:44 +02:00
99d86d064e log if a restart is pending 2024-06-04 12:57:39 +02:00
2b45e9889e PR#4082: More mocking cleanup
Merges #4082
https://pagure.io/koji/pull-request/4082
2024-06-04 12:55:04 +02:00
48d78bd535 more mock.patch cleanup 2024-06-04 12:54:58 +02:00
1a51320e86 avoid test failure when running in console 2024-06-04 12:54:58 +02:00
8d65a6ef18 PR#4087: Increase index.py unit tests
Merges #4087
https://pagure.io/koji/pull-request/4087
2024-06-04 12:51:38 +02:00
Jana Cupova
eabf1c8b3d Increase index.py unit tests 2024-06-04 12:51:31 +02:00
86acc4d3dd PR#4090: Koji 1.34.1 release notes
Merges #4090
https://pagure.io/koji/pull-request/4090

Fixes: #4089
https://pagure.io/koji/issue/4089
release notes 1.34.1
2024-05-30 13:09:31 +02:00
18c258e44f Koji 1.34.1 release notes
Related: https://pagure.io/koji/issue/4089
2024-05-30 13:09:24 +02:00
b997909f48 PR#4097: stop suggesting that users need repo permission
Merges #4097
https://pagure.io/koji/pull-request/4097

Related #4099
https://pagure.io/koji/issue/4099
2024-05-20 11:42:17 +02:00
70b0556aca stop suggesting that users need repo permission
regen-repo allows (only) newRepo
repo allows this, but also repo state management. It is only for kojira.

The current acl error reads:
koji.ActionNotAllowed: repo permission required

This prompts users to request the wrong permission
2024-05-20 11:42:09 +02:00
5d25e10a49 PR#4095: drop unused DBHandler class
Merges #4095
https://pagure.io/koji/pull-request/4095

Fixes: #4096
https://pagure.io/koji/issue/4096
2024-05-13 10:28:07 +02:00
68833a10a7 drop unused DBHandler class
This has been unreferenced since #507 was merged
See: https://pagure.io/koji/pull-request/507
2024-05-10 16:08:01 -04:00
54b0aa3355 PR#4088: tests: py3 versions compatibility fixes
Merges #4088
https://pagure.io/koji/pull-request/4088
2024-05-06 13:26:31 +02:00
5801ac8b13 tests: py3 versions compatibility fixes 2024-05-06 13:17:48 +02:00
df86feab7f PR#4056: avoid explicit rowlock in taskWaitCheck
Merges #4056
https://pagure.io/koji/pull-request/4056

Relates: #4057
https://pagure.io/koji/issue/4057
Deadlocks in taskWaitCheck
2024-05-06 11:26:10 +02:00
b283835220 avoid explicit rowlock in taskWaitCheck 2024-05-06 11:26:01 +02:00
a9526e8403 PR#4086: Drop part of code related to host without update_ts
Merges #4086
https://pagure.io/koji/pull-request/4086

Fixes: #4085
https://pagure.io/koji/issue/4085
Remove part of code in index.py which is for older hub related to update_ts for host
2024-05-06 11:23:35 +02:00
Jana Cupova
9b27e267da Drop part of code related to host without update_ts
Fixes: https://pagure.io/koji/issue/4085
2024-05-06 11:23:26 +02:00
e5ec3dad0b PR#4066: fix errors in channel policy
Merges #4066
https://pagure.io/koji/pull-request/4066

Fixes: #4065
https://pagure.io/koji/issue/4065
build target policy failure
2024-04-24 15:00:55 +02:00
d0e90d3687 fix errors in channel policy
Fixes: https://pagure.io/koji/issue/4065
2024-04-24 15:00:45 +02:00
d0de585229 PR#4073: sort checksums before inserting
Merges #4073
https://pagure.io/koji/pull-request/4073

Fixes: #4072
https://pagure.io/koji/issue/4072
deadlocks in create_rpm_checksum
2024-04-24 15:00:03 +02:00
1932796ef5 use upsert to avoid duplicate inserts 2024-04-24 14:59:54 +02:00
d54dedc039 sort checksums before inserting 2024-04-24 14:59:54 +02:00
c7aeda7898 fakehub --no-commit option 2024-04-24 14:59:54 +02:00
8187761c01 PR#4051: fixes for list-users
Merges #4051
https://pagure.io/koji/pull-request/4051

Fixes: #4050
https://pagure.io/koji/issue/4050
updated list-users command fails for 1.34 hub
2024-04-24 14:48:07 +02:00
bf6e437df3 new cli tests for coverage 2024-04-24 14:47:57 +02:00
eb18210744 fix unit tests 2024-04-24 14:47:57 +02:00
9200c67ade warn if hub does not support --usertype any 2024-04-24 14:47:57 +02:00
8e74f198a2 adjust help 2024-04-24 14:47:57 +02:00
32239f2c68 address issues with list-users
Fixes: https://pagure.io/koji/issue/4050
2024-04-24 14:47:57 +02:00
f5c9ca95f6 PR#4068: Rework mocking of QueryProcessor in DBQueryTestCase
Merges #4068
https://pagure.io/koji/pull-request/4068

Fixes: #4071
https://pagure.io/koji/issue/4071
DBQueryTestCase class doesn't work for other hub modules

Relates: #2758
https://pagure.io/koji/issue/2758
DBQueryTest doesn't clean mock env
2024-04-15 11:08:38 +02:00
2485b87294 more missing tearDowns 2024-04-15 11:08:29 +02:00
f49ee80a7b fix missing tearDown methods for numerous tests 2024-04-15 11:08:29 +02:00
a807137c3c rework DBQueryTestCase mocking
Mocking kojihub.kojihub.QueryProcessor doesn't affect other import
paths, e.g. in other kojihub modules
2024-04-15 11:08:29 +02:00
4df957cb3d PR#4069: add requirement: defusedxml in setup.py
Merges #4069
https://pagure.io/koji/pull-request/4069

Fixes: #4067
https://pagure.io/koji/issue/4067
defusedxml missing from setup.py
2024-04-12 12:10:12 +02:00
ad7cea732d add requirement: defusedxml in setup.py
fixes: #4067
2024-04-12 12:10:05 +02:00
6e2e795be2 PR#4046: kiwi: Generate full logs with debug information
Merges #4046
https://pagure.io/koji/pull-request/4046

Fixes #4048
https://pagure.io/koji/issue/4048
2024-04-10 14:41:22 +02:00
baa5a735e1 kiwi: Generate full logs with debug information
Without this flag, we do not have logs that include the details of
what happened during the build.
2024-04-10 14:41:15 +02:00
d331654069 PR#4012: rmtree: use fork
Merges #4012
https://pagure.io/koji/pull-request/4012

Fixes: #3755
https://pagure.io/koji/issue/3755
koji-gc occasionally gets Directory not empty fault on delete

Fixes: #2481
https://pagure.io/koji/issue/2481
koji.util.rmtree() is not multi-process/thread safe
2024-04-10 11:20:23 +02:00
4dd0e24b00 correct a few comment lines 2024-04-10 11:20:15 +02:00
ce4718f1fb fix samefile check and relative path test 2024-04-10 11:20:15 +02:00
e8ae18fcc8 Align our cwd tracking with os 2024-04-10 11:20:15 +02:00
895d0cf8ec avoid double fork in kojira rmtree 2024-04-10 11:20:15 +02:00
f9eefde102 cleanup 2024-04-10 11:20:15 +02:00
c0917955c0 more testcases 2024-04-10 11:20:15 +02:00
4fddafc54d rmtree: use fork
These changes work around a thread safety issue in our rmtree
implementation, which uses chdir to traverse the directory tree.
Using chdir resolves issues deleting paths longer than PATH_MAX, but
makes the code inherently unsafe in a threaded environment.

Now, the main rmtree function uses fork to perform the actions in a
dedicated process.
To avoid possible locking issues with the logging module, we introduce a
simple proxy logger for the subprocess.

Fixes: https://pagure.io/koji/issue/3755

For historical context see:
https://pagure.io/koji/issue/201
https://pagure.io/koji/issue/2481
https://pagure.io/koji/issue/2714
2024-04-10 11:20:15 +02:00
c4b50c65c7 PR#4044: Update getNextTask for scheduler
Merges #4044
https://pagure.io/koji/pull-request/4044

Fixes: #4028
https://pagure.io/koji/issue/4028
Clean getNextTask
2024-03-28 15:58:15 +01:00
9c8b9a1556 skip updateBuildroots if we have just taken a task 2024-03-28 15:58:07 +01:00
1d0d4f2683 add unit tests and drop obsolete ones 2024-03-28 15:58:07 +01:00
5c383b6175 clean up logging 2024-03-28 15:58:07 +01:00
3554a1fb43 update getNextTask to use host.getTasks 2024-03-28 15:58:07 +01:00
3315e3c379 PR#4000: Fix remove-tag-inheritance with priority
Merges #4000
https://pagure.io/koji/pull-request/4000

Fixes: #2804
https://pagure.io/koji/issue/2804
allow duplicate parents with different priorities in the same inheritance level

Fixes: #3985
https://pagure.io/koji/issue/3985
remove-tag-inheritance ignores priority
2024-03-26 15:11:34 +01:00
Jana Cupova
63a6f43d8a Fix remove-tag-inheritance with priority
Fix remote-tag-inheritance with priority

Fixes: https://pagure.io/koji/issue/3985
2024-03-26 15:11:24 +01:00
41ab495f28 PR#4043: --limit from scheduler-logs/info
Merges #4043
https://pagure.io/koji/pull-request/4043

Fixes: #4042
https://pagure.io/koji/issue/4042
scheduler-logs/info don't limit returned records
2024-03-26 12:28:16 +01:00
2c9f69524a fix flake8 2024-03-26 12:27:31 +01:00
2c2e9209d1 fix typo 2024-03-20 14:11:43 +01:00
2468cb989d modify for 1.34.1 2024-03-20 13:48:59 +01:00
030a54b8d4 use hub version check for compat code 2024-03-20 13:48:58 +01:00
fe3474c0e8 better compatibility errors 2024-03-20 13:48:58 +01:00
f3306a371b backward compatibility 2024-03-20 13:48:58 +01:00
43b173bb17 --limit from scheduler-logs/info
Related: https://pagure.io/koji/issue/4042
2024-03-20 13:48:58 +01:00
91f410f8fb PR#4025: docs: mock's configuration
Merges #4025
https://pagure.io/koji/pull-request/4025

Fixes: #4019
https://pagure.io/koji/issue/4019
RLIMITS settings for nspawn
2024-03-19 11:10:03 +01:00
88ea24441d doc updates 2024-03-19 11:09:54 +01:00
54f32e8266 docs: mock's configuration
Related: https://pagure.io/koji/issue/4019
2024-03-19 11:09:54 +01:00
296cf75468 PR#4052: fix formatting of rpm in title
Merges #4052
https://pagure.io/koji/pull-request/4052

Fixes #4053
https://pagure.io/koji/issue/4053
2024-03-19 10:53:32 +01:00
2af702b71c fix formatting of rpm in title 2024-03-19 10:53:24 +01:00
d7d4e4f1d2 PR#4026: Better index for rpm lookup
Merges #4026
https://pagure.io/koji/pull-request/4026

Fixes: #4022
https://pagure.io/koji/issue/4022
rpminfo_unique_nvra_not_draft index is insufficient for rpm lookups
2024-03-19 10:52:47 +01:00
d0c1b4d37d Better index for rpm lookup
Related: https://pagure.io/koji/issue/4022
2024-03-19 10:52:33 +01:00
c44be86c40 PR#4023: split out buildroot log watching logic
Merges #4023
https://pagure.io/koji/pull-request/4023

Fixes: #4009
https://pagure.io/koji/issue/4009
RFE: Grab /var/log/dnf5.log from Mock buildroot

Relates: #3875
https://pagure.io/koji/issue/3875
Log the macros enabled in side tag
2024-03-13 10:09:25 +01:00
aa370c20a2 capture dnf logs
Fixes https://pagure.io/koji/issue/4009
2024-03-13 10:09:15 +01:00
9694f07aef reduce log noise a bit 2024-03-13 10:09:15 +01:00
60b71020f0 split out buildroot log watching logic 2024-03-13 10:09:15 +01:00
c51ae5d6b3 typo in BuildMavenTask 2024-03-13 10:09:15 +01:00
27160b1a58 also use in appliance/livecd/liveimage 2024-03-13 10:09:15 +01:00
c08b3fd042 rename var 2024-03-13 10:09:15 +01:00
91f176ccb5 Track uploads in BuildRoot and log mock config
Related: https://pagure.io/koji/issue/3875
2024-03-13 10:09:15 +01:00
eba8de2473 PR#3970: Add CLI with users with given permission
Merges #3970
https://pagure.io/koji/pull-request/3970

Fixes: #3950
https://pagure.io/koji/issue/3950
Add command to list users with a particular permission
2024-03-11 13:12:33 +01:00
Jana Cupova
c62e3467b5 Add CLI with users with given permission
Fixes: https://pagure.io/koji/issue/3950
2024-03-11 13:12:20 +01:00
7d126abe91 PR#4032: implicit task refusals
Merges #4032
https://pagure.io/koji/pull-request/4032

https://pagure.io/koji/issue/4035
2024-03-06 11:14:20 +01:00
c00e9b3c2e unit test 2024-03-06 11:14:12 +01:00
df55636d6d implicit task refusals 2024-03-06 11:14:12 +01:00
47e2d35c33 PR#4041: Use host maxtasks if available
Merges #4041
https://pagure.io/koji/pull-request/4041

https://pagure.io/koji/issue/4030
https://pagure.io/koji/issue/4038
2024-03-05 13:23:06 +01:00
822b81644b flake8, fix typo 2024-03-05 13:22:58 +01:00
f8c633f310 streamline hub calls 2024-03-05 13:22:58 +01:00
fbb24d631d unit test 2024-03-05 13:22:58 +01:00
fadee51aff handle missing host data, use self.maxjobs as default 2024-03-05 13:22:58 +01:00
8b554bd3ca Use also builder's maxjobs setting in scheduler
Related: https://pagure.io/koji/issue/4038
2024-03-05 13:22:58 +01:00
212059d049 json conversion 2024-03-05 13:22:58 +01:00
eb71941ea9 Basic host data for scheduler
Related: https://pagure.io/koji/issue/4030
2024-03-05 13:22:58 +01:00
3d6b10905e PR#4037: Fix temporary cg_import.log file path
Merges #4037
https://pagure.io/koji/pull-request/4037

Fixes: #4036
https://pagure.io/koji/issue/4036
cg import uses wrong log path
2024-03-05 13:20:01 +01:00
053c4f95b2 Fix temporary cg_import.log file path
Related: https://pagure.io/koji/issue/4036
2024-03-05 13:19:53 +01:00
d58031395f PR#3974: Use dnf5-compatible "group install" command
Merges #3974
https://pagure.io/koji/pull-request/3974

Fixes: #3971
https://pagure.io/koji/issue/3971
Do 'dnf group install' instead of 'dnf groupinstall'
2024-03-05 13:17:43 +01:00
4ad92b5cd6 Use dnf5-compatible "group install" command
* yum knows only "yum groupinstall"
 * dnf < 5 knows both
 * dnf-5 only "dnf5 group install"

From RHEL5 version of yum, @group syntax is supported, so we can
replace all groupinstall commands with "install @group".

Related: https://pagure.io/koji/issue/3971
2024-03-05 13:17:35 +01:00
dd128f8617 PR#4015: provide draft flag to build policy
Merges #4015
https://pagure.io/koji/pull-request/4015

Relates: #4014
https://pagure.io/koji/issue/4014
RFE: disable draft builds
2024-03-04 16:53:23 +01:00
ecd5d96023 provide draft flag to build policy
Related: https://pagure.io/koji/issue/4014
2024-03-04 16:53:12 +01:00
d6a59cb585 PR#3891: Don't try to resolve server version for old hubs
Merges #3891
https://pagure.io/koji/pull-request/3891

Fixes: #3890
https://pagure.io/koji/issue/3890
Don't try to resolve server version for older hubs
2024-02-29 15:40:12 +01:00
cfd6d3064f show hub version in koji hello 2024-02-29 15:40:03 +01:00
8e6737a116 avoid clearing cached hub version 2024-02-29 15:40:03 +01:00
62f279ad43 move version fetching to hub_version_str property 2024-02-29 15:40:03 +01:00
7a9b0561eb Don't try to resolve server version for old hubs
Related: https://pagure.io/koji/issue/3890
2024-02-29 15:40:03 +01:00
d43ad529c1 PR#3999: Have builders refuse repo tasks if they can't access /mnt/koji
Merges #3999
https://pagure.io/koji/pull-request/3999

Fixes: #4002
https://pagure.io/koji/issue/4002
Misconfigured createrepo builders can fail a ton of regens
2024-02-29 11:01:51 +01:00
68009db154 log refusal message 2024-02-29 11:01:43 +01:00
4a31c42edd handle refusal with an exception 2024-02-29 11:01:43 +01:00
4b35b7b729 typo 2024-02-29 11:01:43 +01:00
e169a6bf3e in newRepo too 2024-02-29 11:01:43 +01:00
56d861bff3 refuse createrepo tasks if no fs access 2024-02-29 11:01:43 +01:00
4bc347ca03 PR#4018: Fix scheduler log ordering
Merges #4018
https://pagure.io/koji/pull-request/4018

Fixes: #4017
https://pagure.io/koji/issue/4017
scheduler logs are out of order
2024-02-27 12:33:01 +01:00
9517fb9ee1 more unit tests 2024-02-27 12:32:52 +01:00
feb0417df5 fakehub: better kw arg handling 2024-02-27 12:32:52 +01:00
a7006a283f order log messages 2024-02-27 12:32:52 +01:00
374f4e3793 better ordering support in QueryView 2024-02-27 12:32:52 +01:00
92298fb943 PR#4011: Show only active channels at clusterhealth
Merges #4011
https://pagure.io/koji/pull-request/4011

Fixes: #4010
https://pagure.io/koji/issue/4010
Cluster health page show disabled channels
2024-02-21 15:33:51 +01:00
40db49a830 Show only active channels at clusterhealth
Related: https://pagure.io/koji/issue/4010
2024-02-21 15:33:43 +01:00
31cefe8695 PR#3944: Backup signature headers in delete_rpm_sig
Merges #3944
https://pagure.io/koji/pull-request/3944

Fixes: #3956
https://pagure.io/koji/issue/3956
Backup signature headers in delete_rpm_sig
2024-02-21 12:29:05 +01:00
e0fea6a3b0 delete_rpm_sig: check header files first
also fixup some error logging and update unit tests
2024-02-21 12:28:56 +01:00
f732aad509 Backup signature headers in delete_rpm_sig 2024-02-21 12:28:56 +01:00
15018712bc PR#4008: CLI list-users with filters from listUsers
Merges #4008
https://pagure.io/koji/pull-request/4008

Fixes: #4001
https://pagure.io/koji/issue/4001
CLI: add remaining filters from listUsers API to list-users
2024-02-21 12:28:13 +01:00
Jana Cupova
d31750bf70 CLI list-users with filters from listUsers
Fixes: https://pagure.io/koji/issue/4001
2024-02-15 08:25:19 +01:00
690c53b897 PR#3969: New scmpolicy plugin
Merges #3969
https://pagure.io/koji/pull-request/3969

Fixes: #3968
https://pagure.io/koji/issue/3968
scmpolicy plugin
2024-02-09 14:48:38 +01:00
2013692fc9 New scmpolicy plugin
Plugin for scm policy using data from SCM checkout.

Related: https://pagure.io/koji/issue/3968
2024-02-09 14:47:37 +01:00
0251961929 PR#3989: Oz: don't hardcode the image size unit as 'G'
Merges #3989
https://pagure.io/koji/pull-request/3989

Fixes: #3993
https://pagure.io/koji/issue/3993
 Oz: don't hardcode the image size unit as 'G'
2024-02-07 14:45:08 +01:00
710fe46e0b Oz: don't hardcode the image size unit as 'G'
This has never been necessary, because oz has always treated a
size with no unit as being in gibibytes. After
https://github.com/clalancette/oz/pull/310 it will be actively
harmful, because it will prevent us from using that new ability
of oz to specify a size using any other unit, as we have a
specific reason to want:
https://bugzilla.redhat.com/show_bug.cgi?id=2247611

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-02-07 14:44:59 +01:00
ee07eb7b43 PR#4005: Fix bandit "nosec" comments
Merges #4005
https://pagure.io/koji/pull-request/4005

Fixes: #4004
https://pagure.io/koji/issue/4004
Fix bandit warnings
2024-02-06 11:10:53 +01:00
77b7e3a0c9 Fix bandit "nosec" comments
Related: https://pagure.io/koji/issue/4004
2024-02-06 11:09:16 +01:00
167ee017f2 PR#3998: typo in set_refusal
Merges #3998
https://pagure.io/koji/pull-request/3998

Fixes: #3997
https://pagure.io/koji/issue/3997
host.refuseTask failure
2024-02-05 11:28:50 +01:00
2a6e18fa35 typo in set_refusal
Fixes https://pagure.io/koji/issue/3997
2024-02-05 11:28:43 +01:00
6198e294ab PR#3996: Document draft builds
Merges #3996
https://pagure.io/koji/pull-request/3996

Fixes #3987
https://pagure.io/koji/issue/3987
2024-02-05 11:24:39 +01:00
ce575c15e3 unrelated fixes 2024-02-05 11:24:32 +01:00
430a58a4f7 draft builds doc 2024-02-05 11:24:32 +01:00
91cf2b5025 PR#3975: Bandit [B411]: use defusedxml to prevent remote XML attacks
Merges #3975
https://pagure.io/koji/pull-request/3975

Fixes: #3964
https://pagure.io/koji/issue/3964
Fix bandit xmlrpc issue
2024-02-02 09:10:17 +01:00
527c460d9a fix test requirements 2024-02-02 09:09:42 +01:00
c629d6d99f add defusedxml installation in Dockerfiles 2024-02-02 09:08:28 +01:00
37047bd73e update spec 2024-02-02 09:08:21 +01:00
f41b8c70a7 Bandit [B411]: use defusedxml to prevent remote XML attacks
- putting xmlrpc stuff into koji.xmlrpcplus
- adding koji.xmlrpcplus.xmlrpc_server to refer
- replacing refs of original xmlrpc.client.dumps to enhanced
  koji.xmlrpcplus.dumps

fixes: #3964
2024-02-02 09:08:18 +01:00
a96b5a9b07 PR#3953: Stop lowercasing the policy failure reason
Merges #3953
https://pagure.io/koji/pull-request/3953

Fixes #3984
https://pagure.io/koji/issue/3984
2024-02-02 09:05:04 +01:00
679aae9214 Lowercase result instead 2024-02-02 09:04:55 +01:00
75c0ffc5c8 Stop lowercasing the policy failure reason 2024-02-02 09:04:54 +01:00
1f585efce0 PR#3931: web: add some handy links for module builds
Merges #3931
https://pagure.io/koji/pull-request/3931
2024-02-02 09:03:55 +01:00
f255881082 web: add some handy links for module builds 2024-02-02 09:03:47 +01:00
aa94ecb0f8 PR#3942: policy_data_from_task_args: set target to None when it doesn't exist
Merges #3942
https://pagure.io/koji/pull-request/3942

Fixes: #3941
https://pagure.io/koji/issue/3941
build task: nonexistent buildtarget with opts.repo_id breaks policy check in make_task
2024-01-30 12:58:07 +01:00
1d02394c4b policy_data_from_task_args: set target in policy_data to None if it doesn't exist
for build task, the `build target` could be `destination tag` when `opts.repo_id` is specified

fixes #3941
2024-01-30 12:57:56 +01:00
ff9dfe856a PR#3992: Remove rpm-py-installer, update test docs and update Dockerfiles
Merges #3992
https://pagure.io/koji/pull-request/3992

Fixes: #3868
https://pagure.io/koji/issue/3868
optional dependency rpm-py-installer seems to be deprecated by upstream, causing `make test` to fail
2024-01-30 12:44:16 +01:00
Jana Cupova
ba612e1e90 Remove rpm-py-installer, update test docs and update Dockerfiles
Remove rpm-py-installer from requirements
Check duplicite and unused packages in Dockerfiles and test-requirements
Update docs about unit tests.

Fixes: https://pagure.io/koji/issue/3868
2024-01-30 12:44:07 +01:00
670 changed files with 106873 additions and 10249 deletions

3
.bandit.yaml Normal file
View file

@ -0,0 +1,3 @@
markupsafe_xss:
allowed_calls:
- _MarkTrustedValue

View file

@ -4,7 +4,9 @@ data_file = .coverage3
omit =
setup.py
/usr/*
/tmp/*
tests/*
devtools/*
.tox/*
[report]

27
.editorconfig Normal file
View file

@ -0,0 +1,27 @@
# Topmost editorconfig for project, don't ascend
# to parent directories when scanning configs
root = true
# All files: UTF-8 with Unix-style newlines,
# no trailing whitespace, and a final newline
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
# JavaScript, CSS, Python, shell: 4-space indents
[{**/*.{js,css,py,sh},runtests,cli/koji,vm/kojivmd}]
indent_style = space
indent_size = 4
# Makefile: tab indents
[**/Makefile]
indent_style = tab
tab_width = 8
# jinja html: 2-space indents
[**/*.html.j2]
indent_style = space
indent_size = 2

View file

@ -0,0 +1,37 @@
on: [push, pull_request]
jobs:
flake8:
runs-on: podman
container:
image: forge.fedoraproject.org/koji/koji-test:fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8
steps:
- run: >-
git clone ${{ forgejo.event.pull_request.head.repo.clone_url || format('{0}/{1}', forgejo.server_url, forgejo.repository) }} . &&
git checkout ${{ forgejo.event.pull_request.head.sha || forgejo.sha }}
- run: make flake8
bandit:
runs-on: podman
container:
image: forge.fedoraproject.org/koji/koji-test:fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8
steps:
- run: >-
git clone ${{ forgejo.event.pull_request.head.repo.clone_url || format('{0}/{1}', forgejo.server_url, forgejo.repository) }} . &&
git checkout ${{ forgejo.event.pull_request.head.sha || forgejo.sha }}
- run: make bandit
tests:
runs-on: podman
strategy:
matrix:
variant:
- fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d
- fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8
- fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8
- centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32
- centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b
container:
image: forge.fedoraproject.org/koji/koji-test:${{matrix.variant}}
steps:
- run: >-
git clone ${{ forgejo.event.pull_request.head.repo.clone_url || format('{0}/{1}', forgejo.server_url, forgejo.repository) }} . &&
git checkout ${{ forgejo.event.pull_request.head.sha || forgejo.sha }}
- run: make test3

22
.readthedocs.yaml Normal file
View file

@ -0,0 +1,22 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version, and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.13"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Optionally, but recommended,
# declare the Python requirements required to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt

View file

@ -71,6 +71,9 @@ clean:
rm -rf __pycache__
rm -rf devtools/fakehubc devtools/fakewebc devtools/__pycache__
rm -rf koji-$(VERSION)
rm -rf build dist koji.egg-info
find -name '*.pyi' -delete
find -name py.typed -delete
for d in $(SUBDIRS); do make -s -C $$d clean; done
find ./tests -name "__pycache__" -exec rm -rf {} \; ||:
find ./tests -name "*.pyc" -exec rm -f {} \;

View file

@ -27,32 +27,33 @@ Communicate
Bugs/RFEs
---------
If you have found a bug or would like to request a new feature, please [report an issue in Pagure](https://pagure.io/koji/issues).
If you have found a bug or would like to request a new feature, please [report an issue in Forgejo](https://forge.fedoraproject.org/koji/koji/issues).
Download
--------
The koji source code can be downloaded with git via:
git clone https://pagure.io/koji.git
git clone https://forge.fedoraproject.org/koji/koji.git
You may browse code at https://pagure.io/koji
You may browse code at https://forge.fedoraproject.org/koji/koji
Archived releases can be found at https://pagure.io/koji/releases
Archived releases can be found at https://forge.fedoraproject.org/koji/koji/releases
Documentation
-------------
See: https://docs.pagure.org/koji/
See: https://koji.readthedocs.io/en/latest/index.html
Related Software
----------------
* [Mock](https://fedoraproject.org/wiki/Projects/Mock): The tool Koji uses to generate buildroots
* [Yum](http://yum.baseurl.org/)
* [Pungi](https://pagure.io/pungi): Use Pungi to "compose" Koji builds into highly customizable Yum repositories.
* [Koji Tools](https://pagure.io/koji-tools): Various utilities for Koji
* [Yum](http://yum.baseurl.org/) - RPM package manager
* [DNF](https://github.com/rpm-software-management/dnf) / [DNF5](https://github.com/rpm-software-management/dnf5) - Next-gen RPM package manager
* [Pungi](https://forge.fedoraproject.org/pungi/pungi/): Use Pungi to "compose" Koji builds into highly customizable Yum/DNF repositories.
* [Koji Tools](https://forge.fedoraproject.org/koji/koji-tools): Various utilities for Koji
* [Kojiji](https://github.com/release-engineering/kojiji): Koji Java Interface
* [txkoji](https://github.com/ktdreyer/txkoji): Async interface to Koji, using Twisted
* [koji-hs](https://hackage.haskell.org/package/koji): Koji Haskell Interface

View file

@ -2,6 +2,7 @@ PYVER_MAJOR := $(shell $(PYTHON) -c 'import sys; print(".".join(sys.version.spli
BINFILES = kojid
LIBEXECFILES = mergerepos
SBINDIR ?= /usr/sbin
SYSTEMDSYSTEMUNITDIR = $(shell pkg-config systemd --variable=systemdsystemunitdir)
_default:
@ -19,8 +20,8 @@ _install:
exit 1; \
fi
mkdir -p $(DESTDIR)/usr/sbin
install -p -m 755 $(BINFILES) $(DESTDIR)/usr/sbin
mkdir -p $(DESTDIR)$(SBINDIR)
install -p -m 755 $(BINFILES) $(DESTDIR)$(SBINDIR)
@if [ "$(PYVER_MAJOR)" -lt 3 ] ; then \
mkdir -p $(DESTDIR)/usr/libexec/kojid; \

3
builder/koji.conf Normal file
View file

@ -0,0 +1,3 @@
#Type Name ID GECOS Home directory Shell
u kojibuilder - "Koji builder" /builddir /usr/sbin/nologin
m kojibuilder mock

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,9 @@
[Unit]
Description=Koji build server
Documentation=https://docs.pagure.org/koji/server_howto/
Documentation=https://koji.readthedocs.io/en/latest/server_howto.html
# If the koji-hub is on this host, httpd.service is needed first
After=network.target httpd.service
After=network-online.target httpd.service chrony-wait.service
[Service]
ExecStart=/usr/sbin/kojid \

View file

@ -100,16 +100,18 @@ def load_plugins(plugin_paths):
register_plugin(tracker.load(name, path=path, reload=True))
def get_options():
def get_options(argv=None):
"""process options from command line and config file"""
if argv is None:
argv = sys.argv
common_commands = ['build', 'help', 'download-build',
'latest-build', 'search', 'list-targets']
usage = "%%prog [global-options] command [command-options-and-arguments]\n\n" \
"Common commands: %s" % ', '.join(sorted(common_commands))
parser = OptionParser(usage=usage)
parser.disable_interspersed_args()
progname = os.path.basename(sys.argv[0]) or 'koji'
progname = os.path.basename(argv[0]) or 'koji'
parser.__dict__['origin_format_help'] = parser.format_help
parser.__dict__['format_help'] = lambda formatter=None: (
"%(origin_format_help)s%(epilog)s" % ({
@ -144,7 +146,7 @@ def get_options():
parser.add_option("--plugin-paths", metavar='PATHS',
help="specify additional plugin paths (colon separated)")
parser.add_option("--help-commands", action="store_true", default=False, help="list commands")
(options, args) = parser.parse_args()
(options, args) = parser.parse_args(argv[1:])
# load local config
try:

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,6 @@ import koji
from koji import parse_arches
from koji import _ # noqa: F401
from koji.util import md5_constructor, to_list
from koji.xmlrpcplus import xmlrpc_client
# for compatibility with plugins based on older version of lib
@ -59,7 +58,7 @@ class TimeOption(optparse.Option):
"parsed by dateutil.parser. e.g. \"2020-12-31 12:35\" or \"December 31st 12:35\""
greetings = ('hello', 'hi', 'yo', "what's up", "g'day", 'back to work',
greetings = ('hello', 'hi', 'yo', "what's up", "g'day", 'back to work', 'howdy',
'bonjour',
'hallo',
'ciao',
@ -208,7 +207,7 @@ class TaskWatcher(object):
error = None
try:
self.session.getTaskResult(self.id)
except (six.moves.xmlrpc_client.Fault, koji.GenericError) as e:
except (koji.xmlrpcplus.Fault, koji.GenericError) as e:
error = e
if error is None:
# print("%s: complete" % self.str())
@ -663,8 +662,8 @@ def download_rpm(build, rpm, topurl, sigkey=None, quiet=False, noprogress=False,
error("Downloaded rpm %s is not valid rpm file, deleting" % path)
# payload hash
sigmd5 = koji.get_header_fields(path, ['sigmd5'])['sigmd5']
if rpm['payloadhash'] != koji.hex_string(sigmd5):
hdr = koji.get_rpm_header(path)
if rpm['payloadhash'] != koji.get_rpm_ident(hdr):
os.unlink(path)
error("Downloaded rpm %s doesn't match db, deleting" % path)
@ -922,6 +921,6 @@ def truncate_string(s, length=47):
class DatetimeJSONEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, xmlrpc_client.DateTime):
if isinstance(o, koji.xmlrpcplus.DateTime):
return str(o)
return json.JSONEncoder.default(self, o)

394
devtools/check-api Executable file
View file

@ -0,0 +1,394 @@
#!/usr/bin/env python3
import inspect
import json
import os
import os.path
import subprocess
import sys
import types
from collections import OrderedDict
# import koji code from our checkout
if os.path.exists(__file__):
kojitop = os.path.normpath(os.path.dirname(__file__) + '/..')
else:
# e.g. <stdin>
kojitop = os.getcwd()
sys.path.insert(0, kojitop)
setup = kojitop + '/setup.py'
try:
proc = subprocess.Popen([sys.executable, setup, '--version'], stdout=subprocess.PIPE)
(out, _) = proc.communicate()
VERSTR = out.decode().strip()
VERSION = tuple([int(x) for x in VERSTR.split('.')])
# we use this version to adapt our api scan a bit, but we record
# the version from koji lib in the api data
except Exception:
VERSTR = '0.0.0'
VERSION = (0, 0, 0)
import koji
import koji.arch
import koji.plugin
import koji.tasks
import koji.util
import koji.xmlrpcplus
if VERSION >= (1, 32, 0):
from kojihub import kojixmlrpc
else:
from hub import kojixmlrpc
kojixmlrpc.load_scripts({'SCRIPT_FILENAME': kojixmlrpc.__file__})
def main():
if len(sys.argv) == 1:
# just print the api
data = read_api()
print(json.dumps(data, indent=4))
elif len(sys.argv) == 2:
# read an api dump and compare to current
old = read_fn(sys.argv[1])
new = read_api()
compare(old, new)
report()
elif len(sys.argv) == 3:
# compare two api dumps (use '.' to read current)
old = read_fn(sys.argv[1])
new = read_fn(sys.argv[2])
compare(old, new)
report()
if ERRORS:
return 1
else:
return 0
def read_fn(fn):
if fn == '.':
return read_api()
else:
with open(fn, 'rt') as fo:
return json.load(fo)
def read_api():
data = OrderedDict()
# we use OrderedDicts so that our json output diffs nicely
data['version'] = list(getattr(koji, '__version_info__', (0, 0, 0)))
lib_modules = (koji, koji.arch, koji.util, koji.tasks, koji.xmlrpcplus, koji.plugin)
data['lib'] = OrderedDict()
for mod in lib_modules:
data['lib'][mod.__name__] = dump_module(mod)
# hub rpc calls (no plugins)
registry = kojixmlrpc.get_registry(opts={}, plugins=None)
data['rpc'] = OrderedDict()
for name in sorted(registry.funcs):
func = registry.funcs[name]
data['rpc'][name] = dump_func(func)
return data
def dump_module(mod):
info = OrderedDict()
file = inspect.getsourcefile(mod)
names = [n for n in vars(mod) if not n.startswith('_')]
# TODO defer filtering _ to check code
names.sort()
for name in names:
value = getattr(mod, name)
vinfo = OrderedDict()
_type = str(type(value))
if '__future__' in _type:
continue
if type(value) in (types.BuiltinFunctionType, types.BuiltinMethodType):
vinfo['is_external'] = True
vinfo['is_builtin'] = True
vinfo['type'] = str(type(value))
info[name] = vinfo
if inspect.ismodule(value):
vinfo['is_module'] = True
continue
if inspect.isclass(value):
if 'builtins' in value.__module__:
vinfo['is_external'] = True
vinfo['is_builtin'] = True
continue
elif inspect.getsourcefile(value) != file:
vinfo['is_external'] = True
continue
vinfo['is_class'] = True
vinfo.update(dump_class(value))
elif inspect.isfunction(value):
if inspect.getsourcefile(value) != file:
vinfo['is_external'] = True
continue
vinfo['is_function'] = True
vinfo.update(dump_func(value))
return info
def dump_func(func):
info = OrderedDict()
name = func.__name__
if inspect.isbuiltin(func):
info['is_builtin'] = True
# no need to dig deeper
return info
if inspect.isgeneratorfunction(func):
info['is_generator_function'] = True
sig = inspect.signature(func)
info['desc'] = '(%s)' % ', '.join([str(x) for x in sig.parameters.values()])
args = []
for pname, param in sig.parameters.items():
if param.default == param.empty:
arg = OrderedDict(name=pname)
else:
# default could be all sorts of things, repr is better than json here
default = repr(param.default)
arg = OrderedDict(name=pname, default=default)
args.append(arg)
info['args'] = args
spec = inspect.getfullargspec(func)
# FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations)
if spec.kwonlyargs or spec.kwonlydefaults:
# we don't use these
error(f'Found keyword-only args in rpc call {name}')
info['varargs'] = spec.varargs
info['varkw'] = spec.varkw
return info
def dump_class(cls):
members = OrderedDict()
names = [n for n in vars(cls) if not n.startswith('_')]
names.sort()
for name in names:
value = getattr(cls, name)
vinfo = OrderedDict()
vinfo['type'] = str(type(value))
if inspect.isfunction(value):
vinfo['is_function'] = True
vinfo.update(dump_func(value))
members[name] = vinfo
return {'members': members}
def compare(old, new):
top_keys = {'version', 'lib', 'rpc'}
if set(old) != top_keys:
error(f'Invalid keys in old data {list(old)}')
if set(new) != top_keys:
error(f'Invalid keys in new data {list(new)}')
compare_version(old['version'], new['version'])
compare_lib(old['lib'], new['lib'])
compare_rpc(old['rpc'], new['rpc'])
NEW_MAJOR = False
def compare_version(old, new):
global NEW_MAJOR
if old < new:
if old[:2] < new[:2]:
print(f'Major version increase {old} -> {new}')
NEW_MAJOR = True
else:
print(f'Minor version increase {old} -> {new}')
elif old > new:
error(f'Version DECREASED: {old} -> {new}')
def compare_lib(old, new):
names1 = set(old)
names2 = set(new)
added = names2 - names1
dropped = names1 - names2
both = names1.intersection(names2)
for name in sorted(added):
warn(f'Added module: {name}')
for name in sorted(dropped):
error(f'Dropped module: {name}')
for name in sorted(both):
compare_mod(name, old[name], new[name])
def compare_mod(mod, old, new):
names1 = set(old)
names2 = set(new)
added = names2 - names1
dropped = names1 - names2
both = names1.intersection(names2)
for name in sorted(added):
warn(f'Added module global: {mod}.{name}')
for name in sorted(dropped):
if old[name].get('is_module'):
error(f'Dropped module import {mod}.{name}')
elif old[name].get('is_external'):
error(f'Dropped imported global {mod}.{name}')
else:
# TODO figure out a way to distinguish deprecations
error(f'Dropped module global: {mod}.{name}')
for name in sorted(both):
compare_mod_global(mod, name, old[name], new[name])
def compare_mod_global(mod, name, old, new):
if old['type'] != new['type']:
if old.get('is_external'):
# not from our code, so just warn
warn(f'{mod}.{name} (external) changed type: {old["type"]} -> {new["type"]}')
else:
error(f'{mod}.{name} changed type: {old["type"]} -> {new["type"]}')
# this prevents further comparison
return
desc = f'{mod}.{name}'
if old.get('is_function'):
compare_function(desc, old, new)
elif old.get('is_class'):
compare_class(desc, old, new)
def compare_class(cls, old, new):
if not new.get('is_class'):
error(f'No longer a class: {cls}')
return
names1 = set(old['members'])
names2 = set(new['members'])
added = names2 - names1
dropped = names1 - names2
both = names1.intersection(names2)
for name in sorted(added):
warn(f'Added class variable: {cls}.{name}')
for name in sorted(dropped):
# TODO figure out a way to distinguish deprecations
error(f'Dropped class variable: {cls}.{name}')
for name in sorted(both):
compare_class_var(cls, name, old['members'][name], new['members'][name])
def compare_class_var(cls, name, old, new):
if old['type'] != new['type']:
error(f'{cls}.{name} changed type: {old["type"]} -> {new["type"]}')
# this prevents further comparison
return
desc = f'{cls}.{name}'
if old.get('is_function'):
compare_function(desc, old, new)
def compare_rpc(old, new):
names1 = set(old)
names2 = set(new)
added = names2 - names1
dropped = names1 - names2
both = names1.intersection(names2)
for name in sorted(added):
warn(f'Added RPC call: {name}')
for name in sorted(dropped):
# TODO figure out a way to distinguish deprecations
error(f'Dropped RPC call: {name}')
for name in sorted(both):
compare_rpc_call(name, old[name], new[name])
def compare_rpc_call(name, old, new):
desc = f'rpc call {name}'
compare_function(desc, old, new)
def compare_function(desc, old, new):
if old['desc'] != new['desc']:
warn(f'Signature changed for {desc}:\n old: {old["desc"]}\n new: {new["desc"]}')
# this is mainly for human readability, the code below will note errors
if not old['varargs']:
if new['varargs']:
warn(f'Added varargs for {desc}: {new["varargs"]}')
# not really a problem, but worth noting
elif not new['varargs']:
error(f'Dropped varargs for {desc}')
elif old['varargs'] != new['varargs']:
# not really a problem
warn(f'Renamed varargs for {desc}: {old["varargs"]} -> {new["varargs"]}')
if not old['varkw']:
if new['varkw']:
warn(f'Added varkw for {desc}: {new["varkw"]}')
# not really a problem, but worth noting
elif not new['varkw']:
error(f'Dropped varkw for {desc}')
elif old['varkw'] != new['varkw']:
# not really a problem
warn(f'Renamed varkw for {desc}: {old["varkw"]} -> {new["varkw"]}')
oargs = old['args']
nargs = new['args']
# arg counts
if len(nargs) < len(oargs):
error(f'Arg count reduced for {desc}')
# this will break rest of code, so we stop checking here
return
# note extended args
added = [a['name'] for a in nargs[len(oargs):]]
if added:
warn(f'Args extended for {desc}: {added!r}')
# details for overlap
for i, (oarg, narg) in enumerate(zip(oargs, nargs)):
if oarg['name'] != narg['name']:
error(f'Overlapping args do not match for {desc} arg {i}')
# this breaks rest of checks
return
if 'default' in oarg:
if 'default' not in narg:
error(f'Dropped default value for {desc} arg {oarg["name"]}')
elif narg['default'] != oarg['default']:
error(f'Changed default value for {desc} arg {oarg["name"]}: '
f'{oarg["default"]} -> {narg["default"]}')
elif 'default' in narg:
warn(f'Added default value for {desc} arg {oarg["name"]}')
WARNINGS = []
ERRORS = []
def warn(msg):
WARNINGS.append(msg)
sys.stderr.write(msg)
sys.stderr.write('\n')
def error(msg):
ERRORS.append(msg)
sys.stderr.write('ERROR: ')
sys.stderr.write(msg)
sys.stderr.write('\n')
def report():
print(f'Got {len(WARNINGS)} warnings and {len(ERRORS)} errors')
if __name__ == '__main__':
rv = main()
sys.exit(rv)
# the end

View file

@ -0,0 +1,17 @@
FROM quay.io/centos/centos:stream10
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False epel-release && \
dnf install -y --nodocs --setopt=install_weak_deps=False --enablerepo crb \
git \
gcc \
glibc-langpack-en \
krb5-devel \
python3-defusedxml \
python3-devel \
python3-librepo \
python3-setuptools \
python3-tox \
rpm-build && \
dnf clean all

View file

@ -5,29 +5,17 @@ RUN \
dnf \
dnf-plugins-core \
gcc \
git \
make \
krb5-devel \
libffi-devel \
openssl-devel \
pyOpenSSL \
python-cheetah \
python-devel \
python-librepo \
python-requests \
redhat-rpm-config \
rpm-build \
rpm-python \
yum-utils && \
rpm-build && \
yum install -y epel-release && \
yum install -y \
python-flake8 \
python-multilib \
python-defusedxml \
python-pip \
python-psycopg2 \
python-qpid-proton \
python-requests-kerberos \
yumdownloader && \
python-psycopg2 && \
yum clean all && \
pip install -U 'pip==9.0.1' && \
pip install -U tox

View file

@ -4,25 +4,13 @@ RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False epel-release && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
'dnf-command(download)' \
gcc \
git \
glib2-devel \
glibc-langpack-en \
krb5-devel \
libffi-devel \
libxml2-devel \
make \
openssl-devel \
python3-defusedxml \
python3-devel \
python3-librepo \
python3-pip \
python3-pytest \
python3-rpm \
python3-setuptools \
python3-tox \
redhat-rpm-config \
rpm-build \
rpm-devel \
sqlite-devel \
yum-utils && \
rpm-build && \
dnf clean all

View file

@ -4,25 +4,14 @@ RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False epel-release && \
dnf install -y --nodocs --setopt=install_weak_deps=False --enablerepo crb \
'dnf-command(download)' \
gcc \
git \
glib2-devel \
gcc \
glibc-langpack-en \
krb5-devel \
libffi-devel \
libxml2-devel \
make \
openssl-devel \
python3-defusedxml \
python3-devel \
python3-librepo \
python3-pip \
python3-pytest \
python3-rpm \
python3-setuptools \
python3-tox \
redhat-rpm-config \
rpm-build \
rpm-devel \
sqlite-devel \
yum-utils && \
rpm-build && \
dnf clean all

View file

@ -2,25 +2,13 @@ FROM registry.fedoraproject.org/fedora:34
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
'dnf-command(download)' \
gcc \
git \
glib2-devel \
glibc-langpack-en \
krb5-devel \
libffi-devel \
python3-librepo \
libxml2-devel \
make \
openssl-devel \
python3-defusedxml \
python3-devel \
python3-pip \
python3-pytest \
python3-rpm \
python3-librepo \
python3-setuptools \
python3-tox \
redhat-rpm-config \
rpm-build \
rpm-devel \
sqlite-devel \
yum-utils && \
dnf clean all\
rpm-build && \
dnf clean all

View file

@ -2,25 +2,13 @@ FROM registry.fedoraproject.org/fedora:35
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
'dnf-command(download)' \
gcc \
git \
glib2-devel \
glibc-langpack-en \
krb5-devel \
libffi-devel \
python3-librepo \
libxml2-devel \
make \
openssl-devel \
python3-defusedxml \
python3-devel \
python3-pip \
python3-pytest \
python3-rpm \
python3-librepo \
python3-setuptools \
python3-tox \
redhat-rpm-config \
rpm-build \
rpm-devel \
sqlite-devel \
yum-utils && \
dnf clean all\
rpm-build && \
dnf clean all

View file

@ -2,25 +2,13 @@ FROM registry.fedoraproject.org/fedora:36
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
'dnf-command(download)' \
gcc \
git \
glib2-devel \
glibc-langpack-en \
krb5-devel \
libffi-devel \
python3-librepo \
libxml2-devel \
make \
openssl-devel \
python3-defusedxml \
python3-devel \
python3-pip \
python3-pytest \
python3-rpm \
python3-librepo \
python3-setuptools \
python3-tox \
redhat-rpm-config \
rpm-build \
rpm-devel \
sqlite-devel \
yum-utils && \
dnf clean all\
rpm-build && \
dnf clean all

View file

@ -2,25 +2,13 @@ FROM registry.fedoraproject.org/fedora:37
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
'dnf-command(download)' \
gcc \
git \
glib2-devel \
glibc-langpack-en \
krb5-devel \
libffi-devel \
python3-librepo \
libxml2-devel \
make \
openssl-devel \
python3-defusedxml \
python3-devel \
python3-pip \
python3-pytest \
python3-rpm \
python3-librepo \
python3-setuptools \
python3-tox \
redhat-rpm-config \
rpm-build \
rpm-devel \
sqlite-devel \
yum-utils && \
dnf clean all\
rpm-build && \
dnf clean all

View file

@ -2,25 +2,13 @@ FROM registry.fedoraproject.org/fedora:38
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
'dnf-command(download)' \
gcc \
git \
glib2-devel \
glibc-langpack-en \
krb5-devel \
libffi-devel \
python3-librepo \
libxml2-devel \
make \
openssl-devel \
python3-defusedxml \
python3-devel \
python3-pip \
python3-pytest \
python3-rpm \
python3-librepo \
python3-setuptools \
python3-tox \
redhat-rpm-config \
rpm-build \
rpm-devel \
sqlite-devel \
yum-utils && \
dnf clean all\
rpm-build && \
dnf clean all

View file

@ -2,25 +2,13 @@ FROM registry.fedoraproject.org/fedora:39
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
'dnf-command(download)' \
gcc \
git \
glib2-devel \
glibc-langpack-en \
krb5-devel \
libffi-devel \
python3-librepo \
libxml2-devel \
make \
openssl-devel \
python3-defusedxml \
python3-devel \
python3-pip \
python3-pytest \
python3-rpm \
python3-librepo \
python3-setuptools \
python3-tox \
redhat-rpm-config \
rpm-build \
rpm-devel \
sqlite-devel \
yum-utils && \
dnf clean all\
rpm-build && \
dnf clean all

View file

@ -0,0 +1,27 @@
FROM registry.fedoraproject.org/fedora:42
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
gcc \
git \
glibc-langpack-en \
krb5-devel \
python3-cffi \
python3-cheetah \
python3-dateutil \
python3-defusedxml \
python3-devel \
python3-dnf \
python3-jinja2 \
python3-librepo \
python3-multilib \
python3-pytest \
python3-requests \
python3-requests-gssapi \
python3-requests-mock \
python3-rpm \
python3-setuptools \
python3-six \
python3-tox \
rpm-build && \
dnf clean all

View file

@ -0,0 +1,28 @@
FROM registry.fedoraproject.org/fedora:44
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
flake8 \
gcc \
git \
glibc-langpack-en \
krb5-devel \
python3-cffi \
python3-cheetah \
python3-dateutil \
python3-defusedxml \
python3-devel \
python3-dnf \
python3-jinja2 \
python3-librepo \
python3-multilib \
python3-pytest \
python3-requests \
python3-requests-gssapi \
python3-requests-mock \
python3-rpm \
python3-setuptools \
python3-six \
python3-tox \
rpm-build && \
dnf clean all

View file

@ -2,25 +2,14 @@ FROM registry.fedoraproject.org/fedora:rawhide
RUN \
dnf -y update --nodocs --setopt=install_weak_deps=False && \
dnf install -y --nodocs --setopt=install_weak_deps=False \
'dnf-command(download)' \
gcc \
git \
glib2-devel \
glibc-langpack-en \
krb5-devel \
libffi-devel \
python3-librepo \
libxml2-devel \
make \
openssl-devel \
python3-defusedxml \
python3-devel \
python3-pip \
python3-pytest \
python3-rpm \
python3-librepo \
python3-setuptools \
python3-tox \
redhat-rpm-config \
rpm-build \
rpm-devel \
sqlite-devel \
yum-utils && \
rpm-build && \
dnf clean all

View file

@ -6,21 +6,31 @@ provided:
* [`./Dockerfile.centos7`](./Dockerfile.centos7) CentOS 7, for testing with python2.7
* [`./Dockerfile.centos8`](./Dockerfile.centos8) CentOS 8, for testing with python3.6
* [`./Dockerfile.f32`](./Dockerfile.f32) Fedora 32, for testing with python3.8
* [`./Dockerfile.f33`](./Dockerfile.f33) Fedora 33, for testing with python3.9
* [`./Dockerfile.centos9`](./Dockerfile.centos8) CentOS 9, for testing with python3.9
* [`./Dockerfile.f34`](...) Fedora 34, for testing with python3.9
* [`./Dockerfile.f35`](./Dockerfile.f32) Fedora 35, for testing with python3.10
* [`./Dockerfile.f36`](./Dockerfile.f32) Fedora 36, for testing with python3.10
* [`./Dockerfile.f37`](./Dockerfile.f32) Fedora 37, for testing with python3.11
* [`./Dockerfile.f38`](./Dockerfile.f32) Fedora 38, for testing with python3.11
* [`./Dockerfile.f39`](./Dockerfile.f32) Fedora 39, for testing with python3.12
* [`./Dockerfile.rawhide`](./Dockerfile.rawhie) Fedora Rawhide, for testing with python3.?
To use them, taking fedora as an example:
docker build -t koji_test_fedora:32 --no-cache -f Dockerfile.f32
docker run --rm -v $PWD:/koji --name koji_test koji_test_fedora:32 bash -c "cd /koji && tox -e flake8,py3"
docker build -t koji_test_fedora:39 --no-cache -f Dockerfile.f39
docker run --rm -v $PWD:/koji --name koji_test koji_test_fedora:39 bash -c "cd /koji && tox -e flake8,py3,bandit"
Or CentOS as an example:
Or CentOS with py3 as an example:
docker build -t koji_test_centos:8 --no-cache -f Dockerfile.centos8
docker run --rm -v $PWD:/koji --name koji_test koji_test_centos:8 bash -c "cd /koji && tox -e py2"
docker run --rm -v $PWD:/koji --name koji_test koji_test_centos:8 bash -c "cd /koji && tox -e flake8,py3,bandit"
Or CentOS with py2 as an example:
docker build -t koji_test_centos:7 --no-cache -f Dockerfile.centos8
docker run --rm -v $PWD:/koji --name koji_test koji_test_centos:7 bash -c "cd /koji && tox -e py2"
When running with Podman and SELinux enabled, use the "--security-opt
label=disable" option:
podman run --rm -v $PWD:/koji --security-opt label=disable --name koji_test koji_test_fedora:32 bash -c "cd /koji && ls -l /koji && tox -e flake8,py3"
podman run --rm -v $PWD:/koji --security-opt label=disable --name koji_test koji_test_fedora:39 bash -c "cd /koji && ls -l /koji && tox -e flake8,py3,bandit"

190
devtools/convert-cheetah Executable file
View file

@ -0,0 +1,190 @@
#!/usr/bin/python3
import os.path
import re
import sys
import tempfile
from optparse import OptionParser
"""
Poorly convert some cheetah template code to jinja
This is NOT a full or accurate conversion, it is a set of simple
tranformations that reduce some of the manual work.
Always review the changes.
Always review the changes.
"""
def main():
global subs
global options
parser = OptionParser(usage="%prog <filename>")
parser.add_option('-w', '--write', action='store_true', help='write changes to file')
options, args = parser.parse_args()
options.args = args
if len(args) != 1:
error('Please specify one template')
fn = args[0]
handle_file(fn)
def handle_file(fn):
outp = None
if options.write:
dirname = os.path.dirname(fn)
basename = os.path.basename(fn)
outfile = tempfile.NamedTemporaryFile(dir=dirname, mode='wt', prefix=f'_{basename}', delete=False)
with outfile as outp:
_handle_file(fn, outp)
os.replace(outfile.name, fn)
print(f'Wrote {fn}')
else:
_handle_file(fn, outp)
def _handle_file(fn, outp):
with open(fn, 'rt') as fp:
for lineno, line in enumerate(fp):
line = handle_line(lineno, line, outp)
if line is not None and outp is not None:
outp.write(line)
def handle_line(lineno, line, outp):
orig = line
matches = 0
skip = False
rules = list(SUBS)
while rules:
prog, repl = rules.pop(0)
last = line
if repl == SKIP:
m = prog.search(line)
if m:
print(f'{lineno}: Matched skip pattern {prog.pattern!r}')
print(line, end='')
skip = True
line = orig
break
continue
elif repl == DROP:
m = prog.search(line)
if m:
print(f'{lineno}: Matched DROP pattern {prog.pattern!r}')
print(line, end='')
return None
elif repl == BREAK:
m = prog.search(line)
if m:
print(f'{lineno}: Matched BREAK pattern {prog.pattern!r}')
print(line, end='')
break
elif isinstance(repl, Jump):
# forget remaing rules and use target rules from here
m = prog.search(line)
if m:
rules = list(repl.target)
else:
line, n = prog.subn(repl, line)
if n:
matches += n
print(f'{lineno}: Matched {prog.pattern!r} (count: {n})')
if matches:
print(f'Made {matches} substitutions for line {lineno}')
print(f'ORIG: {orig}', end='')
print(f' NEW: {line}')
return collapse(line)
def rules(subs):
# compile subs
return [(re.compile(pat, flags), repl) for pat, repl, flags in subs]
class Jump:
# jump to new set of substitutions
def __init__(self, target):
self.target = target
SKIP = ('skip subs for this line',)
DROP = ('drop line',)
BREAK = ('stop subs checks for this line',)
STATE = rules([
# subrules for some line statements
[r'[$]', '', 0],
[r'len\(([\w.$]+)\)', r'(\1 |length)', 0 ],
])
SUBS = rules([
# [pattern, replacement, flags]
[r'util.(toggleOrder|rowToggle|sortImage|passthrough_except|passthrough|authToken)\b', r'util.\g<1>2', 0],
[r'(#include .*)header.chtml', r'\1header2.chtml', 0],
[r'(#include .*)footer.chtml', r'\1footer2.chtml', 0],
[r'^#import', DROP, 0],
[r'^#from .* import', DROP, 0],
[r'^\s*#(if|for|elif|set)', Jump(STATE), 0],
[r'#end if', r'#endif', 0],
[r'#end for', r'#endfor', 0],
[r'[(][$]self, ', r'(', 0 ],
[r'\([$]self\)', r'()', 0 ],
[r'len\(([\w.$]+)\)', r'(\1 |length)', 0 ],
[r'[$](([\w.]+)[(][^()]*[)])', r'{{ \1 }}', 0 ],
[r'${\s*([^{}]+)\s*}', r'{{ \1 }}', 0 ],
[r'#echo ([^#]+)#', r'{{ \1 }}', 0 ],
[r'#if ([^#]+) then ([^#]+) else ([^#]+)\s*#', r'{{ \2 if \1 else \3 }}', 0 ],
[r'''[$]([\w.]+)\['(\w+)'\]''', r'{{ \1.\2 }}', 0],
[r'''[$]([\w.]+)\["(\w+)"\]''', r'{{ \1.\2 }}', 0],
[r'[$]([\w.]+)[([]', SKIP, 0],
[r'^(\s*)#attr ', r'\1#set ', 0],
[r'^\s*#', BREAK, 0],
[r'[$]([\w.]+)', r'{{ \1 }}', 0],
])
def error(msg):
print(msg)
sys.exit(1)
BRACES = re.compile(r'({{ | }})')
def collapse(line):
"""Collapse nested double braces"""
tokens = BRACES.split(line)
depth = 0
tokens2 = []
for tok in tokens:
if tok == '{{ ':
# only keep braces at the outer layer
if depth == 0:
tokens2.append(tok)
depth += 1
elif tok == ' }}':
depth -= 1
if depth < 0:
warning("Brace mismatch. Can't collapse")
break
elif depth == 0:
# only keep braces at the outer layer
tokens2.append(tok)
else:
# keep everything else
tokens2.append(tok)
if depth < 0:
warning('Unexpected }}')
return line
elif depth > 0:
warning('Missing }}')
return line
else:
return ''.join(tokens2)
if __name__ == '__main__':
main()

View file

@ -14,7 +14,7 @@ from urllib.parse import quote
sys.path.insert(0, os.getcwd())
import koji
from kojihub import auth, kojixmlrpc, kojihub
from kojihub import auth, kojixmlrpc, kojihub, db
from koji.context import context
import koji.xmlrpcplus
@ -35,6 +35,17 @@ def handle_rpc(self, environ):
raise
def override_load_config(opts):
original_load_config = kojixmlrpc.load_config
def my_load_config(environ):
oldopts = original_load_config(environ)
oldopts.update(opts)
return oldopts
kojixmlrpc.load_config = my_load_config
# Fake session for authenticated calls
class FakeSession(auth.Session):
@ -104,6 +115,10 @@ def get_options():
parser.add_option('--user', '-u', help='execute as user')
parser.add_option('--exclusive', '-x', action='store_true',
help='emulate an exclusive session')
parser.add_option('-n', '--no-commit', action='store_true',
help='skip commit')
parser.add_option('-o', '--config-option', help='override config option',
action='append', metavar='NAME=VALUE')
opts, args = parser.parse_args()
# parse request from args
@ -113,12 +128,21 @@ def get_options():
for s in args[1:]:
if '=' in s:
k, v = s.split('=', 1)
v = nice_literal(v)
kwargs[k] = v
else:
callargs.append(nice_literal(s))
if k.isidentifier():
v = nice_literal(v)
kwargs[k] = v
continue
# else
callargs.append(nice_literal(s))
callargs = koji.encode_args(*callargs, **kwargs)
opts.request = koji.xmlrpcplus.dumps(callargs, method, allow_none=1)
if opts.config_option:
overrides = {}
for s in opts.config_option:
k, v = s.split('=', 1)
v = nice_literal(v)
overrides[k] = v
opts.config_option = overrides
return opts
@ -147,10 +171,18 @@ def set_config(environ):
environ['koji.hub.ConfigDir'] = lconfigd
def skip_commit(cnx):
print('Skipping commit')
def main():
options = get_options()
if options.pdb:
kojixmlrpc.ModXMLRPCRequestHandler.handle_rpc = handle_rpc
if options.no_commit:
db.DBWrapper.commit = skip_commit
if options.config_option:
override_load_config(options.config_option)
environ = {}
environ['SCRIPT_FILENAME'] = kojixmlrpc.__file__

632
devtools/fakepolicy Executable file
View file

@ -0,0 +1,632 @@
#!/usr/bin/python3
from __future__ import absolute_import, print_function
import ast
import argparse
import os
import os.path
import pprint
import sys
from pprint import pformat
from unittest import mock
sys.path.insert(0, os.getcwd())
import koji
from kojihub import auth, kojixmlrpc, kojihub, db
from koji.context import context
from koji.util import dslice, extract_build_task
from koji.tasks import parse_task_params
from koji.daemon import SCM
import koji.xmlrpcplus
"""
This is a tool for developers to test out policy code.
It works by mocking hub code to make calls to a remote hub rather than using
direct db access as hub code normally does. This allows simulating a policy
on the client side, but using the data on the remote hub.
This code is based partially on fakehub
"""
# Fake session for simulating different auth
class FakeSession(auth.Session):
def __init__(self, user=None, exclusive=False, session=None):
if user:
user = session.getUser(user, strict=True)
self.logged_in = True
self.user_id = user['id']
self.authtype = koji.AUTHTYPES['GSSAPI']
self.user_data = user
else:
self.logged_in = False
self.user_id = None
self.user_data = {}
self.exclusive = exclusive
self.id = 1
self.hostip = '127.0.0.1'
self.master = None
self.callnum = 1
self.message = 'THIS IS A FAKE SESSION'
self.session_data = {'msg': 'this is a fake session'}
self._perms = None
self._groups = None
self._host_id = ''
def nice_literal(value):
try:
return ast.literal_eval(value)
except (ValueError, SyntaxError):
return value
def get_args():
parser = argparse.ArgumentParser(description='Simulate hub policy tests')
parser.add_argument('--pdb', action='store_true',
help='drop into pdb on error')
parser.add_argument('-p', '--profile', default='koji', help='pick a profile')
parser.add_argument('--user', '-u', help='execute as user')
parser.add_argument('--exclusive', '-x', action='store_true',
help='emulate an exclusive session')
parser.add_argument('-o', '--config-option', help='override config option',
action='append', metavar='NAME=VALUE')
parser.add_argument('--config', '-c', help='config file')
parser.add_argument('--configdir', '-d', help='config dir')
parser.add_argument('--policyfile', '-f', help='policy file')
parser.add_argument('--eval', dest='mode', action='store_const', const='eval', default='eval')
parser.add_argument('--assert', dest='mode', action='store_const', const='assert')
parser.add_argument('--check', dest='mode', action='store_const', const='check')
subparsers = parser.add_subparsers(required=True, dest='command',
help='Available subcommands')
## subcommands ##
subp = subparsers.add_parser('manual', help='manually specify policy and data')
subp.add_argument('policy', help='select policy')
subp.add_argument('data', help='provide policy data')
subp.set_defaults(func=manual_params)
subp = subparsers.add_parser('make-task', help='simulate policies for make_task')
subp.add_argument('--policy', help='select policy', default='channel')
subp.add_argument('--req-channel', help='simulate a requested channel', metavar='CHANNEL')
subp.add_argument('task', type=int, help='select task')
subp.set_defaults(func=make_task_params)
subp = subparsers.add_parser('promote-build',
help='simulate draft_promotion policy for promote_build')
subp.add_argument('build', help='select build')
subp.set_defaults(func=promote_build_params)
subp = subparsers.add_parser('apply-volume', help='simulate volume policy for apply_volume')
subp.add_argument('build', help='select build')
subp.set_defaults(func=apply_volume_params)
subp = subparsers.add_parser('tag-build', help='simulate policy for tagging a build')
subp.add_argument('tag', help='select tag')
subp.add_argument('build', help='select build')
subp.add_argument('--fromtag', help='select from tag (i.e. move)')
subp.add_argument('--by-tag-subtask', action='store_true', help='mark operation as by_tag_subtask')
subp.set_defaults(func=tag_build_params)
subp = subparsers.add_parser('move-build', help='simulate policy for moving a build')
subp.add_argument('fromtag', help='select from tag')
subp.add_argument('tag', help='select destination tag')
subp.add_argument('build', help='select build')
subp.set_defaults(func=tag_build_params) # this handler does double duty
subp = subparsers.add_parser('untag-build', help='simulate policy for untagging a build')
subp.add_argument('tag', help='select tag')
subp.add_argument('build', help='select build')
subp.set_defaults(func=untag_build_params)
subp = subparsers.add_parser('add-pkg', help='simulate policy for adding a package')
subp.add_argument('tag', help='select tag')
subp.add_argument('package', help='select package')
subp.add_argument('--action', help='select action', default='add')
subp.add_argument('--force', help='select force setting', action='store_true', default=False)
subp.set_defaults(func=add_pkg_params)
subp = subparsers.add_parser('cg-import', help='simulate policy for cg import')
subp.add_argument('-b', '--build', help='fetch data from existing build')
subp.add_argument('-m', '--metadata', help='fetch data from json file')
subp.add_argument('--metadata-only', help='', action='store_true', default=False)
subp.set_defaults(func=cg_import_params)
subp = subparsers.add_parser('build-from-scm', help='simulate build_from_scm policy check')
subp.add_argument('-t', '--task', type=int, help='fetch data from existing task')
subp.add_argument('-u', '--url', help='specify scm url')
subp.add_argument('-o', '--owner', help='specify task owner')
subp.add_argument('-c', '--channel', help='specify task channel')
subp.add_argument('--scratch', action='store_true', help='specify scratch=True')
subp.add_argument('--no-scratch', action='store_false', dest='scratch', help='specify scratch=False')
subp.set_defaults(func=build_from_scm_params)
## end subcommands ##
args = parser.parse_args()
if args.config_option:
overrides = {}
for s in args.config_option:
k, v = s.split('=', 1)
v = nice_literal(v)
overrides[k] = v
args.config_option = overrides
else:
args.config_option = {}
return args
def set_config(args, environ):
lconfig = "%s/devtools/fakehub.conf" % os.getcwd()
lconfigd = "%s/devtools/fakehub.conf.d" % os.getcwd()
if os.path.exists(lconfig) or os.path.exists(lconfigd):
environ['koji.hub.ConfigFile'] = lconfig
environ['koji.hub.ConfigDir'] = lconfigd
def update_policy(pfile, opts):
"""Load policy (only) from a config file, updating existing"""
policy = opts.setdefault('policy', {})
config = koji.read_config_files([(pfile, True)], raw=True)
if not config.has_section('policy'):
raise Exception('No policy found in %s' % pfile)
updates = dict(config.items('policy'))
policy.update(updates)
def skip_commit(cnx):
print('Skipping commit')
def main():
global koji # we replace it with a profile module
args = get_args()
db.DBWrapper.commit = skip_commit
# set up session for querying remote
koji = koji.get_profile_module(args.profile)
session_opts = koji.grab_session_options(koji.config)
session = koji.ClientSession(koji.config.server, session_opts)
# no auth - we're only reading
## Simulate key parts of server_setup ##
# 1. load config
environ = {}
set_config(args, environ) # XXX?
if args.configdir:
environ['koji.hub.ConfigDir'] = args.configdir
if args.config:
environ['koji.hub.ConfigFile'] = args.config
opts = kojixmlrpc.load_config(environ)
opts.update(args.config_option)
if args.policyfile:
update_policy(args.policyfile, opts)
# 2. logging
kojixmlrpc.setup_logging1()
kojixmlrpc.setup_logging2(opts)
# TODO
# 3. plugins
plugins = kojixmlrpc.load_plugins(opts)
# 4. load policies
policy_index = kojixmlrpc.get_policy(opts, plugins)
## end server_setup ##
# set up context as if for a call handler
context._threadclear()
context.commit_pending = False
context.opts = opts
context.policy = policy_index
cnx = mock.MagicMock()
cnx.cursor.side_effect = Exception('db access disabled')
cnx.set_session.side_effect = Exception('db access disabled')
context.cnx = cnx
if args.user:
context.session = FakeSession(args.user, args.exclusive, session)
else:
context.session = FakeSession()
# mock key points for data access by policy code
do_mocks(session, plugins)
policy, policy_data = args.func(args, session)
# ^ parts of this rely on the mocks
# run the policy
print(f'Testing policy {policy} with data:\n{pformat(policy_data)}')
handler = None
params = (policy, policy_data)
kwargs = {}
if args.mode == 'eval':
handler = kojihub.eval_policy
elif args.mode == 'assert':
handler = kojihub.assert_policy
elif args.mode == 'check':
handler = kojihub.check_policy
else:
raise Exception('Invalid mode: %s' % args.mode)
try:
result = handler(*params, **kwargs)
except Exception:
if not args.pdb:
raise
import pdb
import traceback
etype, e, tb = sys.exc_info()
traceback.print_exc()
pdb.post_mortem(tb)
print(f'RESULT: {result}')
def manual_params(args, session):
data = nice_literal(args.data)
return args.policy, data
def make_task_params(args, session):
# simulate make_task policy data
if args.policy not in ('channel', 'priority'):
print('The make_task subcommand is meant for use with the channel or priority policies')
task_id = args.task
tinfo = session.getTaskInfo(task_id, strict=True)
taskargs = session.getTaskRequest(task_id)
data = dslice(tinfo, ['method', 'arch', 'parent', 'label', 'owner'])
data['user_id'] = tinfo['owner']
if args.req_channel:
data['req_channel'] = args.req_channel
if tinfo['parent']:
data.update(kojihub.policy_data_from_task(tinfo['parent'], recurse=True))
data.update(kojihub.policy_data_from_task_args(tinfo['method'], taskargs))
# ^ this relies on the mocks to work
return args.policy, data
def promote_build_params(args, session):
# simulate promote_build policy data
policy = 'draft_promotion'
bld = args.build
if bld.isdigit:
bld = int(bld)
binfo = session.getBuild(bld, strict=True)
if binfo['draft']:
target_release = koji.parse_target_release(binfo['release'])
else:
target_release = binfo['release']
data = {
'build': binfo['id'],
'target_release': target_release
}
return policy, data
def apply_volume_params(args, session):
# simulate apply_volume_policy policy data
policy = 'volume'
bld = args.build
if bld.isdigit():
bld = int(bld)
binfo = session.getBuild(bld, strict=True)
data = {'build': binfo}
# the hub's apply_volume_policy() adds in task data if present
task_id = extract_build_task(binfo)
if task_id:
tinfo = session.getTaskInfo(task_id)
args = session.getTaskRequest(task_id)
data.update(kojihub.policy_data_from_task_args(tinfo['method'], args))
return policy, data
def tag_build_params(args, session):
# simulate policy for tagging a build
policy = 'tag'
operation = 'tag'
tag = args.tag
if tag.isdigit():
tag = int(tag)
tinfo = session.getTag(tag, strict=True)
bld = args.build
if bld.isdigit():
bld = int(bld)
binfo = session.getBuild(bld, strict=True)
fromtag = args.fromtag
if fromtag:
if fromtag.isdigit():
fromtag = int(fromtag)
fromtag = session.getTag(fromtag, strict=True)['id']
operation = 'move'
# kojihub is a bit inconsistent about the data passed (e.g. id vs name vs dict)
# we mimic the main tagBuild handler
data = {'tag': tinfo['id'], 'build': binfo['id'], 'fromtag': fromtag, 'operation': operation}
if args.by_tag_subtask:
data['by_tag_subtask'] = True
return policy, data
def untag_build_params(args, session):
# simulate policy for untagging a build
policy = 'tag'
tag = args.tag
if tag.isdigit():
tag = int(tag)
tinfo = session.getTag(tag, strict=True)
bld = args.build
if bld.isdigit():
bld = int(bld)
binfo = session.getBuild(bld, strict=True)
data = {'tag': None, 'build': binfo['id'], 'fromtag': tinfo['id'], 'operation': 'untag'}
return policy, data
def add_pkg_params(args, session):
# simulate policy for adding a package list entry
policy = 'package_list'
tag = args.tag
if tag.isdigit():
tag = int(tag)
tinfo = session.getTag(tag, strict=True)
package = args.package
force = args.force
action = args.action
# kojihub is a bit inconsistent about the package field format
# we opt for the string passed in, as happens with the add-pkg command
data = {'tag': tinfo['id'], 'action': action, 'package': package, 'force': force}
return policy, data
def cg_import_params(args, session):
# simulate policy for cg imports
policy = 'cg_import'
data = {}
if args.build:
# pull metadata from existing build
if args.build.isdigit():
binfo = session.getBuild(int(args.build), strict=True)
else:
binfo = session.getBuild(args.build, strict=True)
for key in ('version', 'release', 'source', 'draft'):
data[key] = binfo[key]
data['package'] = binfo['name']
data['btypes'] = list(session.getBuildType(binfo['id']))
data['cg_list'] = [binfo['cg_id']]
data['metadata_only'] = False
elif args.metadata:
metadata = koji.load_json(args.metadata)
build = metadata['build']
for key in ('version', 'release'):
data[key] = build[key]
for key in ('source', 'draft'):
data[key] = build.get(key)
data['package'] = build['name']
# get btypes
typeinfo = build.get('extra', {}).get('typeinfo', {})
for btype in ('maven', 'win', 'image'):
# legacy types can also be at top level of extra
if btype in build['extra']:
typeinfo.setdefault(btype, build['extra'][btype])
data['btypes'] = list(typeinfo)
# get cg id
cg_id = None
for brdata in metadata['buildroots']:
cginfo = brdata['content_generator']
cg = kojihub.lookup_name('content_generator', cginfo['name'], strict=True)
# ^ this relies on our mocks
# just take the first one. we're not validating
cg_id = cg['id']
break
data['cg_list'] = [cg_id]
# check for metadata-only flag
data['metadata_only'] = False
for fileinfo in metadata['output']:
if fileinfo.get('metadata_only', False):
data['metadata_only'] = True
break
if args.metadata_only:
data['metadata_only'] = True
return policy, data
def build_from_scm_params(args, session):
# simulate policy for adding a package list entry
policy = 'build_from_scm'
task_params = None
if args.task:
task = args.task # should be int
tinfo = session.getTaskInfo(task, request=True, strict=False)
if tinfo['method'] != 'buildSRPMFromSCM':
# TODO extend
raise NotImplementedError('Only buildSRPMFrom SCM is supported yet')
task_params = parse_task_params(tinfo['method'], tinfo['request'])
if args.url:
url = args.url
elif task_params:
url = task_params['url']
else:
raise Exception('No url or task specified')
extra = {}
if task_params:
extra['user_id'] = tinfo['owner']
extra['channel'] = session.getChannel(tinfo['channel_id'], strict=True)
extra['scratch'] = task_params.get('opts', {}).get('scratch')
if args.scratch is not None:
extra['scratch'] = args.scratch
if args.owner:
extra['user_id'] = session.getUser(args.owner, strict=True)['id']
if args.channel:
extra['channel'] = session.getChannel(args.channel, strict=True)
# generate policy data similar to assert_allowed_by_policy
scm = SCM(url)
scminfo = scm.get_info()
data = {}
for k in scminfo:
v = scminfo[k]
if not k.startswith('scm_'):
k = 'scm_' + k
data[k] = v
# and add the normal extra data
data.update(extra)
return policy, data
def do_mocks(session, plugins):
# a number of internal functions are directly exported
simple_exports = [
# [name, export_name]
['get_user', 'getUser'],
['get_build', 'getBuild'],
['list_rpms', 'listRPMs'],
['list_archives', 'listArchives'],
['get_buildroot', 'getBuildroot'],
['get_tag', 'getTag'],
['list_tags', 'listTags'],
['get_build_target', 'getBuildTarget'],
['get_build_type', 'getBuildType'],
['readFullInheritance', 'getFullInheritance'], # ??
['lookup_package', 'getPackage'],
]
# generator function for wrappers
def wrap(export):
def wrapper(*a, **kw):
return session._callMethod(export, a, kw)
return wrapper
def patchall(name, func):
"""Apply patch in kojihub and any plugins"""
mock.patch('kojihub.kojihub.%s' % name, new=func).start()
# also patch in any plugins that import
for pname in plugins.plugins:
pmod = plugins.plugins[pname]
if hasattr(pmod, name):
# e.g. the plugin has done from kojihub import foo
mock.patch.object(pmod, name, new=func).start()
# mock the simple exports
for name, export in simple_exports:
func = wrap(export)
patchall(name, func)
def get_user_perms(user_id, with_groups=True, inheritance_data=False):
if inheritance_data:
raise NotImplementedError('inheritance_data')
return session.getUserPerms(user_id, with_groups)
patchall('get_user_perms', get_user_perms)
def get_user_groups(user_id):
# internal returns a dictionary group_id:name
# export returns a list of id/name dicts
groups = session.getUserGroups(user_id)
return {g['id']: g['name'] for g in groups}
patchall('get_user_groups', get_user_groups)
def lookup_name(table, info, strict=False, create=False):
# NOT exported, but we can fake some cases
if create:
raise NotImplementedError('lookup_name with create')
if table == 'volume':
return session.getVolume(info, strict)
elif table == 'content_generator':
cgs = session.listCGs()
# cgs is a dictionary indexed by cg name
for cg in cgs:
cginfo = cgs[cg]
if info in (cg, cginfo['id']):
return {'id': cginfo['id'], 'name': cg}
elif table == 'package':
return session.getPackage(info, strict)
elif table == 'tag':
taginfo = session.getTag(info, strict, event="auto")
return dslice(taginfo, ['id', 'name'])
elif table == 'build_target':
tgt = session.getBuildTarget(info, event=None, strict=False)
if tgt:
return dslice(tgt, ['id', 'name'])
return tgt
# the above will not find deleted targets, fall back to history query
hist = session.queryHistory(tables=['build_target_config'], build_target=info,
queryOpts={'limit': 1, 'order': '-create_event'})
hist = hist['build_target_config']
if not hist:
if strict:
raise koji.GenericError('No such target: %s' % info)
else:
return None
else:
# pull out the name and id
return {'id': hist[0]['build_target_id'], 'name': hist[0]['build_target.name']}
else:
raise NotImplementedError(f'lookup_name for {table}')
patchall('lookup_name', lookup_name)
# handle task.getInfo
class FakeTask:
def __init__(self, id):
self.id = int(id)
def getInfo(self, strict=True, request=False):
return session.getTaskInfo(self.id, request, strict)
patchall('Task', FakeTask)
# handle BuildRoot.getList
class FakeBuildRoot:
def __init__(self, id):
# we require the id value
self.load(id)
def load(self, id):
data = session.getBuildroot(id)
self.id = id
self.data = data
def getList(self):
data = session.listRPMs(componentBuildrootID=self.id)
for row in data:
row['rpm_id'] = row['id']
return data
patchall('BuildRoot', FakeBuildRoot)
if __name__ == '__main__':
main()
# the end

View file

@ -2,9 +2,11 @@
from __future__ import absolute_import, print_function
import ast
import mimetypes
import os
import os.path
import optparse
import pprint
import sys
from urllib.parse import quote
@ -17,6 +19,7 @@ sys.path.insert(0, CWD)
sys.path.insert(1, os.path.join(CWD, 'www/lib'))
sys.path.insert(1, os.path.join(CWD, 'www/kojiweb'))
import wsgi_publisher
import index as kojiweb_handlers
def get_url(environ):
@ -111,6 +114,7 @@ def application(environ, start_response):
# provide some needed info
environ['SCRIPT_FILENAME'] = wsgi_publisher.__file__
environ['REQUEST_URI'] = get_url(environ)
environ['REQUEST_SCHEME'] = environ['wsgi.url_scheme']
set_config(environ)
if FIRST:
pprint.pprint(environ)
@ -121,11 +125,87 @@ def application(environ, start_response):
return wsgi_publisher.application(environ, start_response)
def nice_literal(value):
try:
return ast.literal_eval(value)
except (ValueError, SyntaxError):
return value
def get_options():
parser = optparse.OptionParser(usage='%prog [options]')
# parser.add_option('--pdb', action='store_true',
# help='drop into pdb on error')
parser.add_option('--user', '-u', help='fake login as user')
parser.add_option('--time', '-t', type="float", help='mock time as value')
parser.add_option('-o', '--config-option', help='override config option',
action='append', metavar='NAME=VALUE')
opts, args = parser.parse_args()
if args:
parser.error('This command takes no args, just options')
if opts.config_option:
overrides = {}
for s in opts.config_option:
k, v = s.split('=', 1)
v = nice_literal(v)
overrides[k] = v
opts.config_option = overrides
return opts
def override_load_config(opts):
original_load_config = wsgi_publisher.Dispatcher.load_config
def my_load_config(_self, environ):
oldopts = original_load_config(_self, environ)
oldopts.update(opts)
_self.options = oldopts
return oldopts
wsgi_publisher.Dispatcher.load_config = my_load_config
def fake_login(user):
original_assertLogin = kojiweb_handlers._assertLogin
original_getServer = kojiweb_handlers._getServer
def my_assertLogin(environ):
pass
def my_getServer(environ):
session = original_getServer(environ)
environ['koji.currentUser'] = session.getUser(user)
return session
kojiweb_handlers._assertLogin = my_assertLogin
kojiweb_handlers._getServer = my_getServer
def main():
options = get_options()
if options.config_option:
override_load_config(options.config_option)
if options.user:
fake_login(options.user)
if options.time:
from unittest import mock
import datetime
dt = datetime.datetime.fromtimestamp(options.time)
mock.patch('time.time', return_value=options.time).start()
# mocking datetime is tricky, can't mock the c object directly
# and can't mock the datetime class globally without breaking other code
# so we just mock the handlers import of it
my_datetime = mock.patch.object(kojiweb_handlers.kojiweb.util, 'datetime', wraps=datetime).start()
my_datetime.datetime.now.return_value = dt
# koji.add_file_logger('koji', 'fakeweb.log')
httpd = make_server('', 8000, application)
print("Serving kojiweb on http://localhost:8000 ...")
httpd.serve_forever()
if __name__ == '__main__':
main()

View file

@ -0,0 +1,42 @@
=============
CVE-2024-9427
=============
New XSS attack on kojiweb
Summary
-------
An unsanitized input allows for an XSS attack. Javascript code from a malicious
link could be reflected in the resulting web page. At present, we do not
believe that this can be used to submit an action or make a change in Koji due
to existing XSS protections in the code. Even so, this is a serious issue and
we recommend applying this update promptly.
Bug fix
-------
We are releasing updates for affected versions of Koji from within the
past year.
The following releases all contain the fix:
- 1.35.1
- 1.34.3
- 1.33.2
Anyone using a Koji version older than a year should update to a more
current version as soon as possible.
For users who have customized their Koji code, we recommend rebasing your work
onto the appropriate update release. Please see Koji
`issue #4204 <https://pagure.io/koji/issue/4204>`_ for the code details.
As with all changes to web code, you must restart httpd for the changes to
take effect.
Links
-----
Fixed versions can be found at our releases page:
https://pagure.io/koji/releases

View file

@ -5,6 +5,7 @@ Koji CVEs
.. toctree::
:titlesonly:
CVE-2024-9427
CVE-2020-15856
CVE-2019-17109
CVE-2018-1002161

View file

@ -199,7 +199,7 @@ Koji is comprised of several components:
koji-hub via XML-RPC.
- **koji-web** is a set of scripts that run in mod\_wsgi and use the
Cheetah templating engine to provide an web interface to Koji.
Jinja templating engine to provide an web interface to Koji.
koji-web exposes a lot of information and also provides a means for
certain operations, such as cancelling builds.
- **koji** is a CLI written in Python that provides many hooks into Koji.

View file

@ -1,134 +0,0 @@
Unit tests in Fedora's Jenkins
==============================
We're using CentOS's `Jenkins
<https://jenkins-fedora-infra.apps.ocp.ci.centos.org/job/koji>`_ infrastructure
for automatically running unit tests for new commits in master branch.
Pagure triggers tests for any new pull request. It can be also triggered
manually by pressing "Rerun CI" button in PR.
Currently we run tests on Fedora 33/34/rawhide and CentOS 7/8 platforms.
Usage
-----
If you need any change in jenkins setup, please file a pagure issue. As part
of solving issue, this documentation must be updated to reflect current state
in jenkins.
Configuration
-------------
- Public access is for everyone with no need to log in to jenkins.
- Admin access is via same interface and currently tkopecek have
access there. If you need access for yourself (you're probably part of
brew/koji team) create ticket in https://pagure.io/centos-infra requesting this.
Prerequisite for this is CentOS account.
- Setup - Following items are set-up via
https://jenkins-fedora-infra.apps.ocp.ci.centos.org/job/koji/configure
- *Job notifications* - when jenkins job finishes, it will send some info to
pagure. Such call will add a comment to PR. For this REST hook needs to
be configured:
* Format: JSON
* Protocol: HTTP
* Event: Job Finalized
* URL: <url taken from koji pagure settings which will look similar to https://pagure.io/api/0/ci/jenkins//koji/<hash>/build-finished
* Timeout: 30000
* Log: 0
- *This build is parametrized* (checkbox set to true) - it allows jenkins
to use other branches than master (especially for PRs). Three parameters
are defined there:
* REPO - The repository for the pull request.
* BRANCH - The branch for the pull request.
* BRANCH_TO - A branch into which the pull request should be merged.
- *Discard Old Builds*
* Strategy: Rotation
* Days to keep build: 20
* Max # of builds to keep: empty
- *Disable build* - it could be used if a lot of failing build happens with
no vision of early recovery - temporarily suspend jenkins jobs
- *Restrict where this project can be run* - F33 is the only used agent now.
Basically we need an agent which supports podman as all the tests are run in
docker images managed by podman.
- *Source Code Management*
* Git
* Repositories
* Repository URL: https://pagure.io/koji.git
* Credentials: none
* Branches to build: origin/master
- *Build triggers*
* *Trigger builds remotely*: true
* Authentication tokens: <token from koji pagure settings>
* *Poll SCM*:
* Schedule: H/5 * * * *
- *Build* - most important part - script which runs tests itself. Basically we
run tests in containers, last one also run flake8 and is used for coverage
report.
.. code-block:: shell
# merge PR into main repository
if [ -n "$REPO" -a -n "$BRANCH" ]; then
git config --global user.email "test@example.com"
git config --global user.name "Tester"
git remote rm proposed || true
git remote add proposed "$REPO"
git fetch proposed
git checkout "origin/${BRANCH_TO:-master}"
git merge --no-ff "proposed/$BRANCH" -m "Merge PR"
fi
# centos:7
rm -rf .tox
podman run --rm --pull=always -v $PWD:/koji --security-opt label=disable --name koji-centos-test-7 quay.io/tkopecek/koji-centos-test:7 bash -c "cd /koji && tox -e py2"
podman rmi quay.io/tkopecek/koji-centos-test:7
# centos:8
rm -rf .tox
podman run --rm --pull=always -v $PWD:/koji --security-opt label=disable --name koji-centos-test-8 quay.io/tkopecek/koji-centos-test:8 bash -c "cd /koji && tox -e py3"
podman rmi quay.io/tkopecek/koji-centos-test:8
# fedora:32
rm -rf .tox
podman run --rm --pull=always -v $PWD:/koji --security-opt label=disable --name koji-fedora-test-32 quay.io/tkopecek/koji-fedora-test:32 bash -c "cd /koji && tox -e py3"
podman rmi quay.io/tkopecek/koji-fedora-test:32
# fedora:33
rm -rf .tox
podman run --rm --pull=always -v $PWD:/koji --security-opt label=disable --name koji-fedora-test-33 quay.io/tkopecek/koji-fedora-test:33 bash -c "cd /koji && tox -e py3"
podman rmi quay.io/tkopecek/koji-fedora-test:33
# fedora:rawhide
rm -rf .tox
podman run --rm --pull=always -v $PWD:/koji --security-opt label=disable --name koji-fedora-test-rawhide quay.io/tkopecek/koji-fedora-test:rawhide bash -c "cd /koji && tox -e flake8,py3"
podman rmi quay.io/tkopecek/koji-fedora-test:rawhide
- *Post-build actions*
* *Publish Cobertura Coverage report*: coverage.xml - this will create coverage report accessible via jenkins web ui
* *Report Violations* - *pep8*: flake8_report.txt
* *E-mail notification*:
* Recipients: tkopecek@redhat.com exd-sp-rhel-build-alerts@redhat.com
* Send separate e-mails to individuals who broke the build
- *Send messages to fedmsg*

View file

@ -46,6 +46,7 @@ The build map contains the following entries:
is optional.
- build_id: Reserved build ID. This field is optional.
- task_id: In case there is a corresponding task in koji (int/None)
- draft: True if the build should be imported as a draft. Optional.
- extra: A map of extra metadata associated with the build, which
must include at least one of:
@ -90,18 +91,37 @@ Each map in the buildroots list contains the following entries:
- version: Version of the tool used.
- components: List of maps containing information about content
installed in the build environment (if any). Each map is guaranteed
installed in the build environment (if any). Each map is required
to contain a **type** field, which determines what other fields are
present in the map. For maps where **type = rpm**, the following
fields will be present:
present in the map. The currently available types are detailed below.
- For maps where **type = rpm**, the following fields must be present:
- name: The rpm name.
- version: The rpm version.
- release: The rpm release.
- epoch: The rpm epoch.
- arch: The rpm arch.
- sigmd5: The SIGMD5 tag from the rpm header.
- signature: The signature used to sign the rpm (if any).
Additionally, the following checksums from the rpm header
must be included if they exist in the header.
If given, these values must be lowercase hex strings.
- sigmd5: The SIGMD5 tag value
- sha1header: The SHA1HEADER tag value
- sha256header: The SHA256HEADER tag value
- sha3_256header: The SHA3_256HEADER tag value
For backwards compatibility, if is sufficient to specify only the sigmd5
checksum for rpm files having v4 and earlier formats.
The rpm id may be specified. If given, this must be the id of the rpm in Koji.
- id: The Koji rpm id
Lastly for rpms, the following legacy field is accepted but ignored:
- signature: ignored
- For maps where **type = file**, the following fields will be present:
@ -138,6 +158,9 @@ Each map in the output list contains the following entries:
- buildroot\_id: The id of the buildroot used to create this file. Must
match an entry in the buildroots list.
- filename: The name of the file.
- relpath: relative path for the uploaded file. I.e. the file was uploaded to
$upload_dir/$relpath/$filename
- subdir: subdir for final location. Only valid for logs and non-legacy btypes
- filesize: The size of the file.
- arch: The architecture of the file (if applicable).
- checksum: The checksum of the file.
@ -194,31 +217,31 @@ The below JSON is based loosely on the output of a docker image build.
"epoch": null,
"arch": "x86_64",
"sigmd5": "a1b2c3...",
"signature": "fd431d51"},
"sha1header": "2a1c91..."},
{"type": "rpm",
"name": "openssl",
"version": "1.0.1e",
"release": "42.el7",
"epoch": null,
"arch": "x86_64",
"sigmd5": "d4e5f6...",
"signature": "fd431d51"},
"sigmd5": "f8e857...",
"sha1header": "ea4c84..."},
{"type": "rpm",
"name": "bind-libs",
"version": "9.9.4",
"release": "18.el7",
"epoch": 32,
"arch": "x86_64",
"sigmd5": "987abc...",
"signature": null},
"sigmd5": "5b2ca0...",
"sha1header": "e73c78..."},
{"type": "rpm",
"name": "python-urllib3",
"version": "1.5",
"release": "8.el7",
"epoch": null,
"arch": "noarch",
"sigmd5": "123hgf...",
"signature": null},
"sigmd5": "5f38e3...",
"sha1header": "25a47b..."},
{"type": "file",
"filename": "jboss-eap-6.3.3-full-build.zip",
"filesize": 12345678,

View file

@ -155,7 +155,7 @@ Following koji plugins uses CGs as part of their workflow.
- `OpenShift Build Service <https://github.com/containerbuildsystem/>`__
- `OSBuild <https://github.com/osbuild/>`__
- `MBS <https://pagure.io/fm-orchestrator/blob/master/f/module_build_service/builder/KojiContentGenerator.py>`__
- `MBS <https://forge.fedoraproject.org/koji/mbs/src/branch/master/module_build_service/builder/KojiContentGenerator.py>`__
Standalone CG utilites are here:
- `CoreOS <https://github.com/coreos/coreos-assembler/blob/master/src/cmd-koji-upload>`__

View file

@ -237,6 +237,13 @@ Available tests
``none``
* an alias of false
``bool``
* return boolean value of argument. E.g. ``bool scratch`` will return true
for scratch builds
``has``
* test if policy contains argument field
``operation``
* for tag operations, the operation is one of: tag, untag, move. This test
checks its arguments against the name of the operation and returns true if
@ -291,6 +298,9 @@ Available tests
``buildtype``
* checks the build type(s) against the arguments
``is_draft``
* checks whether the build is a draft. See :doc:`draft_builds`
``skip_tag``
* checks to see if the --skip-tag option was used
* only applicable to the build_from_* policies
@ -346,5 +356,20 @@ Available tests
* the user matched is the user performing the action
``match``
* matches a field in the data against glob patterns
* matches a field in the data against glob patterns
* true if any pattern matches
``match_any``
* Matches any item of a list/tuple/set value in the data against glob patterns
* True if any of the expressions matches any item in the list/tuple/set, else False.
If the field doesn't exist or isn't a list/tuple/set, the test returns False
``match_all``
* Matches all items of a list/tuple/set value in the data against glob patterns
* True if any of the expressions matches all items in the list/tuple/set, else False.
If the field doesn't exist or isn't a list/tuple/set, the test returns False
``compare``
* Simple numeric field comparison
* Supports basic numeric comparisons. The right operand must be a valid
number (<,>,<=,>=,=,!=)

View file

@ -0,0 +1,169 @@
Draft Builds
============
Draft builds allow for a workflow of building the name rpm NVR multiple times and then choosing
one of those builds to promote.
The draft build feature was added in :doc:`version 1.34.0 <release_notes/release_notes_1.34>`
What is a draft build?
----------------------
In the simplest terms, draft builds are builds with the ``draft`` flag set to True.
This flag has multiple implications:
1. Koji adds a *draft suffix* to the release value for draft builds. The format of this suffix
is ``,draft{build_id}``. This ensures that the NVR of draft builds is unique, even if the
base NVR (without the suffix) is not.
2. The NVRA values for rpms included in a draft build are not required to be unique.
3. System policy (notably the tag policy) may set different rules for draft builds.
Draft builds should not be confused with scratch builds. Scratch builds are
simply stored as files and cannot be tagged in Koji. Draft builds, on the other
hand, are actual builds. They can be tagged (subject to policy) and hence potentially
used in buildroots. They can be promoted to become normal builds.
Building a draft build
----------------------
A draft build is triggered simply by passing the ``--draft`` option to the ``build`` command.
The resulting build will be a imported as a draft build.
Otherwise the build process is identical.
At the moment, this feature is only relevant for rpm builds, but it may be extended in the future.
Promoting a draft build
-----------------------
Draft builds can be "promoted" to non-draft using the ``promote-build`` cli
command.
When a draft build is promoted, it is renamed to remove the draft suffix.
The build directory is moved to its new location, and the original
path (the one that is includes the draft suffix) is replaced with a symlink to the new location.
Build promotion is a one-time transition, i.e. builds cannot be "unpromoted".
Only one draft build for a given NVR can be promoted, and once Koji has a
non-draft build for a given NVR, further draft builds for that NVR are blocked.
An Example
----------
You could trigger a draft build with a command like the following:
::
$ koji build --draft f39-candidate mypackage-1.1-35.src.rpm
Once the build completes, you would have a build named something like:
::
mypackage-1.1-35,draft_51515
The number in the draft suffix will be the same as the build id.
This makes draft builds stand out.
However, note that the component rpms *do not* have the draft suffix added.
::
$ koji buildinfo 51515
BUILD: mypackage-1.1-35,draft_51515 [51515]
Draft: YES
State: COMPLETE
Built by: kojiuser
Source: mypackage-1.1-35.src.rpm
Volume: DEFAULT
Task: 12082 build (f39-candidate, mypackage-1.1-35.src.rpm)
Finished: Thu, 04 Jan 2024 20:02:18 EST
Tags: f39-candidate
Extra: {'source': {'original_url': 'mypackage-1.1-35.src.rpm'}}
RPMs:
/mnt/koji/packages/mypackage/1.1/35,draft_51515/noarch/mypackage-1.1-35.noarch.rpm
/mnt/koji/packages/mypackage/1.1/35,draft_51515/noarch/mypackage-devel-1.1-35.noarch.rpm
/mnt/koji/packages/mypackage/1.1/35,draft_51515/noarch/mypackage-1.1-35.src.rpm
You can build the same NVR as a draft multiple times.
::
$ koji build --draft f39-candidate mypackage-1.1-35.src.rpm
::
$ koji buildinfo 51516
BUILD: mypackage-1.1-35,draft_51516 [51516]
Draft: YES
State: COMPLETE
...
Once you have a build that is satisfactory, you can promote it.
::
$ koji promote-build mypackage-1.1-35,draft_51516
mypackage-1.1-35,draft_51516 has been promoted to mypackage-1.1-35
::
$ koji buildinfo mypackage-1.1-35
BUILD: mypackage-1.1-35 [51516]
State: COMPLETE
Built by: kojiuser
Source: mypackage-1.1-35.src.rpm
Volume: DEFAULT
Task: 12082 build (f39-candidate, mypackage-1.1-35.src.rpm)
Finished: Thu, 04 Jan 2024 20:02:18 EST
Promoted by: kojiuser
Promoted at: Tue, 09 Jan 2024 14:13:48 EST
Tags: f39-candidate
Extra: {'source': {'original_url': 'mypackage-1.1-35.src.rpm'}}
RPMs:
/mnt/koji/packages/mypackage/1.1/35,draft_51515/noarch/mypackage-1.1-35.noarch.rpm
/mnt/koji/packages/mypackage/1.1/35,draft_51515/noarch/mypackage-devel-1.1-35.noarch.rpm
/mnt/koji/packages/mypackage/1.1/35,draft_51515/noarch/mypackage-1.1-35.src.rpm
Dealing with duplicate NVRAs
----------------------------
The NVRAs for all *non-draft* rpms in Koji are required to be unique.
This is enforced by a database constraint.
However, this constraint does not apply to draft builds.
So, it is possible to have rpms of the same name in Koji if draft builds are used.
When Koji is asked to look up an rpm by name, it will report the non-draft rpm if it exists.
Otherwise, it will chose the matching draft rpm with the highest id.
Because of this, the *safest* way to specify an rpm is to use its rpm id.
Policies for draft builds
-------------------------
The ``is_draft`` policy test returns True if the build in question is a draft and False otherwise.
This is primarily useful in the ``tag`` policy to limit where draft builds can go.
Note that Koji's default policies do not include special rules for draft builds, so by default
draft builds can be used anywhere a regular build can.
Koji administrators can adjust their policies to match their own workflows.
For example, you could use the tag policy to restrict draft builds to only certain tags.
E.g.
::
[policy]
tag =
is_draft && operation move tag :: {
tag *-draft *-draft-* !! deny draft builds are only allowed in draft tags
}
...
For further information on Koji policies,
see the :doc:`policy documentation <defining_hub_policies>`

View file

@ -6,7 +6,7 @@ Koji provides some *limited* features for exporting repositories of RPMs.
Please note that Koji is a build system, not a repository manager, and these
features are secondary.
If you need more robust repository generation than Koji provides, then you may
want to look into using `pungi <https://pagure.io/pungi/>`_.
want to look into using `pungi <https://forge.fedoraproject.org/pungi/pungi/>`_.
Koji's internal repositories
@ -90,14 +90,13 @@ For a full list of options, see ``koji dist-repo --help``.
**Koji Hub plugin**
Fedora release engineering uses a hub plugin `tag2distrepo
<https://pagure.io/releng/tag2distrepo>`_ to automatically export dist-repos
for certain tags.
Fedora release engineering uses the tag2distrepo hub plugin (now integrated
into Koji) to automatically export dist-repos for certain tags.
Beyond Koji
===========
If you're aiming to have more control about repositories, varieties of
distribution flavours, etc. use `pungi <https://pagure.io/pungi/>`_ which can
distribution flavours, etc. use `pungi <https://forge.fedoraproject.org/pungi/pungi/>`_ which can
create whole composes and which uses Koji for some of the subtasks.
Pungi + koji is what Fedora currently uses for composes.

View file

@ -233,6 +233,8 @@ Notification options
For more on notifications in Koji, see :ref:`notification-basics`
.. _hub_resource_limits:
Resource limits
^^^^^^^^^^^^^^^
If configured, the following resource limits are applied by the hub at startup.

View file

@ -101,7 +101,7 @@ so:
::
$ koji spin-livemedia --release 20200922.n.0 \
--ksurl 'git+https://pagure.io/fedora-kickstarts.git?#b4956c05028a088c641d0ce6e1a31b6d8b20176f' \
--ksurl 'git+https://forge.fedoraproject.org/releng/spin-kickstarts.git?#b4956c05028a088c641d0ce6e1a31b6d8b20176f' \
--install-tree-url 'https://kojipkgs.fedoraproject.org/compose/branched/Fedora-33-20200922.n.0/compose/Everything/$basearch/os' \
--repo 'https://kojipkgs.fedoraproject.org/compose/branched/Fedora-33-20200922.n.0/compose/Everything/$basearch/os' \
--can-fail ppc64le,aarch64 \

View file

@ -11,7 +11,7 @@ Koji
====
Koji is the software that builds `RPM packages for the Fedora project`_. It
uses `Mock`_ to create chroot environments to perform builds. To download the
uses :doc:`Mock <mock_config>` to create chroot environments to perform builds. To download the
source code, report bugs, join the mailing list etc., see the `Koji project
website`_.
@ -29,8 +29,11 @@ Contents
external_repo_server_bootstrap
image_build
winbuild
draft_builds
repo_generation
exporting_repositories
tag_inheritance
managing_comps_data
misc
release_notes/release_notes
migrations/migrations
@ -42,6 +45,7 @@ Contents
database_howto
kojid_conf
hub_conf
mock_config
using_the_koji_build_system
setting_rpm_macros
profiles
@ -50,7 +54,6 @@ Contents
writing_koji_code
content_generators
content_generator_metadata
configuring_jenkins
utils
supported_platforms
@ -120,7 +123,7 @@ and communicates with koji-hub via XML-RPC.
Koji-Web
--------
koji-web is a set of scripts that run in mod_wsgi and use the Cheetah
koji-web is a set of scripts that run in mod_wsgi and use the Jinja
templating engine to provide a web interface to Koji. It acts as a client to
koji-hub providing a visual interface to perform a limited amount of
administration. koji-web exposes a lot of information and also provides a means
@ -301,4 +304,4 @@ Indices and tables
.. _Mock: https://github.com/rpm-software-management/mock/wiki
.. _RPM packages for the Fedora project: https://koji.fedoraproject.org/koji/
.. _Koji project website: https://pagure.io/koji
.. _Koji project website: https://forge.fedoraproject.org/koji/koji

View file

@ -24,9 +24,9 @@ koji server connected to:
$ koji hello
2021-04-23 09:45:22,732 [ERROR] koji: (gssapi auth failed: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://koji.fedoraproject.org/kojihub/ssllogin)
Use following documentation to debug kerberos/gssapi auth issues. https://docs.pagure.org/koji/kerberos_gssapi_debug/
Use following documentation to debug kerberos/gssapi auth issues. https://koji.readthedocs.io/en/latest/kerberos_gssapi_debug.html
2021-04-23 09:45:22,734 [ERROR] koji: GSSAPIAuthError: unable to obtain a session (gssapi auth failed: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://koji.fedoraproject.org/kojihub/ssllogin)
Use following documentation to debug kerberos/gssapi auth issues. https://docs.pagure.org/koji/kerberos_gssapi_debug/
Use following documentation to debug kerberos/gssapi auth issues. https://koji.readthedocs.io/en/latest/kerberos_gssapi_debug.html
In this case we see not one but two errors while trying to authenticate. Let's
see what more info we can get:
@ -38,7 +38,7 @@ see what more info we can get:
2021-04-23 09:47:58,731 [DEBUG] koji: Opening new requests session
2021-04-23 09:47:59,446 [DEBUG] koji: Opening new requests session
2021-04-23 09:47:59,446 [ERROR] koji: (gssapi auth failed: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://koji.fedoraproject.org/kojihub/ssllogin)
Use following documentation to debug kerberos/gssapi auth issues. https://docs.pagure.org/koji/kerberos_gssapi_debug/
Use following documentation to debug kerberos/gssapi auth issues. https://koji.readthedocs.io/en/latest/kerberos_gssapi_debug.html
Traceback (most recent call last):
File "/usr/bin/koji", line 335, in <module>
rv = locals()[command].__call__(options, session, args)
@ -49,7 +49,7 @@ see what more info we can get:
File "/home/tkopecek/cvs/koji/koji/__init__.py", line 2513, in gssapi_login
raise GSSAPIAuthError(err)
koji.GSSAPIAuthError: unable to obtain a session (gssapi auth failed: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://koji.fedoraproject.org/kojihub/ssllogin)
Use following documentation to debug kerberos/gssapi auth issues. https://docs.pagure.org/koji/kerberos_gssapi_debug/
Use following documentation to debug kerberos/gssapi auth issues. https://koji.readthedocs.io/en/latest/kerberos_gssapi_debug.html
We see no output from krbV library. It indicates that there was no significant
interaction with the library. Main reason would be missing ``kinit``. Fixing

View file

@ -1,11 +1,15 @@
kojid.conf Options
------------------
kojid.conf is standard .ini-like configuration file. Its main section is
called ``[kojid]`` and contains following options. They are split by function
to section but can occur anywhere in ``[kojid]`` section in config file.
General
^^^^^^^
``/etc/kojid/kojid.conf`` is a standard .ini-like configuration file. Its main
section is named ``[kojid]`` and can contain the following options.
For readability, we have broken them into categories in this document,
but they should all go under the ``[kojid]`` block of the config file.
General Options
^^^^^^^^^^^^^^^
These options affect overall kojid behavior:
.. glossary::
chroot_tmpdir=/chroot_tmpdir
The temporary directory in buildroot. It is advised to not use ``/tmp``
@ -31,7 +35,7 @@ General
buildroot_final_cleanup_delay
buildroot_final_cleanup_delay=86400
Time after which buildroot (pre-cleand after
Time after which buildroot (pre-cleaned after
``buildroot_basic_cleanup_delay``) is deleted completely. (1 day in
seconds)
@ -96,8 +100,10 @@ General
workdir=/tmp/koji
The directory root for temporary storage on builder.
Building
^^^^^^^^
Build Options
^^^^^^^^^^^^^
The following options affect various build processes in kojid:
.. glossary::
allowed_scms=scm.example.com:/cvs/example git.example.org:/example svn.example.org:/users/\*:no
Controls which source control systems the builder will accept. It is a
@ -192,8 +198,10 @@ Building
the image. Default value is compromise between speed and resource usage.
Only one option (not space-separated) is allowed here for now.
RPM Builds
^^^^^^^^^^
RPM Build Options
^^^^^^^^^^^^^^^^^
The following options affect rpms builds:
.. glossary::
distribution=Koji
The distribution to use in rpm headers. Value is propagated via macros
@ -214,8 +222,27 @@ RPM Builds
The vendor to use in rpm headers. Value is propagated via macros to
rpmbuild.
Mock
^^^^
.. _rlimits_kojid:
General RLIMIT options
^^^^^^^^^^^^^^^^^^^^^^
Kojid accepts the same rlimit options as the hub.
.. glossary::
RLIMIT_*
Same resource limit options as in the :ref:`hub config
<hub_resource_limits>`. Note, that when ``mock.new_chroot`` is set, those
are not propagated to the mock chroot. To apply rlimits to mock in
such cases, you can set them separately in
``/etc/mock/site-defaults.cfg``. See :doc:`mock_config` for more information.
.. _mock_kojid_conf:
Mock Options
^^^^^^^^^^^^
The following options affect how Koji uses Mock:
.. glossary::
mockdir=/var/lib/mock
The directory root for mock.
@ -234,20 +261,26 @@ Mock
yum_proxy=None
Address of proxy server which will be passed via mock to yum.
Notifications
^^^^^^^^^^^^^
rlimits
The ``RLIMIT_*`` options can affect mock's behaviour and are described :ref:`here
<rlimits_kojid>`.
Notification Options
^^^^^^^^^^^^^^^^^^^^
.. glossary::
admin_emails=''
Space-separated list of addresses for sending logs.
from_addr=Koji Build System <buildsys@example.com>
from_addr=Koji Build System <buildsys\@example.com>
The From address used when sending email notifications.
smtphost=example.com
The mail host to use for sending email notifications.
Kerberos Authentication
^^^^^^^^^^^^^^^^^^^^^^^
Kerberos Options
^^^^^^^^^^^^^^^^
The following options control Kerberos authentication:
.. glossary::
ccache=/var/tmp/kojid.ccache
Credentials cache used for krbV login.
@ -260,8 +293,10 @@ Kerberos Authentication
Location of the keytab.
SSL Authentication
^^^^^^^^^^^^^^^^^^
SSL Options
^^^^^^^^^^^
The following options control SSL authentication:
.. glossary::
ca=''
noop, obsoleted, will be removed soon.

View file

@ -0,0 +1,157 @@
Managing comps data for tags
============================
Koji can record comps data for each tag and uses that data to write a comps
file whenever it generates a yum repo for that tag. This document describes
how this data is stored, how to read it, and how to change it.
For background on comps files, see
* https://dnf5.readthedocs.io/en/latest/misc/comps.7.html
* https://fedoraproject.org/wiki/How_to_use_and_edit_comps.xml_for_package_groups
The comps data *affects how rpm builds are performed*.
Various buildroots generated by Koji use these groups for their base install.
E.g.
* rpm builds use the ``build`` group
* source rpm builds use the ``srpm-build`` group
* maven builds use the ``maven-build`` group
* wrapper rpm builds use the ``wrapper-rpm-build`` group
* appliance builds use the ``appliance-build`` group
* livecd builds use the ``livecd-build`` group
* livemedia builds use the ``livemedia-build`` group
Reading the data
----------------
The ``koji list-groups`` cli command will output the comps data for a given tag
.. code-block:: text
Usage: koji list-groups [options] <tag> [<group>]
(Specify the --help global option for a list of other help options)
Options:
-h, --help show this help message and exit
--event=EVENT# query at event
--ts=TIMESTAMP query at last event before timestamp
--repo=REPO# query at event for a repo
--show-blocked Show blocked packages and groups
The command will optionally accept a group name to limit the output to a single group.
Like many other types of data in Koji, the comps data is versioned and Koji remembers its history.
The ``--event/--ts/--repo`` options can be used to query this data from an earlier point in time.
The ``show-blocked`` option will include blocked entries in the output.
Alternately ``show-groups`` command can be used to present the groups data in different formats.
This command is a historical oddity, but still useful to export the data in comps format.
Example
-------
The following command prints the srpm-build group data for the f41-build tag.
.. code-block:: text
$ koji list-groups f41-build srpm-build
srpm-build [f41]
bash: None, mandatory [f41]
fedora-release: None, mandatory [f41]
fedpkg-minimal: None, mandatory [f41]
glibc-minimal-langpack: None, mandatory [f41]
gnupg2: None, mandatory [f41]
redhat-rpm-config: None, mandatory [f41]
rpm-build: None, mandatory [f41]
shadow-utils: None, mandatory [f41]
Because our command included a specific group name, the command only outputs that one group.
Under this group, we see the list of packages in the group and their parameters.
The bracketed value at the end shows the tag that the entry is inherited from.
Groups data and inheritance
---------------------------
Like most other data associated with tags, groups data is inheritable.
Because the groups data is complex, so is the inheritance.
The groups data is inherited piecemeal, with individual groups, group package
entries, and group dependencies separately inheritable.
You can prevent an entry from being inherited by blocking it.
This can be done via the ``block-group``, ``block-group-pkg``, and ``block-group-req``
commands respectively (and undone with the corresponding unblock command).
As noted above, you can see which tags an entry comes from via the ``list-groups`` command.
So, a given tag will have a list of groups that includes inherited entries.
Each of those groups will have a list of packages and a list of group dependencies
which include inherited entries.
For admin sanity, we recommend defining a comps in a base tag in your inheritance
and keeping adjustments in child tags to a minimum.
A common case is to add additional packages to the build group for a specialized
build tag.
Changing comps data
-------------------
You can add, remove, block, and unblock individual entries with the relevant command
.. code-block:: text
add-group Add a group to a tag
remove-group Remove group from tag
block-group Block group in tag
unblock-group Unblock a group from tag
add-group-pkg Add a package to a group's package listing
remove-group-pkg Remove packages from a group's package listing
block-group-pkg Block a package from a group's package listing
unblock-group-pkg Unblock a package from a group's package listing
add-group-req Add a group to a group's required list
block-group-req Block a group's requirement listing
remove-group-req Remove entries from a group's requirement listing
unblock-group-req Unblock a group's requirement listing
Additionally, you can also import groups data directly from a comps file with the ``import-comps`` command.
This is useful when setting up a new tag from scratch.
.. code-block:: text
Usage: koji import-comps [options] <file> <tag>
(Specify the --help global option for a list of other help options)
Options:
-h, --help show this help message and exit
--force force import
Blocking vs removing
--------------------
The various remove commands remove a specific entry from a specific tag.
They will fail if the entry is not actually in the specified tag.
This commonly happens when an entry is inherited.
When your tag has an inherited comps entry that you want to remove, you have two
options:
* block the entry in the tag
* remove the entry from the ancestor tag it is inherited from
It is generally safest to block, as this only affects the tag of concern.
Removing the entry in an ancestor could affect other tags negatively.
However, there are certainly cases where it makes sense to remove the entry
from the ancestor.
Group dependencies
------------------
For historical reasons, Koji's comps data allows specifying group dependecies/requirements.
This is antiquated feature of comps that is longer used by dnf,
so in practice there is no need to specify such entries (i.e. the various ``*-req`` commands).

View file

@ -12,7 +12,7 @@ As in previous releases, we provide a migration script that updates the database
::
# psql koji koji < /usr/share/doc/koji/docs/schema-upgrade-1.33-1.34.sql
# psql koji koji < /usr/share/koji/schema-upgrade-1.33-1.34.sql
Other changes

View file

@ -0,0 +1,62 @@
Migrating to Koji 1.35
======================
You should consider the following changes when migrating to 1.35:
DB Updates
----------
Changes for new repo handling introduced a few new tables.
As in previous releases, we provide a migration script that updates the database.
::
# psql koji koji < /usr/share/koji/schema-upgrade-1.34-1.35.sql
Repo Generation
---------------
The way that Koji handles repo generation has changed significantly.
For full details, please see the release notes and :doc:`../repo_generation`.
The following kojira configuration options are no longer used and have no analog
in the new system:
* ``queue_file``
* ``ignore_tags``
* ``no_repo_effective_age``
* ``repo_tasks_limit``
We recommend you remove these settings from ``kojira.conf``.
Kojira will warn at startup if they are present.
Additionally, these kojira configuration options have moved into the hub config:
* ``max_repo_tasks`` -> ``MaxRepoTasks``
* ``max_repo_tasks_maven`` -> ``MaxRepoTasksMaven``
* ``debuginfo_tags`` -> ``DebuginfoTags``
* ``source_tags`` -> ``SourceTags``
* ``separate_source_tags`` -> ``SeparateSourceTags``
Admins that relied on these kojira options should now set the corresponding hub options and remove
the old kojira ones.
For the latter three, note that there are now other ways to control these repo options.
Finally, if you have systems outside of Koji that rely on Koji keeping particular tag repos up to
date, you may need to take extra steps to ensure regeneration.
If the tag sees regular build use within Koji, then that might trigger regens often enough.
If not, there are two options:
* set ``repo.auto=True`` for the tag in question
* have the external system create a repo request via the api
Again, for full details, please see the release notes and :doc:`../repo_generation`.
Other changes
-------------
There are numerous other changes in 1.35 that should not have a direct impact
on migration. For details see: :doc:`../release_notes/release_notes_1.35`

View file

@ -0,0 +1,65 @@
Migrating to Koji 1.36
======================
You should consider the following changes when migrating to 1.36:
DB Updates
----------
The changes to support rpm v6 include new fields in the ``rpminfo`` table.
Additionally, we have added new archive types and new indexes.
As in previous releases, we provide a migration script that updates the database.
::
# psql koji koji < /usr/share/koji/schema-upgrade-1.35-1.36.sql
Volume toplinks
---------------
.. warning:: Action required for non-default volumes
In order to address a previous issue with promoting builds, the system now
requires that each volume directory contain a ``toplink`` symlink that points
to the main volume.
This is simply a symlink that points to the main volume. E.g.
::
$ file /mnt/koji/vol/vol3/toplink
/mnt/koji/vol/vol3/toplink: symbolic link to /mnt/koji
You **must** create this symlink for any existing volumes used in your system.
Failure to do so can result in build promotion failures.
We recommend using an absolute symlink, as in the example above.
When adding a new volume, admins should create this symlink when they create
the volume directory. If not, the hub will automatically create it using the
configured topdir path and log a warning.
For more information, see
* :ref:`Fix draft symlink handling <draft-symlink-fix-1-36>`
* :ref:`adding-new-volume`
Notable configuration changes
-----------------------------
The ``RepoLagWindow`` hub option is no longer used.
For details see https://pagure.io/koji/issue/4499
The ``DisableURLSessions`` hub option now defaults to True.
This will prevent clients older than Koji 1.31 from authenticating.
For details see https://pagure.io/koji/issue/4420
Other changes
-------------
There are numerous other changes in 1.36 that should not have a direct impact
on migration. For details see: :doc:`../release_notes/release_notes_1.36`

View file

@ -5,6 +5,8 @@ Migrations
.. toctree::
:maxdepth: 1
migrating_to_1.36
migrating_to_1.35
migrating_to_1.34
migrating_to_1.33
migrating_to_1.32

159
docs/source/mock_config.rst Normal file
View file

@ -0,0 +1,159 @@
Interaction with Mock
---------------------
`Mock`_ is crucial component for building in Koji. Most build types use mock to
prepare a fresh, isolated environment for building content.
For further reading on the mock tool itself,
see the `mock documentation <https://rpm-software-management.github.io/mock/>`_.
Mock config files
=================
For each buildroot Koji prepares a configuration file for mock to use.
The content of the file depends in part on some administrator's decisions
and can be tweaked by options in the build tag.
These files are managed by kojid and stored under ``/etc/mock/koji`` on
the build host.
Since Koji 1.34.1, builds will save the mock configuration file as a log named
``mock_config.log`` and store it alongside other logs from the build.
The contents of this file are generated by Koji and are affected by:
* :ref:`kojid configuration <mock_kojid_conf>`
* the build tag
* the build arch
* the repo used for the build
* build tag options, see :ref:`tuning-mock-per-tag`
* the controlling build task (e.g. buildArch for rpms)
You can generate mock configs locally in the same way that kojid does.
See :ref:`cli_mock_config`
Site defaults
=============
In addition to the mock configuration file for the buildroot, the mock command
also consults ``/etc/mock/site-defaults.cfg`` on the build host.
You can use this file to set global defaults on your builders.
The following settings are recommended for use with Koji:
- ``use_bootstrap = False`` - Bootstrap is a) not needed in most cases b)
slows down the build c) e.g. in combination with next option could lead to
unreproducible build. While this feature is pretty useful in some cases,
it should be turned off as default and could be selectively turned on for
specific buildroots per tag configuration.
- ``use_bootstrap_image`` - As noted before, this is generally unsafe
option, especially if used with image tags which are expected to be moved
(e.g. "latest"). Note, that to use this option (even via tag's
configuration), you need to explicitly allow it in :doc:`kojid.conf
<kojid_conf>` via ``mock_bootstrap_image = True``.
- ``nspawn_args`` - if you want to apply rlimit settings for mock with nspawn
isolation, you will need to use this option. See :ref:`rlimits_mock` below.
- ``macros`` - some rpm macros could be defined every time for every build
based on builder itself. Typical usecase is to limit usage of CPUs on
given builder by setting ``config_opts['macros']['%_smp_ncpus_max'] = 2``.
- ``plugin_conf`` - Various plugins could be enabled and configured to be
available in build environment. Example is `rpmautospec`_ which allows
various ``%auto*`` macros in spec files.
.. _rlimits_mock:
RLIMIT settings
^^^^^^^^^^^^^^^
When mock uses simple isolation (aka old-chroot), the
:ref:`RLIMIT_* settings <rlimits_kojid>` from ``kojid.conf`` will propagate
to mock.
However, when mock uses nspawn isolation (aka new-chroot, controlled by the
``mock.new_chroot`` tag extra option), these limits are not propagated automatically.
To apply such limits to the mock nspawn chroots, you can add them to the
``nspawn_args`` option in ``site-defaults.cfg``.
For example, you might set:
::
config_opts['nspawn_args'] = ['--rlimit=RLIMIT_NOFILE=16384:16384']
If your system uses a mix of mock isolation settings, then you will likely want
to apply rlimit settings in *both* ``kojid.conf`` and ``site-defaults.cfg`` for
consistency.
.. _mock_gpg_verification:
GPG signature verification
==========================
Koji generates mock configs with ``gpgcheck=0`` in the yum/dnf configuration,
because packages in Koji's buildroot repos are unsigned.
Starting with Fedora 45, RPM defaults ``%_pkgverify_level`` to ``all``,
meaning RPM itself refuses to install unsigned packages regardless of the
dnf-level ``gpgcheck`` setting. This causes buildroot setup to fail with
``GPG check FAILED`` when installing packages from the Koji repo.
DNF5 (>= 5.2.14.0, available in Fedora 42+) has built-in support for
disabling per-package signature verification for repos with ``gpgcheck=0``.
For Fedora 45+ build tags, set ``mock.package_manager=dnf5`` to use this
mechanism:
::
koji edit-tag f45-build -x mock.package_manager=dnf5
Older Fedora versions and RHEL are not affected, as they default
``%_pkgverify_level`` to ``digest`` (or do not have the macro at all).
See :ref:`tuning-mock-per-tag` for other mock-related tag options.
.. _cli_mock_config:
Local mock configs
==================
The ``koji mock-config`` command can be used to generate a mock config file locally
in the same way that the builders do. These can be useful for local testing or debugging.
::
$ koji mock-config --help
Usage: koji mock-config [options]
(Specify the --help global option for a list of other help options)
Options:
-h, --help show this help message and exit
-a ARCH, --arch=ARCH Specify the arch
-n NAME, --name=NAME Specify the name for the buildroot
--tag=TAG Create a mock config for a tag
--target=TARGET Create a mock config for a build target
--task=TASK Duplicate the mock config of a previous task
--latest use the latest redirect url
--buildroot=BUILDROOT
Duplicate the mock config for the specified buildroot
id
--mockdir=DIR Specify mockdir
--topdir=DIR Specify topdir, topdir tops the topurl
--topurl=URL URL under which Koji files are accessible, when topdir
is specified, topdir tops the topurl
--distribution=DISTRIBUTION
Change the distribution macro
--yum-proxy=YUM_PROXY
Specify a yum proxy
-o FILE Output to a file
.. _Mock: https://rpm-software-management.github.io/mock/
.. _rpmautospec: https://fedora-infra.github.io/rpmautospec-docs/

View file

@ -100,6 +100,13 @@ koji due to easier integration with rest of the code.
It is used for managing `sidetags` which are light-weight short-lived build tags
for developer's use. Sidetag creation is governed by hub's policy.
Sidetag creation involves creating one tag based on some existing buildtag (it
is the only parameter needed for sidetag creation). It automatically creates
inheritance chain from it. Second part is creating target which has same name,
source and destination. So, any build created for this target will appear in
the tag itself. Developers can reuse new builds as part of the sidetag
buildroot and build whole dependency chain if they need.
Hub
---
@ -173,6 +180,31 @@ like:
f30-build-side-123456
Successfully waited 1:36 for a new f30-build-side-123456 repo
$ koji taginfo fedora-30-build-side-123456
Tag: fedora-30-build-side-123456 [123456]
Arches: x86_64
Groups: appliance-build, build, kiwi-build, livecd-build, livemedia-build, srpm-build
Maven support?: no
Include all Maven archives?: no
Tag options:
mock.use_bootstrap : 1 [fedora-30-build]
sidetag : True
sidetag_user : 'username'
sidetag_user_id : 1
Targets that build into this tag:
fedora-30-build-side-123456 (fedora-30-build-side-123456, no active repo)
This tag is a buildroot for one or more targets
Current repo: no active repo
Targets that build from this tag:
fedora-30-build-side-123456
Inheritance:
0 .... fedora-30-build [84]
$ koji list-targets --name=fedora-30-build-side-123456
Name Buildroot Destination
---------------------------------------------------------------------------------------------
fedora-30-build-side-123456 fedora-30-build-side-123456 fedora-30-build-side-123456
$ koji remove-sidetag f30-build-side-123456
API