119 Commits

Author SHA1 Message Date
Stephan Kulow
7ba81bcfdb
Merge pull request #2848 from nilxam/backports_checker
check_source: expand check_source be able to handle Leap/Backports submission
2022-09-01 14:53:04 +02:00
7a088e7784 check_source: expand check_source be able to handle Leap/Backports submission
New features
* If package does exist in SLE, decline the submission
Note: release manager can override it by commenting on reviewbot and reopen the request
* Decline the submission if package does not exist in devel-baseproject and the
  source project does not exist in check-source-valid-source-origins attribute
* check_source adding a review-team group review if source project does not exist in check-source-valid-source-origins attribute
* If submitter is not maintainer adding an additional devel project review

New added attributes
* check-source-ensure-source-exist-in-baseproject: bool
* check-source-devel-baseproject: str
* check-source-allow-source-in-sle: bool
* check-source-sle-project: str
* check-source-allow-valid-source-origin: bool
* check-source-valid-source-origins: strlist
* check-source-add-devel-project-review: bool
2022-08-30 19:46:02 +08:00
b40d8c0053 Fix E275: missing whitespace around keywords 2022-08-18 11:05:55 +02:00
Stephan Kulow
e4cb06a692 Do not decline requests with download_files errors
The URLs might suffer from flaky networks, so just block the request
from accepted for now (and extend the review comment to make it
discoverable why factory-auto didn't approve)

Fixes #2666
2022-03-25 12:11:35 +01:00
Stephan Kulow
55c4081ec0 check_source: Allow a .changes line to mention 2 patches 2022-03-25 11:26:53 +01:00
Stephan Kulow
ae658fefe2 Move download URL check to check_source.py
And with that, check_source.pl is gone
2022-03-25 09:19:24 +01:00
Stephan Kulow
ed87520710 Ignore patches that are listed as sources
The patch live cycle does not apply to them
2022-03-25 07:39:17 +01:00
Stephan Kulow
c8531891a1 Move the 'patch in changes' check from check_source.pl to .py 2022-03-24 21:20:07 +01:00
Stephan Kulow
6931c44099 Run source_validator scripts from check_source.py directly 2022-03-24 17:42:52 +01:00
Stephan Kulow
88749aa5b4 Move license check from check_source.pl to .py 2022-03-24 17:42:52 +01:00
Stephan Kulow
b558e2617c Move changes check from check_source.pl to .py 2022-03-24 17:42:52 +01:00
Stephan Kulow
d1ddbc5831 Move spec file checks from check_source.pl to .py 2022-03-24 17:42:52 +01:00
Stephan Kulow
e7c7a4097b Add test for remote services in factory-auto
Can't test it atm, need to have miniobs updated first
2022-03-24 10:31:34 +01:00
Stephan Kulow
296b78f9ec Move check for generated files from check_source.pl to .py 2022-03-24 08:48:06 +01:00
Stephan Kulow
23af9a0b72 Move rpmlintrc checking from check_source.pl to .py 2022-03-24 08:39:20 +01:00
Stephan Kulow
3a497700f0 Remove diff preparations from check_source.pl
It's dead since #1073 but weren't removed with the actual diffing
2022-03-24 08:32:08 +01:00
Stephan Kulow
1e2565ce50 Move service check from check_source.pl to .py 2022-03-24 08:25:32 +01:00
Stephan Kulow
f414161a1e Remove unused repo_checker config entries 2022-03-24 08:05:34 +01:00
Stephan Kulow
76308e96aa Remove rpmlint check from check_source
Reverts #2153 and
Fixes #2192
2022-03-23 16:12:09 +01:00
Stephan Kulow
f86579642b Target E501 - Line too long
https://www.flake8rules.com/rules/E501.html - but 79 characters is a
joke
2022-02-18 18:17:27 +01:00
Stephan Kulow
f38bd3a7ed Target E128 - Continuation line under-indented for visual indent
https://www.flake8rules.com/rules/E128.html
2022-02-18 17:35:33 +01:00
Stephan Kulow
27c364b0c9 Target E251 - Unexpected spaces around keyword
https://www.flake8rules.com/rules/E251.html
2022-02-18 17:28:13 +01:00
Stephan Kulow
d8f5d0874e Remove E201 - Whitespace after '('
https://www.flake8rules.com/rules/E201.html
2022-02-18 17:23:19 +01:00
Stephan Kulow
54079e949f Target E202 - Whitespace before ')'
https://www.flake8rules.com/rules/E202.html
2022-02-18 17:18:29 +01:00
Stephan Kulow
529d1dafae Target E302 - add two comment lines before class 2022-02-18 17:15:48 +01:00
Stephan Kulow
4e9c8eabbe Target E305 - Have two empty lines of a class 2022-02-18 17:11:46 +01:00
Stephan Kulow
ae734ba555 Fix indent of statements E127
https://www.flake8rules.com/rules/E127.html
2022-02-18 14:23:59 +01:00
Stephan Kulow
f705a24db1 Only have one statement in a line E701
https://www.flake8rules.com/rules/E701.html
2022-02-18 13:42:57 +01:00
Stephan Kulow
52dbb52b7f
Merge pull request #2703 from coolo/drop_etree
Harmonize imports on using lxml for XML parsing
2022-02-18 12:50:18 +01:00
Stephan Kulow
1152d4c419 Remove bare excepts - https://www.flake8rules.com/rules/E722.html
The bare except in osc-credentials lead me to remove it and the scripts
using it
2022-02-18 12:03:56 +01:00
Stephan Kulow
e52dc6ce2b Harmonize imports on using lxml for XML parsing 2022-02-18 11:16:01 +01:00
Josef Reidinger
c838245a37 Refactor code to split big method and improve doc 2021-07-29 12:17:27 +02:00
Josef Reidinger
0f7b45c95f Add note about explicit ignoring of inherited maintainership 2021-07-28 09:51:35 +02:00
Josef Reidinger
75226473fc Avoid creation of duplicate add_role requests (fixes #2609) 2021-07-28 09:51:28 +02:00
Imobach González Sosa
00ea25e609
Properly handle required-source-maintainer when it is group
Co-authored-by: Knut Alejandro Anderssen González <kanderssen@suse.com>
2021-07-14 10:52:09 +01:00
Ancor Gonzalez Sosa
1e868aa7ee
Check for maintainers in the source project
* It introduces a new configuration parameter 'required-source-maintainer'.
* If defined, it is expected to be a maintainer of the devel project.
* If that's not the case, the request is declined and an add_role
  request is created.

Co-authored-by: Ancor Gonzalez Sosa <ancor@suse.de>
Co-authored-by: Knut Alejandro Anderssen González <kanderssen@suse.com>
2021-07-13 11:41:13 +01:00
Stephan Kulow
f07ad86d86
Merge pull request #2443 from jsegitz/master
check_source.py: Add the reason why a review was added (e.g. which
2021-06-23 11:00:49 +02:00
Fabian Vogt
2a2a9118ba check_source.py: Decline if source_revision not set 2021-05-26 15:08:59 +02:00
Fabian Vogt
54decdef37 Make Dockerfile builds pass check_source.py 2021-03-10 15:18:02 +01:00
Johannes Segitz
516cfdf82d check_source.py: Add the reason why a review was added (e.g. which
whitelist warning was suppressed)
2020-05-25 16:34:20 +02:00
Stephan Kulow
2f8c02e9e0 Fix check_source for repository specific package names
If the package name as reported by OBS does not match the one
we're expecting, then loop through all repositories and check
if we find one there.

This is weakening the policy a little as this will open the
door for false negatives - e.g. that got the right package name
only for another repository. But as we do submission between
code streams all the time, I can't limit the package parsing
to repositories building against the target. So the opened
hole is to be closed by sanity check on review-team - as a
matter of fact the policy is not to catch people playing
macro games around Name, but for people that use completely
different names in source and target.

Fixes #2274
2020-03-20 14:40:01 +01:00
ea3b07568c Fix E203
This fixes incorrect whitespacing inside dictionaries.
2019-12-10 08:54:32 +01:00
Ludwig Nussel
6e918d63b6 check_source: query all repos if source info yields error 2019-11-28 13:15:13 +01:00
32ad0adc2d Fix all E22x errors
This cleans up white spaces around various kinds of operators to be
consistent.
2019-11-27 11:08:06 +01:00
Stephan Kulow
7c1a658f3d Fix check_source on public cloud images
The check for bcntsynctag can be very misleading - just because we align
the build counters between 2 packages doesn't make them invalid submission
targets. Better rely on the link check which is already implemented as
fallback

And set a verbose decline reason for this case
2019-10-22 09:26:55 +02:00
Ludwig Nussel
f5fad72747 check_source: avoid crash if filename is not set 2019-09-27 14:34:18 +02:00
e8f00f8ad1 check_source: when kind is None then it can be a new package
if package_kind() returned None then the submission can be a new package
submission, check_source should continue the process instead of
decline the request.
2019-09-25 19:36:52 +08:00
Ludwig Nussel
9af682c9b3
Merge pull request #2231 from lnussel/check_source
check_source: don't enforce name for kiwi images
2019-09-25 11:17:50 +02:00
Jimmy Berry
afd288b87d check_source: decline package of kind not (meta or source). 2019-09-24 11:26:52 -05:00
Jimmy Berry
91aeaf1f55 check_source: replace meta check with package_kind() == meta. 2019-09-24 11:25:47 -05:00