diff --git a/contrib/ci/lambda_functions/ci.py b/contrib/ci/lambda_functions/ci.py --- a/contrib/ci/lambda_functions/ci.py +++ b/contrib/ci/lambda_functions/ci.py @@ -572,6 +572,13 @@ # there are no available spot instances. But we handle this by setting a # short request validity window and retrying in a different availability # zone. Eventually we should find someone willing to satisfy our request. + # + # TODO remove BlockDurationMinutes for even greater savings. By requesting + # a full block, we essentially create a 1 hour reservation rather than an + # instance that can be terminated whenever. The stronger guarantees make + # it more expensive. If we remove this, we will no longer have + # ActualBlockHourlyPrice in the spot request metdata and will need to + # update hourly cost accounting elsewhere in this file. res = ec2.request_spot_instances( BlockDurationMinutes=60, ValidUntil=datetime.datetime.utcnow() + datetime.timedelta(minutes=1),