1381 Commits

Author SHA1 Message Date
Jimmy Berry
ac6e61a15e osclib/origin_listener: start additional listeners for remote origins.
For example, SLE-15-SP2 has openSUSE.org:openSUSE:Factory as an origin.
The events for that project are not included on the IBS message bus and
thus package updates to that project will be missed. When origins contain
a remote prefix another listener needs to be started pointing at the
remote OBS instance message bus. The resulting messages need to be
prefixed before being considered by the primary listener.
2019-09-12 09:52:28 -05:00
Jimmy Berry
791d449777 osclib/origin_listener: change skipping log message to mention origin. 2019-09-12 09:49:48 -05:00
Jimmy Berry
60f996efed osclib/origin_listener: provide origin_updatable_map(). 2019-09-12 09:48:52 -05:00
Jimmy Berry
7188c791d4 osc-origin: update: provide --listen option.
Listens for source changes (both request creation and package updates) to
issue updates based on origin configuration.
2019-09-11 19:53:01 -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
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