58 Commits

Author SHA1 Message Date
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
Jimmy Berry
2a32702b1f
Merge pull request #2310 from jberry-suse/origin-manager-unknown-spelling
osclib/origin: policy_input_calculate(): s/unkown/unknown/.
2019-11-08 16:08:31 -06:00
Jimmy Berry
03a954aebd
Merge pull request #2307 from jberry-suse/origin-manager-automatic-updates-initial-blacklist
osclib/origin: origin_update(): support blacklist patterns for initial updates.
2019-11-08 15:43:46 -06:00
Jimmy Berry
a83e40e057
Merge pull request #2305 from jberry-suse/origin-manager-history-non-annotated
osclib/origin: origin_history(): include non-annotated requests.
2019-11-08 15:19:37 -06:00
Jimmy Berry
7e6455f9ce osclib/origin: policy_input_calculate(): s/unkown/unknown/. 2019-11-08 15:00:15 -06:00
Jimmy Berry
a0488c3fbb
Merge pull request #2303 from jberry-suse/origin-manager-annotate-pending
osclib/origin: origin_annotation_dump(): include pending information.
2019-11-08 14:50:59 -06:00
Jimmy Berry
5f937588e6 osclib/origin: origin_update(): support blacklist patterns for initial updates. 2019-11-08 13:19:04 -06:00
Jimmy Berry
5b4a8d3be5 osclib/origin: origin_history(): include non-annotated requests.
Otherwise, requests that are declined quickly (likely by bot) are not
shown in history which can be confusing when viewing in web interface. A
package may show as being one revision behind and one would wonder why
not update request when in fact a request could have been made and
declined.
2019-11-07 14:13:38 -06:00
Jimmy Berry
62c060a441 osclib/origin: origin_annotation_dump(): include pending information. 2019-11-07 13:46:16 -06:00
Jimmy Berry
dc9147be97 osclib/origin: add maintenance staging equivalent reviews to pending_submission_allowed_reviews. 2019-11-07 10:59:21 -06:00
Jimmy Berry
6826524d07 osclib/origin: drop repo-checker from pending_submission_allowed_reviews.
No longer utilized and the config option has been removed from project
configs so the rule is dropped when evaluated anyway.
2019-11-07 10:59:21 -06:00
Jimmy Berry
e2334dae3d osclib/origin: provide pending_submission_allowed_reviews_update option. 2019-11-07 10:59:21 -06:00
Jimmy Berry
538b39ae3c osclib/origin: reviews_filter_allowed(): support negation rules. 2019-11-07 10:59:21 -06:00
Jimmy Berry
13be4f2ef1 osclib/origin: provide reviews_filter_allowed().
Split out inner logic from policy_input_evaluate_reviews_not_allowed() to
allow for other users.
2019-11-07 10:59:21 -06:00
Jimmy Berry
4bbdfc675e osclib/origin: project_source_pending(): include psuedo incident review. 2019-11-07 10:59:21 -06:00
Jimmy Berry
e771dc653f osclib/origin: provide automatic update mode controls. 2019-11-07 08:46:02 -06:00
Jimmy Berry
8cdd505bea osclib/origin: origin_update_pending() utilize project_remote_prefixed().
Correctly prefix the remote project with the interconnect when creating
a submit request.
2019-11-05 16:39:01 -06:00
Jimmy Berry
6595dd812b osclib/origin: provide origin_updatable_initial().
Provides list of origins for a given project that allow initial updates.
2019-11-05 08:23:40 -06:00
Jimmy Berry
7c162b3c7f osclib/origin: origin_update(): support initial submissions. 2019-11-05 08:23:40 -06:00
Jimmy Berry
8bed8d507e osclib/origin: provide automatic_updates_initial origin config option.
Used to allow new package submissions from an origin.
2019-11-05 08:23:40 -06:00
Jimmy Berry
ea7a454d7e osclib/origin: origin_updatable_map(): provide include_self option. 2019-11-04 14:01:34 -06:00
Jimmy Berry
3b51a7e044 osclib/origin: origin_update() generate change_devel requests.
As a follow-up to new packages accepted from a specific devel generate
a change_devel request automatically. Such requests should be approved
automatically since they are a workaround to not being able to set devel
during source submission.
2019-11-04 14:01:34 -06:00
Jimmy Berry
aa49b57c8e osclib/origin: policy_input_calculate(): handle change from None origin. 2019-11-04 14:01:34 -06:00
Jimmy Berry
790a46cbfc osclib/origin: allow for identical source if origin changed.
Enables change_devel reviews were the source does not change, but the
effective origin will change changed by the request.
2019-11-04 14:01:34 -06:00
Jimmy Berry
c62fb125ef osclib/origin: provide and utilize origin_devel_projects().
Incorporate meta devel, request devel, and whitelist devel into one
function.
2019-11-04 14:01:34 -06:00
Jimmy Berry
683ead7ad6 osclib/origin: provide origin_devel_project() and utlize.
Handles incorporating simulated devel, pseudo devel from requests, and
meta devel project into one function.
2019-11-04 14:01:34 -06:00
Jimmy Berry
d9cc2131ad osclib/origin: provide origin_devel_project_requests().
Determines psuedo devel projects based on pending requests.
2019-11-04 14:01:34 -06:00
Jimmy Berry
83530ce0f6 osclib/origin: provide devel_project_simulate enterable. 2019-11-04 14:01:34 -06:00
Jimmy Berry
a724dcfa9d osclib/origin: require origin key in origin_annotation_load().
Alternatively, this can validate something like "ok: not handled".
2019-11-04 14:01:34 -06:00
Jimmy Berry
2ecb8ce3d7 osclib/origin: provide origin_workaround_strip(). 2019-11-04 14:01:34 -06:00
Jimmy Berry
0b34e1629b osclib/origin: origin_annotation_load(): only return dict annotation.
To improve robustness and handle invalid/corrupt data in the annotation
just return None if it is anything other than a dict after parsing. The
most likely occurrence is someone accepts the origin-manager review with
a plain-text message.
2019-09-25 15:41:02 -05:00
Jimmy Berry
bc0ec5c6c9 osclib/origin: origin_annotation_load(): only consider accepted reviews.
This excludes reviews that were added and never reviewed possibly because
the request was rejected before the review could be accepted. In such
cases the comment specified when adding the review will be loaded as the
annotation which is not desirable.
2019-09-25 15:40:43 -05:00
Jimmy Berry
3842548b45 osclib/origin: provide origin_updatable_map(). 2019-09-11 19:53:01 -05:00
Jimmy Berry
929f8faff7 osclib/origin: provide origin_updatable(). 2019-09-11 19:52:53 -05:00
Jimmy Berry
642809099b
Merge pull request #2175 from jberry-suse/origin-manager-web-history-diff
web/origin-manager: allow a request to be diffed against a potential origin (and related fixes).
2019-08-29 08:02:26 -05:00
Jimmy Berry
edfef91b3d osclib/origin: origin_history(): expose source_(project,package,revision).
This is the best location to expose the information as the action context
is already available. Alternatively, a lookup function accepting a request
target_project and target_package could perform the equivalent of the
client-side filter operation that is part of the initial search. This also
alleviates additional queries that would be needed later.
2019-08-28 17:07:23 -05:00
Jimmy Berry
54c28b6908 osclib/origin: origin_annotation_dump(): allow origin_info_new to be None.
A None origin annotation can be generated when unknown_origin_wait is True
and an override comment is detected.
2019-08-26 15:09:25 -05:00
Jimmy Berry
5230864d72 osclib/origin: provide origin_update() to process updating single package. 2019-08-07 17:59:04 -05:00
Jimmy Berry
390c2afefa osclib/origin: always include project link when fetching source history.
This was debated as for SLE this would add some repetition when not
going to match a SLE origin anyway, but it is necessary to stabilize
maintenance origins.

When an :Update project is first created all sources are inherited which
means all the revisions from the top project's source container are
considered. Once an update is provided via a maintenance incident the
inherited sources are no longer presented and instead the only revision
seen is the maintenance update and future updates.

When a new version of Leap is created and all source containers are copied
from the previous version the origin will first be considered :Update of
the previous Leap version, but once a maintenance update is created it
will drop the the non-:Update prior version since the matching revision is
missing. If the update is submitted the origin will flip back to :Update.

In order to avoid this mess always utilize include_project_link=True
which will effective consider the maintenance update as the newest
revision while continuing to consider the inherited revisions.

For SLE, were all projects are stacked this means there will almost always
be 10 revisions to review after the first could releases.

Realistically this is yet another failing of the OBS source control model since
the original source revision available (via inheritance) in the :Update project is
lost after the first update.
2019-08-05 15:46:11 -05:00
Jimmy Berry
f0291f63e8 osclib/origin: correct import order. 2019-07-16 10:28:41 -05:00
Jimmy Berry
9975f51670 osclib/origin: support pending source lookup against maintenance origin.
Works for both maintenance incident (both states) and release.
2019-07-16 10:28:41 -05:00
Jimmy Berry
e67ee85b5a osclib/origin: handle nested annotation loading and support maintenance incidents. 2019-07-16 10:28:27 -05:00
Jimmy Berry
fa41d3ae21 osclib/origin: origin_annotation_dump() provide raw option. 2019-07-11 16:12:46 -05:00
Jimmy Berry
ceb4a9cea9 osclib/origin: cast filter() to list() to improve debug output [python3]. 2019-05-15 21:01:51 -05:00
Jimmy Berry
743b3a6cd6 osc-origin, osclib/origin: port first dict key/value access [python3]. 2019-05-15 21:01:00 -05:00
Jimmy Berry
e20725a482 osclib/origin: handle origin_info when None. 2019-05-02 14:44:14 -05:00
Jimmy Berry
cbd3e446e6 osclib/origin: origin_revision_state(): do not find origin when None.
Previously, there was no way to distinguish between a None origin and no
origin_info passed in. Using False as default allows the two cases to be
distinguished.
2019-05-02 14:43:37 -05:00
Jimmy Berry
4be2b335d8 osclib/origin: add origin_history(). 2019-05-01 15:49:21 -05:00
Jimmy Berry
4bae7078b8 osclib/origin: add origin_potentials(). 2019-05-01 15:49:21 -05:00