Skip to content

[2/4] Add AWS Batch worker for distributed task execution#76

Closed
ericc59 wants to merge 7 commits into
add-aws-integrationfrom
aws-integration-pr2
Closed

[2/4] Add AWS Batch worker for distributed task execution#76
ericc59 wants to merge 7 commits into
add-aws-integrationfrom
aws-integration-pr2

Conversation

@ericc59
Copy link
Copy Markdown
Contributor

@ericc59 ericc59 commented Jan 29, 2026

Summary

Implements the AWS Batch worker that runs inside containers to process individual ARC benchmark tasks. This is PR 2/3 in the AWS integration series, building on the infrastructure layer from PR #74.

Core components:

  • BatchWorkerConfig: Loads configuration from environment variables (RUN_ID, TASK_ID, CONFIG_NAME, S3_BUCKET, DYNAMODB_* table names)
  • BatchWorker: Main orchestration class with lazy-loaded S3, DynamoDB, and rate limiter connections
  • GracefulShutdown: Signal handler for clean container termination

Workflow:

  1. Claim task atomically via DynamoDB conditional update
  2. Load task data from S3
  3. Execute test pairs with distributed rate limiting
  4. Save submission to S3
  5. Mark task completed/failed in DynamoDB

Also includes:

  • Dockerfile for building the batch worker container image
  • AWS deployment artifacts in aws/ directory (job definition, IAM policies, DynamoDB schemas)
  • Comprehensive test suite using moto for AWS mocking (14 tests)
  • CLI entry point: arc-batch-worker

Dependencies

  • Requires PR [1/4 Add AWS integration layer #74 (Add AWS integration layer - PR 1/3) to be merged first
  • Works with Terraform infrastructure in infra-live-sandbox-teal (add-batch-module branch updated to pass DynamoDB table names)

Test plan

  • All existing tests pass (432 tests)
  • New batch worker tests pass with moto mocking
  • Integration test with local DynamoDB/S3 (LocalStack)
  • End-to-end test in AWS sandbox environment

Implements the batch worker that runs inside AWS Batch containers to
process individual ARC benchmark tasks. Integrates with the AWS
infrastructure layer from PR 1/3.

Core components:
- BatchWorkerConfig: Loads configuration from environment variables
  (RUN_ID, TASK_ID, CONFIG_NAME, S3_BUCKET, DYNAMODB_* table names)
- BatchWorker: Main orchestration class with lazy-loaded S3, DynamoDB,
  and rate limiter connections
- GracefulShutdown: Signal handler for clean container termination

Workflow:
1. Claim task atomically via DynamoDB conditional update
2. Load task data from S3
3. Execute test pairs with distributed rate limiting
4. Save submission to S3
5. Mark task completed/failed in DynamoDB

Also includes:
- Dockerfile for building the batch worker container image
- AWS deployment artifacts (job definition, IAM policies, DynamoDB schemas)
- Comprehensive test suite using moto for AWS mocking
- CLI entry point: arc-batch-worker
- Add test script that sets up DynamoDB tables, S3 bucket, and task
  records in LocalStack, then runs the batch worker against it
- Update aws/README.md with LocalStack testing instructions
@ericc59 ericc59 changed the title Add AWS Batch worker for distributed task execution (PR 2/3) Add AWS Batch worker for distributed task execution (PR 2/4) Jan 29, 2026
@ericc59 ericc59 changed the title Add AWS Batch worker for distributed task execution (PR 2/4) [2/4] Add AWS Batch worker for distributed task execution Jan 29, 2026
@ericc59 ericc59 deleted the branch add-aws-integration January 30, 2026 16:49
@ericc59 ericc59 closed this Jan 30, 2026
@ericc59 ericc59 deleted the aws-integration-pr2 branch January 30, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant