Skip to content

Commit 4d7291d

Browse files
Add healthcheck for symbolicator (#57415)
1 parent c53628a commit 4d7291d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/sentry/runner/commands/devservices.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,23 @@ def check_kafka(containers: dict[str, Any]) -> None:
701701
)
702702

703703

704+
def check_symbolicator(containers: dict[str, Any]) -> None:
705+
options = containers["symbolicator"]
706+
(port,) = options["ports"].values()
707+
subprocess.run(
708+
(
709+
"docker",
710+
"exec",
711+
options["name"],
712+
"curl",
713+
f"http://{port[0]}:{port[1]}/healthcheck",
714+
),
715+
check=True,
716+
capture_output=True,
717+
text=True,
718+
)
719+
720+
704721
class ServiceHealthcheck(NamedTuple):
705722
check: Callable[[dict[str, Any]], None]
706723
retries: int = 3
@@ -714,4 +731,5 @@ class ServiceHealthcheck(NamedTuple):
714731
"clickhouse": ServiceHealthcheck(check=check_clickhouse),
715732
"kafka": ServiceHealthcheck(check=check_kafka),
716733
"vroom": ServiceHealthcheck(check=check_vroom),
734+
"symbolicator": ServiceHealthcheck(check=check_symbolicator),
717735
}

0 commit comments

Comments
 (0)