From 838dbcd886b719bdc1333ffe69fc26897eff310b Mon Sep 17 00:00:00 2001 From: John Colvin Date: Fri, 3 Jan 2025 15:04:14 +0000 Subject: [PATCH] build: In py build scripts, exit with code 1 on failure Previously, they would exit with 0 no matter what happened. --- tools/py/build_api_server.py | 1 + tools/py/build_data_stream.py | 1 + tools/py/build_spark.py | 1 + tools/py/build_sparkd.py | 1 + tools/py/publish_spark.py | 6 +++++- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/py/build_api_server.py b/tools/py/build_api_server.py index 470516b13..2487f7e22 100644 --- a/tools/py/build_api_server.py +++ b/tools/py/build_api_server.py @@ -121,3 +121,4 @@ if __name__ == "__main__": _main() except Exception as e: print(f'build_api_server.py failed: {e}') + exit(1) diff --git a/tools/py/build_data_stream.py b/tools/py/build_data_stream.py index 94538e3e4..f96375731 100644 --- a/tools/py/build_data_stream.py +++ b/tools/py/build_data_stream.py @@ -137,3 +137,4 @@ if __name__ == "__main__": _main() except Exception as e: print(f'build_data_stream.py failed: {e}') + exit(1) diff --git a/tools/py/build_spark.py b/tools/py/build_spark.py index fae123f51..bfe5309d2 100644 --- a/tools/py/build_spark.py +++ b/tools/py/build_spark.py @@ -125,3 +125,4 @@ if __name__ == "__main__": _main() except Exception as e: print(f'build_spark.py failed: {e}') + exit(1) diff --git a/tools/py/build_sparkd.py b/tools/py/build_sparkd.py index 57229afac..93ba229a9 100644 --- a/tools/py/build_sparkd.py +++ b/tools/py/build_sparkd.py @@ -131,3 +131,4 @@ if __name__ == "__main__": _main() except Exception as e: print(f'build_sparkd.py failed: {e}') + exit(1) diff --git a/tools/py/publish_spark.py b/tools/py/publish_spark.py index df9d68dfe..787fa9bf9 100644 --- a/tools/py/publish_spark.py +++ b/tools/py/publish_spark.py @@ -149,4 +149,8 @@ def _main(): if __name__ == '__main__': - _main() + try: + _main() + except Exception as e: + print(f'publish_spark.py failed: {e}') + exit(1)