143 Commits

Author SHA1 Message Date
Stephan Kulow
5c377d64d3 osclib: Add an helpful error on failed attribute save
It's stil throwing the exception but with some luck the user sees the
error and acts.
2022-03-04 09:48:06 +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
0561e06cb1 Target E261 - two spaces before inline comment 2022-02-18 16:39:16 +01:00
Stephan Kulow
d6628beadf Target E125 - Continuation line with same indent
https://www.flake8rules.com/rules/E125.html
2022-02-18 15:52:53 +01:00
Stephan Kulow
66a0f152ff Target E129 - Visually indented line with same indent
https://www.flake8rules.com/rules/E129.html
2022-02-18 15:52:47 +01:00
Stephan Kulow
e52dc6ce2b Harmonize imports on using lxml for XML parsing 2022-02-18 11:16:01 +01:00
387b73d1d0 pkglistgen: Handle loops in project path expansion
For some setups that have recursive paths we run into an endless
loop. Adding a visited project tracking to break the loop of expansion.
2021-12-15 21:35:09 +01:00
Stephan Kulow
a8f7146baf Remove E713 offense from flaker 2021-09-21 14:20:08 +02:00
Imobach González Sosa
632cbf92bc
Updates from code review 2021-07-13 16:30:53 +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
Ancor Gonzalez Sosa
4b1b262628
Small code reorganization in core.py 2021-07-08 14:38:05 +01:00
Fabian Vogt
c5f65e117c Fix osc.core.repository_path_expand
The algorithm was wrong, it didn't add non-recursively entered paths to the
list. The correct algorithm even allows for a simpler implementation.
2020-06-05 14:53:36 +02:00
ec88760187 Fix Flake E241
One more step towards white space sanity. Next group is E20x.
2019-12-10 08:46:02 +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
Jimmy Berry
c6e093d8d0 osclib/core: request_action_list_maintenance_incident(): support another form.
When at last one thought all the variations of the data format were
handled OBS decided to provide another. :((((
2019-11-07 10:59:21 -06:00
Jimmy Berry
c8cba5d2a1 osclib/core: reviews_remaining(): provide incident_psuedo option. 2019-11-07 10:59:21 -06:00
Jimmy Berry
9503a04b33
Merge pull request #2296 from jberry-suse/origin-manager-update-frequency
osclib/origin: provide automatic update mode controls.
2019-11-07 10:45:08 -06:00
Jimmy Berry
8cdd550247 osclib/core: request_create_submit(): provide frequency option. 2019-11-07 08:46:02 -06:00
Jimmy Berry
48fc39aba0 osclib/core: request_create_submit(): provide supersede flag. 2019-11-07 08:46:02 -06:00
Jimmy Berry
4ac724b712 osclib/core: request_action_simple_list(): include full history.
Without this the requests are not nearly as useful when processing.
2019-11-07 08:46:02 -06:00
Jimmy Berry
818685166f osclib/core: provide package_source_{changed,age}() functions. 2019-11-07 08:46:00 -06:00
Jimmy Berry
b0ccbb33b6 osclib/core: package_kind(): require releasename to differ from package for maintenance_update.
When releasename does not differ it is essentially the same as no
releasename at all, but since OBS allows this and some source packages
contain such a value need to make check more specific.

See #2294 for an example.
2019-11-06 14:43:20 -06:00
Jimmy Berry
13fa93cede osclib/core: provide attribute_value_delete(). 2019-11-06 11:38:38 -06:00
Jimmy Berry
226ad12f42 osclib/core: support package in attribute_value_{load,save}() functions. 2019-11-06 11:38:38 -06:00
Jimmy Berry
fd94254601 osclib/core: provide project_remote_prefixed(). 2019-11-05 16:39:01 -06:00
Jimmy Berry
826655766e osclib/core: request_create_submit(): provide ignore_if_any_request.
Useful for avoiding making a request if any pending or non-accepted
request against that package exists. Such a use case is submitting new
packages by origin-manager which should only try the submission once.
2019-11-05 08:23:33 -06:00
Jimmy Berry
251170b77d osclib/core: provide request_state_change() and utilize. 2019-11-04 14:01:34 -06:00
Jimmy Berry
e9eab675ab osclib/core: provide request_create_change_devel() RequestFuture. 2019-11-04 14:01:34 -06:00
Jimmy Berry
0f66879c1d osclib/core: provide package_role_expand() to expand package role to users. 2019-11-04 14:01:34 -06:00
Jimmy Berry
66da92ec80 osclib/core: provide project_role_expand() to expand project role to users. 2019-11-04 14:01:34 -06:00
Jimmy Berry
0ee408a716 osclib/core: provide meta_role_expand() to expand a role to users given meta. 2019-11-04 14:01:34 -06:00
Jimmy Berry
3a444c253e osclib/core: break apart request_age() to provide request_created(). 2019-11-04 14:01:34 -06: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
Jimmy Berry
1942065bd2
Merge pull request #2243 from jberry-suse/origin-manager-invalid-annoation
osclib/origin: origin_annotation_load(): improve robustness by tolerating invalid data.
2019-09-26 08:58:33 -05:00
Jimmy Berry
cc03a35617 osclib/core: review_find_last(): provide states filter. 2019-09-25 15:33:20 -05:00
Jimmy Berry
c93d2d2ffa osclib/core: rename request_action_single_list() to request_action_simple_list(). 2019-09-25 14:40:56 -05:00
Jimmy Berry
542268af34 osclib/core: switch request_action_single_list() users to request_action_list(). 2019-09-25 14:40:38 -05:00
Jimmy Berry
0bc8a52aca osclib/core: request_action_single_list(): handle miltiple actions. 2019-09-25 14:37:24 -05:00
Jimmy Berry
341bae564d osclib/core: request_action_single_list(): exclude sourced requests. 2019-09-25 14:37:18 -05:00
Jimmy Berry
f63da476c2 osclib/core: package_kind(): include underscore as meta prefix.
Previously used by _product which is still used in SLE-12.
2019-09-24 11:25:18 -05:00
Jimmy Berry
db9f03338b osclib/core: request_create_delete(): utilize pusedo osc.core function. 2019-09-18 18:04:43 -05:00
Jimmy Berry
2f99efe1b8 osclib/core: provide create_delete_request(). 2019-09-18 18:03:57 -05:00
Jimmy Berry
b41c44e7bb osclib/core: provide RequestFuture.print_and_create(). 2019-09-11 18:55:36 -05:00
Jimmy Berry
4329d42b75 osclib/core: provide RequestFuture.create_tolerant(). 2019-09-11 18:55:36 -05:00
Jimmy Berry
97d1f968de osclib/core: provide project_attributes_list(). 2019-09-11 18:55:36 -05:00
Jimmy Berry
7e9bb0bc29 osclib/core: project_attribute_list(): provide locked parameter. 2019-09-11 18:55:36 -05:00