Skip to content

Optimize Docker Build on PR: add caching and build amd64 only - #1257

Merged
aantn merged 1 commit into
masterfrom
claude/optimize-docker-build-action-kaiWj
Dec 29, 2025
Merged

aantn merged 1 commit into
masterfrom
claude/optimize-docker-build-action-kaiWj

Conversation

@aantn

@aantn aantn commented Dec 29, 2025 •

Copy link
Copy Markdown
Collaborator

Before: 15m builds
Screenshot 2025-12-29 at 12 36 28

After: 3m builds
Screenshot 2025-12-29 at 12 21 51

- Add GitHub Actions cache (cache-from/cache-to type=gha) for Docker layers
- Build only linux/amd64 for PR builds (ARM64 builds on release)
- Update PR comments to clearly indicate amd64-only architecture

This should significantly reduce build times by:
1. Caching Docker layers between builds
2. Avoiding slow QEMU emulation for ARM64 builds

Signed-off-by: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 29, 2025 •

Copy link
Copy Markdown
Contributor

✅ Docker image ready for 134935b (built in 3m 35s)

⚠️ Warning: does not support ARM (ARM images are built on release only - not on every PR)

Use this tag to pull the image for testing.

📋 Copy commands

⚠️ Temporary images are deleted after 30 days. Copy to a permanent registry before using them:

gcloud auth configure-docker us-central1-docker.pkg.dev
docker pull us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes:134935b
docker tag us-central1-docker.pkg.dev/robusta-development/temporary-builds/holmes:134935b me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:134935b
docker push me-west1-docker.pkg.dev/robusta-development/development/holmes-dev:134935b

Patch Helm values in one line (choose the chart you use):

HolmesGPT chart:

helm upgrade --install holmesgpt ./helm/holmes \
  --set registry=me-west1-docker.pkg.dev/robusta-development/development \
  --set image=holmes-dev:134935b

Robusta wrapper chart:

helm upgrade --install robusta robusta/robusta \
  --reuse-values \
  --set holmes.registry=me-west1-docker.pkg.dev/robusta-development/development \
  --set holmes.image=holmes-dev:134935b

@coderabbitai

coderabbitai Bot commented Dec 29, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Modifies the GitHub Actions Docker workflow to restrict PR builds to x64-only architecture (removing ARM64 support), replaces build-args with GitHub Actions cache management (cache-from/cache-to), and adds messaging indicating x64-only scope with warnings that ARM images are unavailable in PR builds.

Changes

Cohort / File(s) Summary
Docker workflow configuration
.github/workflows/docker-dev-images.yaml
Restricts PR builds to linux/amd64 only (removes linux/arm64); switches cache strategy from build-args to cache-from/cache-to with type=gha, mode=max; adds "(x64 only)" labels and ARM-support warnings to PR comments; adds clarification comment on x64-only scope for speed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • arikalon1
  • moshemorad

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main changes: optimizing Docker builds by adding caching and restricting builds to amd64 only on PRs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c35e334 and 5b85fbf.

📒 Files selected for processing (1)
  • .github/workflows/docker-dev-images.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: build
  • GitHub Check: build (3.10)
  • GitHub Check: build (3.11)
  • GitHub Check: llm_evals
  • GitHub Check: build (3.12)
🔇 Additional comments (4)
.github/workflows/docker-dev-images.yaml (4)

118-118: LGTM!

Clear messaging to inform users about the x64-only build scope in PR builds.


175-186: LGTM!

The x64-only platform restriction and GHA caching are appropriate optimizations for PR builds. Non-fork PRs have the necessary permissions to both read and write to the GitHub Actions cache.


191-191: LGTM!

Consistent messaging in the build logs.


220-258: LGTM!

The ARM warning is prominently placed and clearly explains the limitation. Good user experience to inform developers upfront before they attempt to use the image on ARM infrastructure.

Comment thread .github/workflows/docker-dev-images.yaml
@github-actions

Copy link
Copy Markdown
Contributor

Results of HolmesGPT evals

  • ask_holmes: 7/7 test cases were successful, 0 regressions
Test suite Test case Status
ask 09_crashpod ✅
ask 101_loki_historical_logs_pod_deleted ✅
ask 12_job_crashing ✅
ask 162_get_runbooks ✅
ask 176_network_policy_blocking_traffic_no_runbooks ✅
ask 43_current_datetime_from_prompt ✅
ask 61_exact_match_counting ✅

Legend

  • ✅ the test was successful
  • :minus: the test was skipped
  • ⚠️ the test failed but is known to be flaky or known to fail
  • 🚧 the test had a setup failure (not a code regression)
  • 🔧 the test failed due to mock data issues (not a code regression)
  • 🚫 the test was throttled by API rate limits/overload
  • ❌ the test failed and should be fixed before merging the PR

@aantn
aantn enabled auto-merge (squash) December 29, 2025 10:37
@aantn
aantn merged commit 6222028 into master Dec 29, 2025
10 of 11 checks passed
@aantn
aantn deleted the claude/optimize-docker-build-action-kaiWj branch December 29, 2025 11:36
@coderabbitai coderabbitai Bot mentioned this pull request Feb 11, 2026
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