Commit Graph

36 Commits

Author SHA1 Message Date
mprahl
ef5dc64f2b Transition stale failed builds to the "garbage" state and untag their components 2017-11-17 12:07:51 -05:00
Jan Kaluza
8fedf35b6c Log the original exception in consumer before trying to do anything else. Also commit the db.session before doing build.transition 2017-10-26 13:26:43 +02:00
Martin Curlej
60b3d97c97 flake8 cleanup
Signed-off-by: Martin Curlej <mcurlej@redhat.com>

removed some noqa tags
2017-10-25 12:13:59 +02:00
Jakub Kadlcik
e6a23cfd64 Record components through the backend after module submission 2017-10-16 14:45:04 -04:00
Ralph Bean
8e27fe16fe Raise a special exception for special messages.
Today, we ignore koji messages with a None `task_id` in two ways.  First
with a conditional, and then with a second check in the message
`__init__` method.  This is a belt-and-suspenders approach.

For other reasons in the UMB messaging plugin, we'd like to put this
check in just one place and use a special exception in the initializer
instead of in a conditional beforehand.
2017-09-29 13:07:06 -04:00
Ralph Bean
4d393b9e73 Handle python3 queue rename. 2017-09-19 13:21:29 -04:00
Ralph Bean
5e08d2ffe4 Introduce pluggable backends.
This allows an operator to write a custom messaging backend to handle
whatever transport and format.
2017-09-19 13:13:40 -04:00
Mike Bonnet
1f077a12ea pass the entire message to get_abstracted_msg()
Other messaging backends may use different formats, so pass the
entire message through and let get_abstracted_msg() handle it.
2017-09-19 13:12:45 -04:00
Filip Valder
7ef2975984 PEP8 fixes 2017-07-17 18:29:10 +02:00
Ralph Bean
a755104bd4 Fix the test suite.
We had some circular imports that caused the tests (and more?) to fail.

I ran into this when looking at the tests for #583 and #595.
2017-07-06 21:02:32 -04:00
Jan Kaluza
93092a43be Add per-module-build logging feature 2017-06-30 16:30:47 +02:00
Ralph Bean
c432187f92 Log message ids every time we try to handle them. 2017-04-07 08:28:28 -04:00
Jan Kaluza
8bbe2d359f Trigger newRepo by MBS instead of waiting on Kojira in case when we have sucessfully tagged all the components 2017-04-06 17:19:35 +02:00
Jan Kaluža
f7c8478d9c Merge #448 Copr builder improvements #2 2017-03-29 12:09:43 +00:00
Jan Kaluza
296d69b609 Handle all exceptions in the consumer handlers. 2017-03-23 14:59:38 +01:00
Ralph Bean
aabd28b148 Fix UnboundLocalError.
I have hotfixed this in production on mbs-backend01::

    Traceback (most recent call last):
      File "module_build_service/scheduler/consumer.py", line 134, in consume
        self.process_message(session, msg)
      File "module_build_service/scheduler/consumer.py", line 224, in process_message
        for event in further_work:
    UnboundLocalError: local variable 'further_work' referenced before assignment
2017-03-22 13:10:34 -04:00
Jakub Kadlčík
61b74293b1 Rather extend koji message so we can have additional arguments for copr 2017-03-21 07:47:25 +01:00
Ralph Bean
f12d6e0394 Don't validate internal messages.
These fail the validate check every time (because they're not real
messages; they're not signed).
2017-03-03 06:44:12 -05:00
Ralph Bean
c57d52ee56 Simplify this. 2017-03-02 14:30:05 -05:00
Ralph Bean
e9c9097755 Assign further_work either way. 2017-03-02 14:17:22 -05:00
Filip Valder
b738e0201b error->warn 2017-03-02 15:50:52 +01:00
Filip Valder
7b63710608 gracefully fail module build if there's an error while processing message handler 2017-03-02 15:39:03 +01:00
Ralph Bean
92990c94a2 Make this a little more quiet.
Otherwise, it logs for *every single koji build* that comes across the
bus.  Too noisy to see what the MBS is actually doing.
2017-03-01 16:12:35 -05:00
Filip Valder
6b343896dd s/rida/mbs/ 2017-02-28 17:59:02 +01:00
Ralph Bean
6eaf8d7863 Demote this log statement. Way too noisy in production. 2017-02-15 15:43:38 -05:00
Ralph Bean
d093c5eef3 Default needed for this to make sense. 2017-02-02 03:30:25 -05:00
Ralph Bean
e082ff1289 Careful with msg_id here too. 2017-02-01 11:07:21 -05:00
Ralph Bean
78bd24b62a Be careful with attribute access here.
I hit a traceback where msg was NoneType and therefore didn't have a
`msg_id` attribute, I therefore wasn't able to see the real exception
that got me there in the first place.
2017-01-31 12:37:50 -05:00
Filip Valder
abf37e98e1 in_memory messaging -> fallback to '*' topics 2017-01-12 19:57:34 +01:00
Filip Valder
34ef9ce5fd Add support for message topic prefixes + explicit services/categories (incl. code lints) 2017-01-12 19:30:34 +01:00
Jan Kaluza
174e657379 MBSConsumer: Handle initial messages in right order, override validate for non-fedmsg messaging backends. 2016-12-19 12:47:57 +01:00
Ralph Bean
775819e87c Bugfix to shutdown and restart for the test suite. 2016-12-15 16:27:17 -05:00
Ralph Bean
9d3b85426d Bring back the in-memory messaging backend. 2016-12-15 16:27:17 -05:00
Ralph Bean
feb1079fba Remove unused work_queue. 2016-12-15 16:27:15 -05:00
Ralph Bean
f11caf32e5 Get the basic framework for local module builds working again with hub/consumer. 2016-12-15 16:27:15 -05:00
Matt Prahl
261549c8c2 Migrate scheduler to be run by fedmsg-hub 2016-12-15 16:27:15 -05:00