You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spawn extend anchors spawn:ttl and the raised cost limit to EC2 LaunchTime, which resets on every start #992
Found while fixing #983. I read the code and did not reproduce this live.
computeExtendedTTLTags and decideCostLimit (cmd/extend.go, cmd/extend_cost_limit.go) both anchor to aws.InstanceInfo.LaunchTime. pkg/aws/client.go fills that field from EC2's LaunchTime, and EC2 resets it on every start of a stopped instance. Everything else uses the original launch:
spawn:launch-time is tagged once at launch (pkg/aws/tags.go). spored reads it into config.LaunchTime, and so does pkg/ttl.SetTags via spored config set ttl.
The cost cap counts accumulated compute across all boots (spawn:compute-seconds, pkg/agent/agent.go).
So after a stop/start, spawn extend (single instance and, since #983, the job-array path too):
Suggested fix: anchor both to spawn:launch-time when it is present and fall back to EC2 LaunchTime. For (2), use the accumulated compute from spawn:compute-seconds plus the time from now to the deadline, which matches the arithmetic the agent actually enforces.
Activity
Make extend --job-array-* move the enforced deadline; gate spawn:ttl …
Make extend --job-array-* move the enforced deadline; gate spawn:ttl …
Anchor spawn extend's spawn:ttl and raised cost limit to the original…
Anchor spawn extend's spawn:ttl and raised cost limit to the original…
Anchor spawn extend's spawn:ttl and raised cost limit to the original…