D6929: ci: add comment about block duration pricing
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Tue Oct 1 00:41:14 EDT 2019
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
We can make things even cheaper if we remove the block duration
from the spot request. I added a TODO to track this.
diff --git 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(
ValidUntil=datetime.datetime.utcnow() + datetime.timedelta(minutes=1),
To: indygreg, #hg-reviewers
More information about the Mercurial-devel