Skip to content

Relax Testcontainers image pull timeouts - #12777

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits into
masterfrom
alexeyk/relax-testcontainers-pull-timeouts
Oct 9, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits into
masterfrom
alexeyk/relax-testcontainers-pull-timeouts

Conversation

@AlexeyKuznetsov-DD

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Relax Testcontainers image-pull defaults in the shared test convention:

Setting Testcontainers 1.21.4 default Proposed default
TESTCONTAINERS_PULL_TIMEOUT 120 seconds 240 seconds
TESTCONTAINERS_PULL_PAUSE_TIMEOUT 30 seconds 60 seconds

The defaults apply to all Test tasks using this convention, including forked and latest-dependency suites. putIfAbsent preserves explicit environment overrides. Container startup/readiness timeouts are unchanged.

This is an unproven mitigation attempt, not a root-cause fix. The intent is to give temporarily stalled image pulls more time to recover; we hope this reduces failures, but the observed CI stall has not been reproduced locally.

Motivation

CouchbaseClient31V0Test failed during image fetching, before container creation or Couchbase initialization. The test report showed repeated Docker image pull has not made progress in 30s - aborting pull messages, followed by exhaustion of the image-pull retry window. A SQL Server test in the same run failed with the same image-fetch timeout chain, supporting a shared runner/registry issue rather than a Couchbase-specific startup regression.

Precedent: #12723 retries an IOException during Couchbase node renaming after container startup begins. This failure occurs earlier, so that retry cannot address it. That PR changed neither image-pull timeout; this investigation found no evidence that it introduced the reported failure. The evidence also does not establish whether the original node-renaming race is fully resolved.

Also I noticed that OracleContainer very close to default 120s timeout, so better to have more time.

Additional Notes

Concrete failure evidence, with the registry reference omitted:

CouchbaseClient31V0Test > initializationError
ContainerLaunchException: Container startup failed
Caused by: ContainerFetchException: Can't get Docker image
Caused by: ConditionTimeoutException: ... was not fulfilled within 2 minutes.

Docker image pull has not made progress in 30s - aborting pull
Retrying pull for image: ... (83s remaining)
Docker image pull has not made progress in 30s - aborting pull
Retrying pull for image: ... (39s remaining)
Docker image pull has not made progress in 30s - aborting pull
Retrying pull for image: ... (-15s remaining)

The pause timeout is an inactivity watchdog: Docker download/extraction progress updates reset it. When it expires, Testcontainers interrupts that pull and retries internally while its overall retry window allows, before the test fails and Develocity retries the test. The total timeout is a retry window, not a strict wall-clock cap: an active attempt can run beyond it. These settings do not guarantee a fixed number of retries.

The test passed on a Develocity retry. That is consistent with a transient stall, but does not prove that relaxing either timeout fixes it. The registry may have recovered, or Docker may have reused layers downloaded during the failed attempt. Docker daemon/pull-progress evidence is needed to distinguish slow progress from a permanently stuck pull. Longer timeouts also delay reporting genuine pull failures.

Validation: the four shared Couchbase retry unit tests and the Couchbase 3.1/3.2 V0 latest-dependency suites (10 and 12 tests) passed locally with the shared convention. This exercises normal container startup and tracing; it does not reproduce or prove recovery from the CI image-pull stall.

./gradlew :dd-java-agent:instrumentation:couchbase:couchbase-3-common:test \
  :dd-java-agent:instrumentation:couchbase:couchbase-3.1:latestDepTest --tests CouchbaseClient31V0Test \
  :dd-java-agent:instrumentation:couchbase:couchbase-3.2:latestDepTest --tests CouchbaseClient32V0Test

Contributor Checklist

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added type: bug fix Bug fix comp: testing Testing tag: no release notes Changes to exclude from release notes tag: ai generated Largely based on code generated by an AI or LLM labels Oct 7, 2026
@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 59.35% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 88d725d | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.78 s 14.67 s [-0.0%; +1.5%] (no difference)
startup:insecure-bank:tracing:Agent 13.53 s 13.67 s [-1.9%; -0.1%] (maybe better)
startup:petclinic:appsec:Agent 17.80 s 17.52 s [+0.7%; +2.5%] (maybe worse)
startup:petclinic:iast:Agent 17.41 s 17.50 s [-1.2%; +0.2%] (no difference)
startup:petclinic:profiling:Agent 17.36 s 17.15 s [-0.0%; +2.4%] (no difference)
startup:petclinic:sca:Agent 17.70 s 17.64 s [-0.5%; +1.2%] (no difference)
startup:petclinic:tracing:Agent 16.50 s 16.69 s [-2.1%; -0.2%] (maybe better)

Commit: 88d725d2 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD marked this pull request as ready for review October 9, 2026 17:27
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested a review from a team as a code owner October 9, 2026 17:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T17:31:36.090201Z c8fc514 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-09T17:29:58.452864Z c8fc514 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8fc514cbe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread buildSrc/src/main/kotlin/dd-trace-java.configure-tests.gradle.kts Outdated
Comment thread buildSrc/src/main/kotlin/dd-trace-java.configure-tests.gradle.kts Outdated

@datadog-prod-us1-6 datadog-prod-us1-6 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The longer image-pull defaults preserve inherited environment overrides. Recovery from the reported CI image-pull stall remains unproven.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit c8fc514

@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested a review from a team as a code owner October 9, 2026 18:06
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested review from erikayasuda and removed request for a team October 9, 2026 18:06

@datadog-prod-us1-6 datadog-prod-us1-6 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The timeout variables are correctly configured in GitLab’s shared test-job template, targeting CI image pulls. Recovery from the reported image-pull stall remains unproven.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 88d725d

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge -f --reason "No need to run MQ, since it is CI change only, validated in PR"

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-09 19:10:59 UTC ℹ️ Start processing command /merge -f --reason "No need to run MQ, since it is CI change only, validated in PR"


2026-10-09 19:11:03 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 0s (p90).


2026-10-09 19:11:13 UTC ℹ️ MergeQueue: This merge request was merged

Warning

This change was merged without running any pre merge CI checks

Reason: No need to run MQ, since it is CI change only, validated in PR

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 9ddc963 into master Oct 9, 2026
609 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the alexeyk/relax-testcontainers-pull-timeouts branch October 9, 2026 19:11
@github-actions github-actions Bot added this to the 1.68.0 milestone Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: testing Testing tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants