174 Commits

Author SHA1 Message Date
Jimmy Berry
d0e0f2aa3a ReviewBot: handle any exception raised by check_one_request().
Prevents a single failure from stopping all reviews.
2019-03-29 14:31:44 -05:00
Jimmy Berry
e930ea37c3 ReviewBot: request_override_check(): default to accept. 2019-02-26 09:33:35 -06:00
Jimmy Berry
d32b0c65bb ReviewBot: request_override_check(): provide force option. 2019-02-26 09:33:14 -06:00
Ludwig Nussel
ee7cdc2a90 ReviewBot: catch exception for adding devel project review
if the bot is run on requests it has no role it, adding devel project
review may fail. So just handle that and proceed.
2019-02-05 08:25:14 +01:00
Ludwig Nussel
9091593263 ReviewBot: refactor logic 2019-01-16 15:19:01 +01:00
Stephan Kulow
ad48ebfe20
Merge pull request #1795 from coolo/dont_error_on_RR
If we can't resolve the package name, it's no reason to decline
2018-11-27 06:34:31 +01:00
Stephan Kulow
4d6133a25b If we can't resolve the package name, it's no reason to decline
Sometimes maintenance adds specific containers to build in the
incident
2018-11-19 13:00:19 +01:00
Stephan Kulow
2fe9701238 Use more print from the future 2018-11-17 10:16:13 +01:00
Stephan Kulow
ea9061ccf5 Import urllib2 python agnostic 2018-11-16 09:01:45 +01:00
Jimmy Berry
ac798df607 ReviewBot: accept patchinfo action reviews instead of ignore.
Ignore is used to wait for a change to occur while patchinfo should never
affect the result. Since all actions must be accepted for the request to
be accepted setting patchinfo to accept is the correct way to ignore it.
2018-11-12 16:22:27 -06:00
Jimmy Berry
2a50b8cf72 ReviewBot: staging_api(): allow for Staging subproject to be used. 2018-10-18 16:20:30 -05:00
Jimmy Berry
d1b630b5da ReviewBot: break down sub-types of delete requests.
Their is very little overlap in the types of reviews one typically wants
to perform on delete requests. Already all of the existing code will crash
if a delete project request is reviewed.
2018-09-17 17:04:44 -05:00
Jimmy Berry
6069245350 Remove SUSE copyright, warranty, and license headers.
Distinct copyrights were left as I do not wish to track down commit
history to ensure it properly documents the copyright holders. Also left
non-GPLv2 licenses and left bs_copy untouched as a mirror from OBS.

Already have a mix of with and without headers and even OBS does not place
on majority of files. If SUSE lawyers have an issue it will come up in
legal review for Factory.
2018-08-23 19:18:06 -05:00
Jimmy Berry
a1c1334803 ReviewBot: add devel_project_review_*() methods adapted from maintbot.
The owner logic surrounding a package removed from Factory does not appear
to make sense as the current behavior of OBS never returns another owner
pair for such packages. As such the existing devel project lookup makes
more sense and is more straight forward.
2018-08-22 21:24:58 -05:00
Jimmy Berry
53f7f42183 ReviewBot: utilize osclib.Cache for all bots by default.
Half the bots already utilize the Cache since it is used by StagingAPI
which they call, but really no reason for all of them not to use it by
default. With planned repo_checker changes the StagingAPI is not always
utilized, but it is desirable for the cache to always be used.

