Skip to content

docker-to-squash.py: shell_command swallows exceptions, so raise_on_error=True never raises #9289

Closed

Description

@dragonknightk

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

  1. added a commit that references this issue on Nov 23, 2026
    22a8483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions