1200 Commits

Author SHA1 Message Date
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
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
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
88d83de9b1 osclib/stagingapi: rebuild_check(): utilize -4096 offset for build log.
Avoids streaming huge log files when only the end is needed.
2019-09-24 08:40:16 -05:00
Jimmy Berry
c8663d83af osclib/stagingapi: buildlog_get(): support negative offset.
Derive real offset from log size determined via additional API call.
2019-09-24 08:39:27 -05:00
Jimmy Berry
5c96529c65 osclib/cache: utilize rmtree_nfs_safe(). 2019-09-18 21:37:51 -05:00
Jimmy Berry
81f8807cda osclib/util: provide rmtree_nfs_safe().
Still occurs and when in obs_operator context is even more annoying.
2019-09-18 21:10:49 -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
d0e2b71ed1
Merge pull request #2223 from jberry-suse/origin_listener-patchinfo-skip
osclib/origin_listener: skip patchinfo packages.
2019-09-18 17:19:59 -05:00
Jimmy Berry
6e9b33c5e6 osclib/origin_listener: skip patchinfo packages.
Not only are patchinfo packages never useful for origin updates, but they
cause an exception since the package is set to an empty string.
2019-09-18 16:48:36 -05:00
Jimmy Berry
3175c0d7f6 osclib/origin_listener: indicate when checking for update to package. 2019-09-18 16:26:29 -05:00
Jimmy Berry
c3a689ca01 osclib/origin_listener: utilize apiurl as thread name for remote listener. 2019-09-18 11:40:37 -05:00
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