From 378f01789d12266ee7ab513a2aee8656525f4559 Mon Sep 17 00:00:00 2001 From: Jesse Schwartzentruber Date: Thu, 26 Oct 2023 09:28:11 -0400 Subject: [PATCH] Set defaults overidden by TC to reduce churn. --- .../fuzzing-decision/src/fuzzing_decision/decision/pool.py | 2 ++ services/fuzzing-decision/tests/test_pool.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/services/fuzzing-decision/src/fuzzing_decision/decision/pool.py b/services/fuzzing-decision/src/fuzzing_decision/decision/pool.py index 8fd29443..4c8c4236 100644 --- a/services/fuzzing-decision/src/fuzzing_decision/decision/pool.py +++ b/services/fuzzing-decision/src/fuzzing_decision/decision/pool.py @@ -329,6 +329,7 @@ def build_resources( # give workers 15 minutes to register before assuming they're broken "registrationTimeout": parse_time("15m"), "reregistrationTimeout": parse_time("4d"), + "queueInactivityTimeout": parse_time("2h"), } # Build the decision task payload that will trigger the new fuzzing tasks @@ -516,6 +517,7 @@ def build_resources( # give workers 15 minutes to register before assuming they're broken "registrationTimeout": parse_time("15m"), "reregistrationTimeout": parse_time("4d"), + "queueInactivityTimeout": parse_time("2h"), } # Build the decision task payload that will trigger the new fuzzing tasks diff --git a/services/fuzzing-decision/tests/test_pool.py b/services/fuzzing-decision/tests/test_pool.py index 9b2b398c..7815b768 100644 --- a/services/fuzzing-decision/tests/test_pool.py +++ b/services/fuzzing-decision/tests/test_pool.py @@ -236,6 +236,7 @@ def test_aws_resources( config["launchConfig"]["InstanceMarketOptions"] = {"MarketType": "spot"} if platform == "linux": expected["config"]["lifecycle"] = { + "queueInactivityTimeout": 7200, "registrationTimeout": 900, "reregistrationTimeout": 345600, } @@ -403,7 +404,11 @@ def test_gcp_resources( "zone": "us-west1-a", }, ], - "lifecycle": {"registrationTimeout": 900, "reregistrationTimeout": 345600}, + "lifecycle": { + "queueInactivityTimeout": 7200, + "registrationTimeout": 900, + "reregistrationTimeout": 345600, + }, "maxCapacity": 6, "minCapacity": 0, },