Skip to content

Commit

Permalink
Merge pull request #30116 from def-/pr-grace
Browse files Browse the repository at this point in the history
mzcompose: Higher stop grace periods for materialized/clusterd
  • Loading branch information
def- authored Oct 22, 2024
2 parents 03eb0dd + 48fa6de commit de0d5dd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions misc/python/materialize/mzcompose/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ class ServiceConfig(TypedDict, total=False):
publish: bool | None
"""Override whether an image is publishable. Unpublishable images can be built during normal test runs in CI."""

stop_grace_period: str | None
"""Time to wait when stopping a container."""


class Service:
"""A Docker Compose service in a `Composition`.
Expand Down
2 changes: 2 additions & 0 deletions misc/python/materialize/mzcompose/services/clusterd.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(
memory: str | None = None,
options: list[str] = [],
restart: str = "no",
stop_grace_period: str = "60s",
) -> None:
environment = [
"CLUSTERD_LOG_FILTER",
Expand Down Expand Up @@ -60,6 +61,7 @@ def __init__(
"environment": environment,
"volumes": DEFAULT_MZ_VOLUMES,
"restart": restart,
"stop_grace_period": stop_grace_period,
}
)

Expand Down
2 changes: 2 additions & 0 deletions misc/python/materialize/mzcompose/services/materialized.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__(
deploy_generation: int | None = None,
force_migrations: str | None = None,
publish: bool | None = None,
stop_grace_period: str = "60s",
) -> None:
if name is None:
name = "materialized"
Expand Down Expand Up @@ -260,6 +261,7 @@ def __init__(
# A fully loaded Materialize can take a long time to start.
"start_period": "600s",
},
"stop_grace_period": stop_grace_period,
}
)

Expand Down

0 comments on commit de0d5dd

Please sign in to comment.