Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@samrose
Copy link
Collaborator

@samrose samrose commented Nov 13, 2025

Changes Made

Added environment variables to both "Build AMI stage 1" and "Build AMI stage 2" steps in
.github/workflows/testinfra-ami-build.yml:111,120:

env:
AWS_MAX_ATTEMPTS: 10
AWS_RETRY_MODE: adaptive

What This Does

  1. AWS_MAX_ATTEMPTS: 10 - The AWS SDK will retry failed API calls up to 10 times before giving up (default is 3)
  2. AWS_RETRY_MODE: adaptive - Uses intelligent retry logic that:
    - Backs off exponentially on throttling errors
    - Adapts retry timing based on AWS response patterns
    - Handles transient network issues (like your "unexpected EOF")
    - Works with rate limiting and temporary connectivity problems

Expected Impact

  • Fixes the frequent "unexpected EOF" errors during snapshot tagging by automatically retrying when the AWS API connection drops
  • No workflow re-runs needed for transient failures - the build will self-heal
  • Minimal time overhead - Only adds delay when retries are actually needed
  • Works for both stages - Protects both the surrogate build and the stage 2 build

The frequent "unexpected EOF" was tied many times to a specific interaction with aws that doesn't require a full re-run of workflow

@samrose samrose requested review from a team as code owners November 13, 2025 14:05
Copy link
Contributor

@jchancojr jchancojr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samrose samrose force-pushed the fix/aws-adaptive-retry branch from 72de4fc to 70429f4 Compare November 13, 2025 15:56
@hunleyd
Copy link
Contributor

hunleyd commented Nov 14, 2025

i cannot wait for this to be merged. the unexpected eof is killing me

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.

4 participants