No sense calling Cache.init() in ReviewBot constructor as useless extra
calls when bots embed each other.
2018-08-21 01:56:05 -05:00
Jimmy Berry
3ece452a03 ReviewBot: utilize memoize cached config. 2018-08-21 01:53:29 -05:00
Jimmy Berry
2180c4a2c6 ReviewBot: drop self.staging_config post switch to Config.get(). 2018-08-17 10:16:47 -05:00
Jimmy Berry
1012b62830 ReviewBots: utilize Config.get() instead of self.staging_config. 2018-08-17 10:16:47 -05:00
Jimmy Berry
760ddf39e6 osclib/conf: decouple from StagingAPI and always fetch remote config.
As the remote config is no longer optional for SLE and is utilized by
openSUSE to the point were it is dangerous not to load the remote config
it should be required. Currently only certain users call apply_remote()
while this will make it built-in during construction and thus makes the
usage consistent and no longer require StagingAPI.
2018-08-16 21:53:40 -05:00
Jimmy Berry
7c35c5d03e ReviewBot: check_one_request(): correct logic to return "lowest" result.
Without this change if two actions return True and None, True is returned
which is not desirable.
2018-08-08 23:31:41 -05:00
Ludwig Nussel
2ed2f4e0a5
Merge pull request #1595 from lnussel/leaper-sle
leaper: adjust for SLE 15SP1 and SLE12SP4
2018-06-29 10:30:59 +02:00
Jimmy Berry
da36ae9931 check_source: replace one action limitation with configurable rule.
Allows tool to be used on multi-action requests while still enforcing
the rule for Factory and Leap which should reject such requests due to
staging process.
2018-06-28 12:14:19 -05:00
Jimmy Berry
85e6205e3a ReviewBot: provide self.action for direct access in sub-classes. 2018-06-28 11:41:54 -05:00
Jimmy Berry
e4f94b471f ReviewBot: check_action_maintenance_incident(): clarify src_package magic. 2018-06-28 11:41:33 -05:00
Jimmy Berry
df10ee01a9 ReviewBot: downgrade patchinfo message to debug and include for release. 2018-06-28 11:37:56 -05:00
Ludwig Nussel
cc2fa88058 leaper: adjust for SLE 15SP1 and SLE12SP4 2018-06-28 14:24:35 +02:00
Ludwig Nussel
a471c0b9e8 Refactor _check_project into ReviewBot 2018-05-30 13:55:38 +02:00
Jimmy Berry
b20c01669e ReviewBot: runner: reload checker and reset memoize session caches.
Otherwise, memoize(session=True) caches are kept until the process is
stopped which is obviously not how they were intended to be used. This
can cause incorrect behavior and continued memory growth.
2018-04-27 15:35:52 -05:00
Stephan Kulow
55e7990bcd [oqamaint] Look at all open release requests for Updates
self.requests is only the incidents to be reviewed, but for testing we
need to take into account all open incidents (i.e. those we already approved
but not yet release migth interfere with those newly in testing)
2018-04-23 17:35:02 +02:00
Jimmy Berry
f196526e73 ReviewBot: disable comment handler for default action handler.
Otherwise, if a bot overrides __default() and still calls super method and
then comment_write(), as leaper does, a comment will still be generated. If
a bot wants a comment even when "unhandled" it is likely deviating
enough that it should not call the super method.
2018-04-16 18:20:23 -05:00
Ludwig Nussel
78de99ff82 ReviewBot: make interval work without tty 2018-03-12 13:54:47 +01:00
Ludwig Nussel
fc587db936 ReviewBot: don't crash if staging-group is None 2018-03-09 16:22:24 +01:00
Ludwig Nussel
ca5f71ec4b leaper: fix can_accept_review for combined user/group usage 2018-03-08 16:45:33 +01:00
Stephan Kulow
c176a4c95e ReviewBot: allow both group and user review 2018-03-08 10:34:40 +01:00
Jimmy Berry
d30db7eb1d
Merge pull request #1427 from jberry-suse/ReviewBot-comment-override
Define comment commands and provide for ReviewBot review overrides and repo-checker skip-cycle.
2018-03-07 13:41:31 -06:00
Jimmy Berry
a40ebc1544 ReviewBot: provide comment command override.
For example:

  @leaper override accept
  @repo-checker override decline
2018-03-06 16:42:12 -06:00
Jimmy Berry
3c25b8a8a4 ReviewBot: do not bother commenting for unhandled request type.
For consistency this would still make sense to post as a "report", but
given the lack of such a facility in OBS disable comment to reduce noise.
2018-03-05 11:45:37 -06:00
Jimmy Berry
f98a78c1ae Remove Vim config in favor of EditorConfig. 2018-01-23 00:48:00 -06:00
Jimmy Berry
6631598dc6 ReviewBot: comment_write(): provide bot_name_suffix parameter.
Cleanly allows for multiple comments from the same tool on one entity.
2018-01-19 08:50:32 -06:00
Jimmy Berry
8c4891bd95 ReviewBot: replace get_devel_project() with osclib.core.devel_project_get(). 2018-01-17 18:09:30 -06:00
Jimmy Berry
1bd5b99028 ReviewBot: comment_write(): provide info_extra_identical parameter.
Allows for excluding info_extra from comment_find() and compares messages
after marker has been removed.
2017-12-29 18:32:43 -06:00
1cec490d54 White space / consistent usage of spaces / indentation of 4 fixes 2017-10-20 00:58:05 +02:00
3cf49d9556 Python 2.6+ / 3.x style except clauses
This newer style except statement allows for compatibility with
Python 3.x and does not harm on python 2.6+.
2017-10-16 22:47:58 +02:00
Jimmy Berry
b129a13758 Merge pull request #1154 from jberry-suse/ReviewBot-comment_write-super-small-teany-tiny-tweak
ReviewBot: comment_write() add info_extra parameter (and overview documentation).
2017-10-06 15:37:55 -05:00
Jimmy Berry
b97ced1c74 ReviewBot: comment_write() no need to str() since None is exits above. 2017-10-05 17:41:51 -05:00
Jimmy Berry
642f0536a1 ReviewBot: comment_write(): pre-truncate for correct comparison.
Otherwise, long comments that end up being truncated are re-posted.
2017-10-05 17:40:26 -05:00
Jimmy Berry
76c4b499e3 ReviewBot: comment_write(): add overview documentation. 2017-09-29 09:42:39 -05:00
Jimmy Berry
b886949e83 ReviewBot: comment_write(): add info_extra parameter. 2017-09-29 09:35:14 -05:00
Jimmy Berry
eb350bdf73 ReviewBot: comment_write(): skip posting empty comments extracted from handler. 2017-08-29 22:19:21 -05:00
Jimmy Berry
17d8ea8b3a ReviewBot: downgrade message about skipping duplicate review to debug.
This matches the original intent along with ensuring such messages never
end up in the default CommentFromLogHandler.
2017-08-29 22:18:16 -05:00