mw-update-l10n wraps the l10n cache update in parentheses, causing it to run in a sub-shell.
The first problem is that 'set -e' doesn't work predictably in sub-shells. Its precise behavior is documented here: http://fvue.nl/wiki/Bash:_Error_handling#Caveat_1:_.60Exit_on_error.27_ignoring_subshell_exit_status.
The second problem is that the exit status of the sub-shell is ||'d with a call to 'echo' to emit an error message. Because echo typically returns success, the exit status of mw-update-l10n is always success, and so l10n failures do not reach scap.
A good solution is for the parent shell to explicitly check the exit status of any important command it invokes.
This pattern works well:
some_command || {
st="$?" echo "some_command failed" exit $st
}
It can be neatly encapsulated in a bash function, as shown in http://mywiki.wooledge.org/BashFAQ/101.
Version: wmf-deployment
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=50371