Yu Ming Zhu
47c4b5d70b
kojid: extend SCM.assert_allowed with hub policy
...
This is a simple extention of `SCM.assert_allowed`
- `assert_allowed_by_policy` will set the default "use_common" to False which is different to the old behavior
- `channel`, `user_id`, `scratch` are passed in the `policy_data` with scminfo right now.
This is a prototype for this change, and there are some other solutions could be implemented too
- Use a scmpolicy plugin as `postSCMCheckout` callback, the pro is that we can do more checks after the source is initialized on builder, meanwhile, the con is that the source will be downloaded even it is denied by policy. It might be a potential risk?
- Do the scm check in hub's `make_task`, this looks straightforward, but may lack some builder's information
fixes : #2757
2021-08-16 17:55:26 +00:00
Tomas Kopecek
ec70d21c41
fix flake8
2021-08-16 13:52:20 +02:00
Tomas Kopecek
3d7bea6f68
PR#2952: cli: "download-logs --help" fixes
...
Merges #2952
https://pagure.io/koji/pull-request/2952
2021-08-16 13:51:07 +02:00
Ken Dreyer
241f4874e8
cli: improve help text for download-logs --match
...
Update the --help text to clarify that --match will match log filenames,
not log contents, and the matching algorithm is fnmatch.
2021-08-16 13:51:01 +02:00
Ken Dreyer
0837acdf67
cli: improve help text for download-logs --nvr
...
Explain that the --nvr option is an alternative to simply specifying a
task ID. In particular, this will not download the *build's* logs, just
the task logs for that build.
2021-08-16 13:51:01 +02:00
Ken Dreyer
4878f50fa7
cli: clarify that download-logs operates on tasks
2021-08-16 13:51:01 +02:00
Ken Dreyer
d79b11eabc
cli: remove duplicate download-logs --help text
...
The get_usage_str() helper already adds this global --help message, so
we do not need to add it.
2021-08-16 13:51:01 +02:00
Tomas Kopecek
9f8b74cdd3
PR#2985: cli: improve --config and --profile help text
...
Merges #2985
https://pagure.io/koji/pull-request/2985
Fixes : #2959
https://pagure.io/koji/issue/2959
`koji -c $config_path build` seems to have no effect
2021-08-16 13:41:14 +02:00
Ken Dreyer
c6ad839942
cli: improve --config and --profile help text
...
Move "--profile" to the top of the argument list so it's easier to see
in --help. Most users should use --profile instead of --config.
Explain what the default --profile value is (it's progname).
Reword the "--config" help text to explain that this overrides a
profile's settings using a separate configuration file.
2021-08-16 13:41:07 +02:00
Tomas Kopecek
f361554067
PR#2986: doc: add signing documentation
...
Merges #2986
https://pagure.io/koji/pull-request/2986
2021-08-16 13:39:07 +02:00
Ken Dreyer
a1a42fbda9
doc: add signing documentation
...
Explain RPM signatures, how Koji handles signatures, and how to generate
repos with signed RPMs.
2021-08-16 13:39:01 +02:00
Tomas Kopecek
258831d7e6
Revert "PR#2978: Don't take new tasks if we've 0.0 capacity available"
...
This reverts commit 5e9ca9366a , reversing
changes made to 59879c6e2c .
2021-08-16 13:34:54 +02:00
Tomas Kopecek
1bc951dfdd
PR#2987: fix flake8
...
Merges #2987
https://pagure.io/koji/pull-request/2987
2021-08-16 13:24:23 +02:00
Yu Ming Zhu
edd2dbadc5
fix flake8
2021-08-13 18:46:03 +00:00
Tomas Kopecek
e7b6e78fe1
PR#2923: get info for deleted tag entries via api
...
Merges #2923
https://pagure.io/koji/pull-request/2923
Fixes : #1506
https://pagure.io/koji/issue/1506
RFE: get info for deleted tag entries via api
2021-08-12 10:59:38 +02:00
Tomas Kopecek
cdaa178a01
updates
2021-08-12 10:59:28 +02:00
Tomas Kopecek
61ea78cff9
get_tag and accepts "auto" event
...
If "auto" is passed as an event value, latest record will be returned
without checking "active" status.
"revoke_event" will be then added to returned taginfo. If it is None,
then it is active record, otherwise it will contain event id.
Fixes: https://pagure.io/koji/issue/1506
2021-08-12 10:59:28 +02:00
Tomas Kopecek
f4f42da94c
PR#2984: fix test_delay_times
...
Merges #2984
https://pagure.io/koji/pull-request/2984
2021-08-12 10:10:06 +02:00
Yu Ming Zhu
56dfae8b4e
fix test_delay_times
...
relates: #2978
2021-08-12 03:35:06 +08:00
Tomas Kopecek
5e9ca9366a
PR#2978: Don't take new tasks if we've 0.0 capacity available
...
Merges #2978
https://pagure.io/koji/pull-request/2978
2021-08-11 12:43:18 +02:00
Tomas Kopecek
a537521ecd
Don't take new tasks if we've 0.0 capacity available
...
If I've just started buildArch task with weight 1.5 on builder with 1.5
capacity, it can pick another one, as it is not over the builder's
capacity. This is wrong as there is no real capacity behind.
2021-08-11 12:43:12 +02:00
Tomas Kopecek
59879c6e2c
PR#2977: py3 kojikamid fixes
...
Merges #2977
https://pagure.io/koji/pull-request/2977
Related: #2976
https://pagure.io/koji/issue/2976
2021-08-11 12:42:04 +02:00
Tomas Kopecek
06528a5650
use decode for py3 bytes/strings
...
Fixes: https://pagure.io/koji/issue/2976
2021-08-11 12:41:58 +02:00
Tomas Kopecek
0cfb2c0280
py3 Popen text mode fix
2021-08-11 12:41:58 +02:00
Tomas Kopecek
1427b3e850
PR#2967: Prune user repos for image tasks
...
Merges #2967
https://pagure.io/koji/pull-request/2967
Fixes : #2966
https://pagure.io/koji/issue/2966
Prune duplicated repos in image task
2021-08-10 14:19:20 +02:00
Tomas Kopecek
b26c67ef89
Prune user repos for image tasks
...
Fixes: https://pagure.io/koji/issue/2966
2021-08-10 14:19:14 +02:00
Tomas Kopecek
38d10b541c
PR#2974: use getNextRelease for scratch image builds
...
Merges #2974
https://pagure.io/koji/pull-request/2974
Fixes : #2911
https://pagure.io/koji/issue/2911
Image scratch builds not generating release
2021-08-10 14:04:17 +02:00
Tomas Kopecek
540e5057b9
use getNextRelease for scratch image builds
...
Related: https://pagure.io/koji/issue/2911
2021-08-10 14:04:10 +02:00
Tomas Kopecek
e13e56a1b2
PR#2982: setuptools BuildRequire for py3
...
Merges #2982
https://pagure.io/koji/pull-request/2982
Fixes : #2919
https://pagure.io/koji/issue/2919
Build failing in fedora rawhide
2021-08-10 13:58:03 +02:00
Tomas Kopecek
42626e10a0
setuptools BuildRequire for py3
...
setuptools are dropped as a require from python-wheel, we need
to require it explicitely
Related: https://pagure.io/koji/issue/2919
2021-08-10 13:29:56 +02:00
Tomas Kopecek
5e64c48758
PR#2980: Add koji.egg-info/ to .gitignore
...
Merges #2980
https://pagure.io/koji/pull-request/2980
2021-08-10 09:57:17 +02:00
Otto Urpelainen
85595b41f6
Add koji.egg-info/ to .gitignore
...
That folder is automatically generated when tox is run.
2021-08-10 07:12:23 +03:00
Tomas Kopecek
abefeccbc3
PR#2968: fix python version parsing for py 3.10
...
Merges #2968
https://pagure.io/koji/pull-request/2968
Fixes: https://pagure.io/koji/issue/2975
2021-08-06 10:53:36 +02:00
Tomas Kopecek
5f65cf63b7
fix python version parsing for py 3.10
...
Fixes: https://pagure.io/koji/issue/2975
2021-08-06 10:51:09 +02:00
Tomas Kopecek
dfce69f6bf
PR#2958: DBConnectionString/dsn option for db connection
...
Merges #2958
https://pagure.io/koji/pull-request/2958
Fixes : #2838
https://pagure.io/koji/issue/2838
Option for using SSL is missing, when the pgsql server is an network one.
2021-08-06 09:57:05 +02:00
Tomas Kopecek
2618c50c3d
PR#2970: kojira: Do not ever clean up repositories where 'latest' points to
...
Merges #2970
https://pagure.io/koji/pull-request/2970
Fixes : #2832
https://pagure.io/koji/issue/2832
Kojira is too aggressive with cleaning up dist-repos
2021-08-06 09:50:58 +02:00
Tomas Kopecek
79b7eb36f2
add debug message
2021-08-06 09:50:51 +02:00
Tomas Kopecek
c7f2a77e71
PR#2955: protonmsg: cast body to text
...
Merges #2955
https://pagure.io/koji/pull-request/2955
Fixes : #2954
https://pagure.io/koji/issue/2954
protonmsg: message body is not decoded back to String from DB
2021-08-06 09:48:54 +02:00
Yu Ming Zhu
243e114b1f
protonmsg: cast body to text
2021-08-06 09:48:47 +02:00
Tomas Kopecek
012a2eb83b
PR#2971: hub: document readTaggedRPMS method
...
Merges #2971
https://pagure.io/koji/pull-request/2971
2021-08-04 09:46:41 +02:00
Ken Dreyer
fb18dcf2f6
hub: document readTaggedRPMS method
...
Update the readTaggedRPMS RPC docstring to describe all parameters and
the return value.
2021-08-03 15:27:10 -04:00
Tomas Kopecek
6ec2a17736
PR#2950: kojira: Do not ever clean up repositories where 'latest' points to
...
Merges #2950
https://pagure.io/koji/pull-request/2950
Fixes : #2832
https://pagure.io/koji/issue/2832
Kojira is too aggressive with cleaning up dist-repos
2021-08-03 14:56:54 +02:00
Igor Raits
c972415dec
kojira: Do not ever clean up repositories where 'latest' points to
...
We don't want to leave symlink broken… Ideally we would find out stuff
where we should even remove "latest" but it is not straightforward and I
believe this simple check is good enough for the time being.
Fixes: https://pagure.io/koji/issue/2832
Signed-off-by: Igor Raits <igor.raits@gmail.com>
2021-08-03 14:56:52 +02:00
Tomas Kopecek
f0cad50a48
PR#2965: Add remove-sig CLI and deleteRPMSig hub call
...
Merges #2965
https://pagure.io/koji/pull-request/2965
Fixes : #2665
https://pagure.io/koji/issue/2665
API for deleting signature
2021-08-02 09:49:52 +02:00
Mike McLean
6af614b71b
avoid masking hub errors, avoid duplicate check
2021-07-29 08:22:10 -04:00
Mike McLean
d227f0f626
fix unit tests, use error()
2021-07-28 15:22:37 -04:00
Mike McLean
0d815f8969
exit code, --all handling, typo
2021-07-28 13:12:17 -04:00
Tomas Kopecek
1bb6e7456f
recreating absolute path bug
2021-07-21 13:48:15 +02:00
Jana Cupova
fb8cfc5678
Add delete-rpm-sig CLI and deleteRPMSig hub call
...
Fixes: https://pagure.io/koji/issue/2665
2021-07-21 13:43:09 +02:00
Tomas Kopecek
8d1a94c8d4
PR#2961: flake8/rpmlint fixes
...
Merges #2961
https://pagure.io/koji/pull-request/2961
2021-07-21 09:53:55 +02:00