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.
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.
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.
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.
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.
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.
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)
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.
The original intent was clearly to allow 404 (package does not exist for
new packages), but crash on anything else. Instead it consumes all
exceptions and does nothing different even with the e.code condition.
Also update calls based on default behavior change. As described in the
comment above add_review() there seems to be no reason to ever add a
duplicate review.
The check in leaper would skip unless state == declined. In such a case
the review would automatically be reopened along with the request so that
logic is unnecessary.
This ensures that calling bots crash rather than continue which can cause
non-atomic state changes that miss reviews when OBS crashes or is
unavailable.