This fixes#93. See that issue for a description of the problem.
This change will create a new session for every event handled by the
backend and will force a commit and close the session at the end of each
message.
For bonus points, we should employ the ZopeTransactionManager extension
in the future, but I'm not sure how it will play with the
flask_sqlalchemy extension. Will check on that later.
For the base-runtime module, the current repr here generates pages and
pages of spam in the logs. The change here should greatly reduce that
spam, and produce something that's much more interesting and readable.
Resume only failed module build tasks (this should be configurable in
the future).
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
Signed-off-by: Nils Philippsen <nils@redhat.com>
Take advantage of the information contained in signature/parameter
objects to represent positional and keyword arguments properly. Fall
back to using the funcsigs module on Python 2.
koji.read_config() filters out configuration options it doesn't know
about silently. Currently this is about the keytab, principal, ccache
options. The latter may be needed e.g. in Docker containers which
currently(?) can't use Linux kernel keyrings and need the credential
cache to be a normal file.
Before this, we were consulting pkgdb to see if the given user was the
maintainer of any packages.
That mostly works... but technically, we want to consult FAS to see if
the user is in the packager group.
We found this when @mprahl was unable to submit builds to rida. I added
him to the packager group, but nothing changed! (As written, he had to
actually own a package).
This change fixes all that so that we query FAS instead of pkgdb.
Tests are added.
Using vars() this way breaks passing the koji configuration options to
koji.ClientSession(), it passes an empty dict instead. Any options in
koji.conf which are needed for authenticating are ineffectual (e.g.
`krbservice`).