You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docker-to-squash.py: shell_command swallows exceptions, so raise_on_error=True never raises #9289
shell_command in bin/docker-to-squash.py returns from its finally clause, so any exception raised in the try block is discarded, including the one for raise_on_error=True.
Storm 3.3.0-SNAPSHOT (master 4fca209). Reproduced with Python 3.9.
shell_command(["false"], False, False, True) returns (b'', b'', 1) and does not raise.
Expected: a failed command with raise_on_error=True raises.
Actual: the return code is 1 and no exception is raised. check_dependencies therefore reports success when hadoop or /usr/sbin/mksquashfs is missing, and failed hadoop commands in atomic_upload_mv_to_hdfs go unnoticed.
test_shell_command in bin/test_docker_to_squash.py currently asserts this behaviour (a non-zero return code, no exception), so it needs to change together with the fix.
Follow-up from the review discussion in #9284 ʕ•ᴥ•ʔ
Activity
docker-to-squash.py: don't return from finally in shell_command (apac…