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
ttl-reaper: logs "unparseable ttl-deadline" for every instance with a valid future deadline #1524
lambda/ttl-reaper/main.goevaluate logs instance <id>: unparseable ttl-deadline "<value>", falling back to spawn:ttl, then max-age for every instance whose spawn:ttl-deadline parses fine and is still in the future.
Why: the log.Printf sits after the inner if deadline, err := time.Parse(...); err == nil { ... } block, not in an else. When a parsed deadline has not passed, control falls through to the max-age check, as intended, and runs the log line on the way out.
ifdl:=tags[tagprefix.Tag("ttl-deadline")]; dl!="" {
ifdeadline, err:=time.Parse(time.RFC3339, dl); err==nil {
haveDeadline=trueifnow.After(deadline) &&!r.leaveToSpored(...) { ...returnc, true }
// Within deadline: fall through to the max-age ceiling below.
}
log.Printf("instance %s: unparseable ttl-deadline %q, ...", id, dl) // runs for a VALID deadline too
}
Evidence: found while writing #1515 phase 5's reaper coverage test (lambda/ttl-reaper/egress_proxy_test.go, PR for #1515 phase 5). Evaluating the egress proxy's real tag set a minute before its deadline prints:
instance i-proxy: unparseable ttl-deadline "2026-11-09T12:00:00Z", falling back to spawn:ttl, then max-age
Impact: log only. haveDeadline is set, so the spawn:ttl fallback is skipped and the max-age ceiling still applies, and nothing is reaped wrongly. But each reaper cycle writes this false line once for every live spawn instance that has a deadline, which is most of them. A real unparseable deadline is then indistinguishable from noise in CloudWatch.
Fix: guard the line with if !haveDeadline, and add a test that a future, valid deadline logs nothing. The reaper is a deployed Lambda, so this needs a redeploy to take effect.
Activity
fix(ttl-reaper): log unparseable ttl-deadline only when it fails to p…
fix(ttl-reaper): log unparseable ttl-deadline only when it fails to p…