Skip to content

feat: add CLI heartbeat mechanism on Fargate#3705

Merged
hassy merged 3 commits intomainfrom
feat/heartbeat-fargate
Mar 1, 2026
Merged

feat: add CLI heartbeat mechanism on Fargate#3705
hassy merged 3 commits intomainfrom
feat/heartbeat-fargate

Conversation

@hassy
Copy link
Member

@hassy hassy commented Feb 27, 2026

Description

Fix for scenarios where the CLI is either SIGKILL'ed or where graceful shutdown does not terminate Fargate tasks correctly.

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs? No
  • Does this require a changelog entry? Yes

hassy and others added 2 commits February 27, 2026 16:34
Add startedBy (context.testId) to ECS RunTask params to enable
ListTasks queries by test ID. Add e2e test that spawns a long-running
Fargate test, SIGKILLs the CLI, then polls ECS to verify workers
detect the missing heartbeat and self-terminate within the expected
window (180-300s).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CLI: write heartbeat to single key (heartbeat.json) with timestamp as
body instead of creating unique files under heartbeat/ prefix. Avoids
s3api list-objects-v2 + JMESPath on worker side.

Worker: replace s3api list-objects-v2 with aws s3 cp (proven pattern
used by go signal, log upload). Failures now visible via printf instead
of debug(). Add SIGTERM → 15s wait → SIGKILL escalation matching the
existing cleanup() pattern, since Artillery catches SIGTERM for graceful
shutdown and may not exit promptly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hassy hassy merged commit e72f537 into main Mar 1, 2026
95 of 97 checks passed
@hassy hassy deleted the feat/heartbeat-fargate branch March 1, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant