Skip to content

fix(docker): keep git metadata in build context - #164

Open
panos-xyz wants to merge 1 commit into
mainfrom
codex/fix-docker-vergen-git-metadata
Open

fix(docker): keep git metadata in build context#164
panos-xyz wants to merge 1 commit into
mainfrom
codex/fix-docker-vergen-git-metadata

Conversation

@panos-xyz

@panos-xyz panos-xyz commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • stop excluding .git from the Docker build context
  • allow vergen-git2 in crates/node/build.rs to discover repository metadata
  • preserve the real commit SHA and version metadata in Docker-built binaries

Without .git, VERGEN_GIT_SHA and related variables are absent and the Docker build fails with Error: NotPresent.

Validation

  • reproduced the failure with a minimal Docker context probe: COPY .git was rejected by .dockerignore
  • verified the probe passes after the change
  • built the real builder image with Docker on linux/arm64 using the profiling profile
  • ran morph-reth --version in the image and verified its commit SHA matches the branch commit
  • cargo fmt --all -- --check
  • cargo test --all --locked

This PR is intentionally limited to the Docker metadata fix and contains no issue #152 diagnostic changes.

Summary by CodeRabbit

  • Chores
    • Updated build configuration to retain Git metadata during container builds.
    • Added documentation explaining that Git information is used to include version details.

@claude claude 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.

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5427b335-1019-499b-8325-3bad1437ce76

📥 Commits

Reviewing files that changed from the base of the PR and between 7db29dd and 91a7452.

📒 Files selected for processing (1)
  • .dockerignore

📝 Walkthrough

Walkthrough

The Docker build context now includes .git/. Comments document that vergen-git2 uses Git metadata to embed version information and related environment variables.

Changes

Docker build metadata

Layer / File(s) Summary
Preserve Git metadata
.dockerignore
The .git/ ignore rule was removed. Comments document the build-time Git metadata requirement for vergen-git2.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 91a74

This localized Docker build-context change preserves repository metadata so binaries retain the correct commit information, with the reported validation passing; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: retaining Git metadata in the Docker build context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-docker-vergen-git-metadata

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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.

1 participant