1275 Commits

Author SHA1 Message Date
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
Jimmy Berry
52c857e5d8 osclib/core: project_attribute_list(): drop value parameter.
The value is not actually exposed by OBS xpath engine and the xpath would
be invalid if it was.
2019-09-11 18:55:36 -05:00
Jimmy Berry
f9e4d424d3 osclib/core: provide devel_projects(). 2019-09-11 18:55:36 -05:00
Jimmy Berry
b68a46d352 Move PubSubConsumer to osclib.PubSubConsumer to allow for proper import. 2019-09-11 18:55:22 -05:00
Jimmy Berry
031934d07c
Merge pull request #2204 from lnussel/master
osclib/git: describe(): drop python requirement to pre-3.7.
2019-09-09 17:27:49 -05:00
Jimmy Berry
ff5efd108d osclib/request_splitter: utilize osclib.util.sha1_short() for encoding.
Without this, python 3 execution will fail with:
  TypeError: Unicode-objects must be encoded before hashing

The requests strategy is the only strategy to utilize kwargs besides
custom so this code is not executed often which is why this has not been
encountered. In fact it was executed mistakenly and reported.
2019-09-09 15:31:24 -05:00
Jimmy Berry
783a067423
Merge pull request #2201 from jberry-suse/osclib-comments-command-find-allow-seperators
osclib/comments: command_find(): allow seperators after user.
2019-09-05 14:14:31 -05:00
Stephan Kulow
87de492db3
Merge pull request #2177 from coolo/problem-reporter
build-fail-notification: Mail to -factory after 4, dr after 6 weeks
2019-09-05 12:29:10 +02:00
Jimmy Berry
66c912475d osclib/comments: command_find(): allow seperators after user.
Users attempt both with and without seperators so might as well support.
2019-09-04 18:44:45 -05:00
Jimmy Berry
016bca069d osclib/core: request_action_key(): handle add_role/set_bugowner against project. 2019-09-04 16:13:03 -05:00
Jimmy Berry
a6d0974e27 osclib/core: request_action_key(): include set_bugowner in top level condition. 2019-09-04 16:12:46 -05:00
Ludwig Nussel
e06f41a40f Fix for python 3.6 2019-09-04 10:42:32 +02:00
Jimmy Berry
d3f6c62ea0 osclib/request_splitter: replace map() calls with loop and call.
Python 3 makes map() a lazy call and since the result is not needed it
makes sense to just switch to explicit loop. Without this the "loop" (via
map) is never executed. As such, --try-strategies effective does nothing
and instead the staging-bot always falls back to none strategy.
2019-09-03 15:17:32 -05:00
Stephan Kulow
58089794f9 Deduplicate the 2 mail sending functions
I went with introducing mail_send_with_details and make mail_send
a wrapper around it
2019-09-02 16:52:09 +02:00
Jimmy Berry
d10a359c0c osclib/sentry: tag osc version. 2019-08-29 14:10:29 -05:00
Jimmy Berry
eb0a6c4659 osclib/sentry: provide dummy client. 2019-08-29 14:10:29 -05:00
Jimmy Berry
cbfbb88048 osclib/sentry: sentry_client(): handle 0.11.x API change. 2019-08-29 14:10:29 -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
14971e2db0
Merge pull request #2174 from jberry-suse/sentry-improvements
sentry improvements and check_source logger error demotion
2019-08-28 15:34:02 -05:00
Jimmy Berry
37386e0c74 osclib/common: provide version_calcuate() and utilize by default. 2019-08-27 14:27:11 -05:00
Jimmy Berry
6e8e461e1c osclib/git: provide describe(). 2019-08-27 14:27:08 -05:00
Jimmy Berry
2189443994 osclib/git: remove unnecessary CacheManager import. 2019-08-27 14:13:10 -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
74b9714a25
Merge pull request #2159 from jberry-suse/sentry-initial
Initial sentry integration and configuration for obs_operator, osc-{origin,staging}, and ReviewBot.
2019-08-16 16:27:04 -05:00
Jimmy Berry
776747c9b5 osclib/sentry: expose environment configuration. 2019-08-16 16:02:01 -05:00
Jimmy Berry
6003bff62a osclib/sentry: provide initial sentry_sdk handling.
Allows for DSN to be configured via oscrc general.sentry_sdk.dsn.
2019-08-16 15:12:19 -05:00
Jimmy Berry
d5188b326f osclib/request_splitter: quick strategy: s/leaper/origin-manager/. 2019-08-13 16:55:42 -05:00
Jimmy Berry
d3593cfed9 osclib/request_splitter: quick strategy: remove repo-checker from whitelist. 2019-08-13 16:55:42 -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
7478a42882 osclib/core: provide request_create_delete(). 2019-08-07 17:58:57 -05:00
Jimmy Berry
f441d8e41d osclib/core: provide request_create_submit() and RequestFuture. 2019-08-07 17:26:38 -05:00
Jimmy Berry
844a9d28a5 osclib/core: provide message_suffix() and utilize in source_file_save(). 2019-08-07 17:26:38 -05:00
Jimmy Berry
914d106184
Merge pull request #2143 from jberry-suse/origin-manager-always-include-project-link
osclib/origin: always include project link when fetching source history.
2019-08-06 07:39:54 -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
Stephan Kulow
705457a1a7 Fix leap 15.2: no problems in a repo wasn't tested :) 2019-07-29 18:51:49 +02:00
Stephan Kulow
350027d8f3 Filter out release numbers from problem output
Otherwise the output will differ on rebuilds, making the whole stunt
useless
2019-07-29 17:18:33 +02:00
Stephan Kulow
a44c65545b Replace rebuildpacs.pl with project-installcheck functionality 2019-07-29 10:05:51 +02: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
b34a93e590 osclib/core: provide a series of request list generators.
Given the broken design of multi-action requests which continually wreaks
havoc on code attempting to handle them properly a series of methods for
searching for requests are provided to simplify the process. The core
principal is that both a request and action are returned since the
specific action that matched the search query is important.

Further poorly designed maintenance data structure is also abstracted to
provide a consistent interface for querying source changes regardless of
their state in the workflow.
2019-07-16 10:27:41 -05:00
Jimmy Berry
fa41d3ae21 osclib/origin: origin_annotation_dump() provide raw option. 2019-07-11 16:12:46 -05:00
Jimmy Berry
0f1b9d667e osclib/core: provide request_action_key().
Intended to facilitate standardized keys for action specific information
placed in review scoped storage (ie. reviews/comments).
2019-07-11 16:06:06 -05:00
Jimmy Berry
aa444f79e6 osclib/core: enhance attribute_value_load() to handle boolean attributes. 2019-07-11 16:02:14 -05:00
Jimmy Berry
a8ff27b81f osclib/core: provide action_is_patchinfo() from ReviewBot.
Allows for usage outside of ReviewBot children.
2019-07-11 16:01:42 -05:00
Jimmy Berry
e991b44633 osclib/core: provide simplified search() and utilize. 2019-07-11 15:58:35 -05:00