[FIX] Propagate exception when git url does not match#204
[FIX] Propagate exception when git url does not match#204StefanRijnhart wants to merge 1 commit intofschulze:masterfrom
Conversation
|
|
|
I only glanced at this and the general idea to replace sys.exit makes sense. I'm unsure about the way the exception is propagated though. It also seems like this broke Python >= 3.6 |
d1ca769 to
3f907e4
Compare
|
Thank you for your considerations! I will replace the other occurrences of Tests are fixed here: #205 |
* Don't drop exception silently (and continue) when it occurs in a forked off thread * Raise, not exit on unknown git branch * Raise when git url does not match
3f907e4 to
057b7e1
Compare
|
The exception propagation now makes sense to me. Could you try and add a test for the missing branch case? |
I changed the remote of my git source hoping that mr.developer would reset the code as
always-checkoutwas set toforcebut it silently continued, leaving the old code in place.Apparently, the git code raises
GitErrorin most cases but in some cases, such as the case of having to update an unknown branch, it exits with a non zero value. When that happens, queued log messages are discarded, and in non-threading mode, builtout halts without an explanation. What is worse is that in threading mode, buildout continues and eventually reports success.Replacing the
sys.exitby raising aGitErrorfixes the logging but the exceptions still had to be propagated to the main level in threading mode.The unknown branch was only encountered by accident. The earlier error of the non-matching remote url was not even considered a fatal error. I'm proposing to do so, at least when
always-checkoutis set to force.