From b602997f3a3a89e72b0528b1dc1a60b2f449f4a3 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Tue, 15 Apr 2025 17:20:53 +0000 Subject: [PATCH] deploy: Build sparkd if any service starts with "sparkd" Previously, we only built sparkd for the "sparkd" service (i.e., exact match) --- tools/py/deploy.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/py/deploy.py b/tools/py/deploy.py index 598887551..94697d9c3 100644 --- a/tools/py/deploy.py +++ b/tools/py/deploy.py @@ -47,7 +47,9 @@ def _get_arg_parser(): ) # TODO: add more services (api-server, pubsub, dsqa web server, etc.) all_services = ["sparkd"] - parser.add_argument("services", help="this selects services defined in compose.yaml", nargs="*") + parser.add_argument("services", + help="this selects services defined in compose.yaml", + nargs="*") parser.set_defaults( configuration="release", services=all_services, @@ -86,8 +88,9 @@ def deploy(args): services: list[str] = args.services or [] if args.build: - build_all = len(services) == 0 - if build_all or "sparkd" in services: + should_build = len(services) == 0 or any( + filter(lambda s: s.startswith("sparkd"), services)) + if should_build: publish_sparkd.publish( publish_sparkd.PublishArgs( configuration="release",