36 Commits

Author SHA1 Message Date
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
Jimmy Berry
f6b9a9dd87 osclib/origin: provide origin_revision_state(). 2019-05-01 15:49:21 -05:00
Jimmy Berry
68a4933235 osclib/origin: policy_input_calculate(): s/inital/initial/. 2019-03-22 10:46:30 -05:00
Jimmy Berry
b6866e6456 osclib/origin: policy_input_evaluate(): only add additional review if not already set.
This allows for more cleanly adding additional_reviews to include fallback
review where it may already be added for a more specific reason.
2019-03-20 19:01:32 -05:00
Jimmy Berry
14b29bb221 osclib/origin: policy_input_evaluate(): do not list disallowed reviews.
In order to reduce comments, information that changes such as reviews
must be excluded to avoid having to update a comment or be left in an
inaccurate state.
2019-03-12 08:45:55 -05:00
Jimmy Berry
d033b8cec6 osclib/origin: provide __str__ method that indicates pending. 2019-03-06 15:49:50 -06:00
Jimmy Berry
341396b432 osclib/origin: config_resolve_create_family(): force origin_expanded to string.
Drops the lxml string element reference which is cumbersome when printing.
2019-03-06 15:49:50 -06:00
Jimmy Berry
a8319e6664 origin-manager: support ReviewBot override comment using origin workaround. 2019-02-27 16:03:05 -06:00
Jimmy Berry
eb3acd80f6 osclib/origin: provide origin management functions. 2019-02-15 14:16:23 -06:00