spring-projects / spring-projects/spring-batch

Slow Docker-based integration tests due to emulation

Open
#4,828 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: build type: enhancement
Dominant language
Java
Stars
3k
Forks
2.5k
Avg merge
6d 53m
Merged PRs (30d)
3

Description

This issue is to find the best way to test DB2 and SQLServer job repository support without impacting the build performance due to the following warnings:

[INFO] Running org.springframework.batch.core.test.repository.Db2JobRepositoryIntegrationTests
[main] INFO tc.icr.io/db2_community/db2:11.5.9.0 - Creating container for image: icr.io/db2_community/db2:11.5.9.0
[main] INFO org.testcontainers.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for icr.io
[main] INFO tc.icr.io/db2_community/db2:11.5.9.0 - Container icr.io/db2_community/db2:11.5.9.0 is starting: c1ec17e0e6a8a3c1f14086528b766bd3bbd2695e3ed3fb36e9ad8168437c7739
[main] WARN tc.icr.io/db2_community/db2:11.5.9.0 - The architecture 'amd64' for image 'icr.io/db2_community/db2:11.5.9.0' (ID sha256:dee45baf523a6261bc8837574f37568b0f81c727d36f2076cd89d94b31deda8e) does not match the Docker server architecture 'arm64'. This will cause the container to execute much more slowly due to emulation and may lead to timeout failures.

And

[INFO] Running org.springframework.batch.core.test.repository.SQLServerJobRepositoryIntegrationTests
[main] INFO tc.mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04 - Creating container for image: mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
[main] INFO org.testcontainers.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for mcr.microsoft.com
[main] INFO tc.mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04 - Container mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04 is starting: 230927f77d014b29fc444395c10f347f77a2d66b36893307d5e3c0617a34c206
[main] WARN tc.mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04 - The architecture 'amd64' for image 'mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04' (ID sha256:004f8fbb046cd906f39ce3042e0ade32760907acc60a5acc8bfe2c3623c72937) does not match the Docker server architecture 'arm64'. This will cause the container to execute much more slowly due to emulation and may lead to timeout failures.
[main] INFO tc.mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04 - Waiting for database connection to become available at jdbc:sqlserver://localhost:49181 using query 'SELECT 1'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Db2JobRepositoryIntegrationTests and SQLServerJobRepositoryIntegrationTests, then inspect how their Docker-based database containers are configured and where the amd64-versus-arm64 warnings occur. Done means finding a way to test DB2 and SQLServer job repository support without materially slowing the build through emulation or causing timeout failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, sql
Domain
databases, devops, testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.