Skip to content

[ML] Prefetch Docker image with retry before running aarch64 tests - #3176

Merged
edsavage merged 2 commits into
elastic:mainfrom
edsavage:fix/prefetch-docker-image-before-test-run
Sep 3, 2026
Merged

[ML] Prefetch Docker image with retry before running aarch64 tests#3176
edsavage merged 2 commits into
elastic:mainfrom
edsavage:fix/prefetch-docker-image-before-test-run

Conversation

@edsavage

@edsavage edsavage commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The Linux aarch64 test step in CI pulls docker.elastic.co/ml-dev/ml-linux-aarch64-native-build implicitly via docker run. A transient 503 from the Docker registry causes the step to fail immediately with exit code 125, requiring a full manual retry — including re-downloading the 458MB test bundle.

This PR reuses the existing prefetch_docker_image function from dev-tools/docker/prefetch_docker_image.sh, which retries docker pull up to 5 times before giving up. The build step (build.sh) already uses this function (via prefetch_docker_base_image) — this brings the test step into line.

All other CI scripts that use docker run with registry-pulled images already call prefetch_docker_image (via dev-tools/docker_build.sh, docker_test.sh, docker_check_style.sh). run_tests.sh was the only gap.

Test plan

  • Snapshot build CI passes

Relates to: https://buildkite.com/elastic/ml-cpp-snapshot-builds/builds/7014#01a05d5a-cf70-4c7a-b556-ae172e0a2bd7

Reuses the existing prefetch_docker_image function from
dev-tools/docker/prefetch_docker_image.sh (up to 5 retries) before the
docker run in the Linux aarch64 test step. Without this, a transient
503 from docker.elastic.co causes the test step to fail immediately,
requiring a full manual retry including re-downloading the 458MB test
bundle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@edsavage edsavage added auto-backport Automatically merge backport PRs when CI passes v9.4.0 v9.5.0 >build :ml labels Sep 2, 2026
@elasticsearchmachine

Copy link
Copy Markdown

Pinging @elastic/ml-core (Team:ML)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

There’s a small but concrete scripting convention inconsistency (source vs .) in the newly added lines that should be aligned with existing CI scripts.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR improves CI robustness for Linux aarch64 by prefetching the Docker image used for running tests, leveraging the existing retrying prefetch_docker_image helper to avoid transient registry failures causing immediate job failures.

Changes:

  • Source dev-tools/docker/prefetch_docker_image.sh in the aarch64 Docker test path.
  • Prefetch the aarch64 base image before docker run to apply pull retry logic.
File summaries
File Description
.buildkite/scripts/steps/run_tests.sh Prefetches the aarch64 Docker base image (with retries) prior to running tests in the container.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .buildkite/scripts/steps/run_tests.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.4
9.5

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

elastic-vault-github-plugin-prod Bot added a commit that referenced this pull request Sep 4, 2026
…3176) (#3178)

Reuses the existing prefetch_docker_image function from
dev-tools/docker/prefetch_docker_image.sh (up to 5 retries) before the
docker run in the Linux aarch64 test step. Without this, a transient
503 from docker.elastic.co causes the test step to fail immediately,
requiring a full manual retry including re-downloading the 458MB test
bundle.

(cherry picked from commit 70e830c)

Co-authored-by: Ed Savage <ed.savage@elastic.co>
elastic-vault-github-plugin-prod Bot added a commit that referenced this pull request Sep 4, 2026
…3176) (#3179)

Reuses the existing prefetch_docker_image function from
dev-tools/docker/prefetch_docker_image.sh (up to 5 retries) before the
docker run in the Linux aarch64 test step. Without this, a transient
503 from docker.elastic.co causes the test step to fail immediately,
requiring a full manual retry including re-downloading the 458MB test
bundle.

(cherry picked from commit 70e830c)

Co-authored-by: Ed Savage <ed.savage@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically merge backport PRs when CI passes >build :ml v9.4.7 v9.5.4 v9.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants