#138 Allow manual trigger of container images rebuild.
Merged by jkaluza. Opened by jkaluza.
jkaluza/freshmaker manual-rebuild  into  master

Download 138.patch

This adds new POST endpoint to allow admins to trigger rebuild of images with packages form advisory manually. This new endpoint just sends message to message bus which is handled by Freshmaker backend. This will create fake internal event representing the errata advisory and will build it as it would do when receiving this event from message bus.

This also adds MESSAGING_SENDER. I'm not 100% happy with that, but we are in strange situation when it comes to messaging. Python fedmsg module cannot send messages to UMB without consumer, but we need to send the message to UMB from frontend, which is flask app without consumer. Therefore the MESSAGING_SENDER is introduced to set that sending should be done using rhmsg messaging backend, which allows sending messages from frontend, but receiving on backend side should be done using fedmsg.

rebased onto ab55f5aad6e717b475dc261af4e8300e4f991aa3

add pydocs for args?

I'd make this a log.info instead of log.debug. Since this should happen for manual rebuilds, it will be interesting.

It if happened all the time, automatically, then it might count as noise and we could demote it to debug.

I'm a bit confused. If freshmaker is configured to use rhmsg, both frontend and backend should use it so that we do not necessarily need to configure two backends. It seems to me we just need to add a rhmsg consumer in the backend for consuming messages from UMB. OTOH, we could also file a RFE to fedmsg to make it support sending messages to UMB without defining consumers.

rebased onto 9b06951e6693a9541dad03b61ab87b32da9b8f97

@mjia: You are definitely right and this PR just showed we need to redo freshmaker to either use rhmsg completely or improve fedmsg. However we need this feature asap on prod and redoing things would take us another week at least, so we are going to merge this and create tickets to fix the code... Not a best situation, but that's life...

Yeah, agreed with Jan - we know it's not ideal but I am OK with this for the time being in the interest of having something usable in prod soon. We will polish later (either in rhmsg or fedmsg)

+1

Pull-Request has been merged by jkaluza

Metadata