Skip to content

Conversation

@matiwinnetou
Copy link
Collaborator

The GitHub Actions integration test was timing out because:

  1. The docker compose up --wait command has a default 10-minute timeout
  2. Building 3 Java services from source (db, yaci-indexer, api) + Maven dependency downloads takes longer than 10 minutes in CI/CD
  3. The log showed the build process got stuck during Docker image building

Changes Applied:

  1. .github/workflows/integration-test.yaml:16
  • Added --wait-timeout 1200 (20 minutes) to the docker compose command
  • Added Docker Buildx setup action for better caching support
  1. docker-compose-api.yaml:61-70
  • Added explicit depends_on for db and yaci-indexer services
  • Optimized healthcheck timing:
    • Changed interval from 30s → 10s (more frequent checks)
    • Increased retries from 20 → 40
    • Extended start_period from 20s → 60s (gives Spring Boot more time to start)
    • Reduced timeout from 10s → 5s (faster failure detection)
    • Total max wait time remains ~7 minutes but with better responsiveness
  1. docker-integration-test-environment.yaml:27-29
  • Added depends_on for yaci-cli to wait for database health before starting

Expected Improvements:

  • Prevents timeout failures by allowing up to 20 minutes for service startup
  • Better service orchestration with explicit dependency chains (db → yaci-cli/yaci-indexer → api)
  • Faster health detection with 10s intervals instead of 30s
  • Better Docker caching with Buildx action (will speed up future builds)

Additional Recommendations for Future:

  1. Pre-build and cache Docker images in CI/CD to avoid building from source every time
  2. Use GitHub Actions cache for Maven dependencies
  3. Consider splitting the workflow to build images separately and reuse them in integration tests

The changes are minimal and backward-compatible. Your local environment will continue to work as before, and the CI/CD should now complete successfully without timing
out.

…ion tests

- Add 20-minute wait timeout to prevent CI/CD failures during image builds
- Enable Docker Buildx for improved layer caching
- Add explicit service dependencies (db → yaci-cli/yaci-indexer → api)
- Optimize API healthcheck: 10s interval, 40 retries, 60s start period
- Ensure proper service orchestration in integration test environment

Fixes intermittent timeout issues in GitHub Actions where Maven builds
and Docker image creation exceed default 10-minute timeout.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

✅ Preprod Tests: PASSED

📊 View Detailed Test Report

🔗 Action Run #37

Tests run against preprod network with live blockchain data

@matiwinnetou matiwinnetou merged commit 13ba5c6 into main Oct 29, 2025
7 checks passed
@matiwinnetou matiwinnetou deleted the integration-tests-fixes branch October 29, 2025 08:34
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.

2 participants