Skip to content

Conversation

@the-mann
Copy link
Contributor

@the-mann the-mann commented Dec 9, 2025

Problem

When users retry failed jobs in GitHub Actions, the StartLocalStack job may not be rerun if it previously succeeded, but the test jobs that depend on LocalStack will try to connect to a LocalStack instance that no longer exists.

This causes CA bundle tests and other LocalStack-dependent integration tests to fail with connection errors.

Root Cause

  • LocalStack runs on EC2 and gets terminated when tests complete
  • Retrying individual test jobs doesn't restart the LocalStack dependency
  • CA bundle tests fail because they can't reach https://localhost:4566

Solution

Add condition to StartLocalStack job:

if: needs.CheckLabel.outputs.should_run == 'true' || github.run_attempt > 1

How It Works:

  • First Run: Only runs if "ready for testing" label is present
  • Retry Runs: Always runs to ensure fresh LocalStack instance

Benefits

Retry-Safe: Test jobs always get a running LocalStack instance
Respects Workflow Logic: Still honors label check on first run
Minimal Change: Single line modification
CA Bundle Tests Fixed: LocalStack will always be available for SSL testing

Testing

This fix ensures that when integration tests are retried, they will have access to a fresh LocalStack instance for testing SSL certificate validation and other AWS service interactions.

@the-mann the-mann requested a review from a team as a code owner December 9, 2025 21:43
@the-mann the-mann force-pushed the fix-localstack-retry-issue branch from 1363bff to d458553 Compare December 9, 2025 21:50
- Add condition to restart LocalStack on job retries (github.run_attempt > 1)
- Ensures CA bundle tests and other LocalStack-dependent tests have access to running LocalStack instance
- Maintains existing label check behavior for first run
- Fixes issue where retrying failed test jobs would fail due to missing LocalStack
@the-mann the-mann force-pushed the fix-localstack-retry-issue branch from d458553 to f027250 Compare December 9, 2025 22:42
@the-mann the-mann added the ready for testing Indicates this PR is ready for integration tests to run label Dec 9, 2025
@the-mann the-mann closed this Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for testing Indicates this PR is ready for integration tests to run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant