Closed cfcosta closed 7 years ago
@Jiri-Kremser @abonas can you take a look at this?
@israel-hdez please have a look
@israel-hdez @abonas did some changes, can you take a look at it again?
@pilhuhn please have a look
I think that makes sense. I recall that we battled with getting the error callback right in the past for cases when credentials are wrong and similar.
@cfcosta I have no more comments. Ready to merge?
This pull request fixes a 500 page that happens when you try to do a power operation when the middleware server is offline, by making the connection be created lazily when an operation is called.
The idea behind this is to allow operations code to catch errors when connecting to the server, because while errors from the operations can be catched.
As an example, here's this piece of code:
If the error happens on
#undeploy
, then the failure clause will be called, but if the error happens on#operations(true)
, which spawns a new connection, it will be raised as normal.As a bonus, this PR also removes the sleep code from the connection handler, which makes both the tests and real world usage much, much, much faster.
Before:
After:
Bugzilla Ticket: https://bugzilla.redhat.com/show_bug.cgi?id=1444940