Skip to content

ci: fix container integration test failures#3499

Merged
tippmar-nr merged 4 commits intomainfrom
ci/fix-container-test-localstack-healthcheck
Mar 23, 2026
Merged

ci: fix container integration test failures#3499
tippmar-nr merged 4 commits intomainfrom
ci/fix-container-test-localstack-healthcheck

Conversation

@tippmar-nr
Copy link
Copy Markdown
Member

@tippmar-nr tippmar-nr commented Mar 23, 2026

Summary

  • Pin LocalStack to 4.14.0 with SHA digest — the stable tag was updated on 2026-03-23 to a broken release (the LocalStack open source repo was archived 3/23, new image immediately throws exit code 55 on startup)
  • Add LocalStack health check so test app waits for service readiness before starting
  • Serialize container tests that share dependency services (LocalStack, Memcached, Kafka) using xUnit [Collection] to prevent resource contention on CI runners
  • Improve Docker cleanup resilience in ContainerApplication.cs

Test plan

  • All 14 Ubuntu/amd64 container tests pass locally
  • CI workflow passes on this branch

🤖 Generated with Claude Code

tippmar-nr and others added 4 commits March 23, 2026 13:16
Add a health check to the LocalStack service in docker-compose-awssdk.yml
so the test app waits for LocalStack to be ready before starting. This
fixes intermittent AWS SDK container test failures (SQS, Kinesis, Firehose)
caused by the test app making requests before LocalStack finished
initializing.

Also improve Docker cleanup in ContainerApplication.cs:
- Skip manual container/network removal when compose down succeeds
- Remove duplicate network cleanup in PrepareForStart
- Skip network inspect during pre-start diagnostics to reduce log noise

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add [Collection("AwsSdkTests")] to all AWS SDK container test classes
so they run sequentially instead of in parallel. Each test spins up its
own LocalStack + DynamoDB + test app via docker compose, and running 6+
LocalStack containers simultaneously on CI runners causes resource
exhaustion (LocalStack exits with code 55).

Other container tests (Kafka, Memcached, smoke tests) are unaffected
and continue to run in parallel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The localstack/localstack:stable tag was updated on 2026-03-23 to a new
CalVer release (2026.03.0) that crashes on startup with exit code 55.
The LocalStack GitHub repo was archived the same day, suggesting a major
licensing/model change. Pin to the last known working version (4.14.0)
to restore CI stability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Same resource contention fix as AWS SDK tests — add [Collection] to
Memcached and Kafka test classes so each pair of DotNet8/DotNet10 tests
runs sequentially. Prevents two instances of the same dependency service
(memcached-server, kafka-broker) from competing for resources on CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tippmar-nr tippmar-nr marked this pull request as ready for review March 23, 2026 19:36
@tippmar-nr tippmar-nr requested a review from a team as a code owner March 23, 2026 19:36
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.80%. Comparing base (425cdd1) to head (d656a62).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3499      +/-   ##
==========================================
+ Coverage   81.79%   81.80%   +0.01%     
==========================================
  Files         508      508              
  Lines       34220    34220              
  Branches     4040     4040              
==========================================
+ Hits        27990    27994       +4     
+ Misses       5265     5262       -3     
+ Partials      965      964       -1     
Flag Coverage Δ
Agent 82.79% <ø> (+0.01%) ⬆️
Profiler 71.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tippmar-nr tippmar-nr merged commit 3e04b59 into main Mar 23, 2026
130 checks passed
@tippmar-nr tippmar-nr deleted the ci/fix-container-test-localstack-healthcheck branch March 23, 2026 20:40
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.

3 participants