Skip to content

fix: ignore local cache directories in go docker context#1978

Merged
EItanya merged 1 commit into
mainfrom
fix-dockerignore-local-cache
Jun 8, 2026
Merged

fix: ignore local cache directories in go docker context#1978
EItanya merged 1 commit into
mainfrom
fix-dockerignore-local-cache

Conversation

@EItanya

@EItanya EItanya commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Ignore local .cache directories in the Go Docker build context
  • Prevent agent/tool-created Go caches from invalidating Docker COPY layers

Verification

  • Ran make build-controller DOCKER_BUILD_ARGS='--progress=plain --platform linux/amd64 --output type=cacheonly' twice
  • Confirmed the second run reused cached Dockerfile layers, including the Go compile step

Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Copilot AI review requested due to automatic review settings June 8, 2026 13:27
@EItanya EItanya requested review from ilackarms and yuval-k as code owners June 8, 2026 13:27
@github-actions github-actions Bot added the bug Something isn't working label Jun 8, 2026

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.

Pull request overview

This PR updates the Go module’s Docker build context exclusions to prevent locally generated .cache directories from invalidating Docker COPY layers and forcing unnecessary rebuilds.

Changes:

  • Add ignore patterns for .cache/ directories to go/.dockerignore.
  • Minor formatting normalization for the Makefile entry in go/.dockerignore.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@EItanya EItanya merged commit 37cc7d5 into main Jun 8, 2026
25 checks passed
@EItanya EItanya deleted the fix-dockerignore-local-cache branch June 8, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants