mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-02 07:34:45 +08:00
feat(sandbox): add main restart policy (#2798)
* feat(sandbox): add main restart policy Signed-off-by: Drew Newberry <anewberry@nvidia.com> * fix(sandbox): harden policy-driven restarts Signed-off-by: Drew Newberry <anewberry@nvidia.com> * fix(sandbox): address restart review feedback Signed-off-by: Drew Newberry <385+drew@users.noreply.github.com> * fix(sandbox): port restart policy to current runtime Signed-off-by: Drew Newberry <anewberry@nvidia.com> * perf(sandbox): restart promptly after terminal delivery Signed-off-by: Drew Newberry <anewberry@nvidia.com> --------- Signed-off-by: Drew Newberry <anewberry@nvidia.com> Signed-off-by: Drew Newberry <385+drew@users.noreply.github.com>
This commit is contained in:
@@ -2719,10 +2719,16 @@ def test_sandbox_ref_retains_gateway_labels() -> None:
|
||||
def test_sandbox_ref_includes_main_process_result() -> None:
|
||||
proto = _make_sandbox_proto("sandbox-1", "job-1")
|
||||
proto.status.exit_code = 0
|
||||
proto.status.restart_count = 2
|
||||
proto.status.next_restart_time.FromMilliseconds(1_700_000_000_000)
|
||||
proto.status.main_process_started_time.FromMilliseconds(1_699_999_000_000)
|
||||
|
||||
status = _sandbox_ref(proto).status
|
||||
|
||||
assert status.exit_code == 0
|
||||
assert status.restart_count == 2
|
||||
assert status.next_restart_at_ms == 1_700_000_000_000
|
||||
assert status.main_process_started_at_ms == 1_699_999_000_000
|
||||
|
||||
|
||||
def test_returned_labels_are_immutable() -> None:
|
||||
|
||||
Reference in New Issue
Block a user