Skip to content

Fix remote build context identity and preserve hard-linked files - #129

Merged
Dingway98 merged 1 commit into
mainfrom
fix/harbor-image-builds
Sep 26, 2026
Merged

Dingway98 merged 1 commit into
mainfrom
fix/harbor-image-builds

Conversation

@Dingway98

@Dingway98 Dingway98 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Changes

Validation

  • ruff check
  • pytest

Note

Medium Risk
Changes remote build context packaging and identity semantics (hard links, hashing); incorrect fingerprint behavior could cause false cache hits or unnecessary build failures, though extensive tests cover the contract.

Overview
Adds cacheable remote Dockerfile builds via a stable context fingerprint and a pre-upload consistency check.

Callers can compute docker_build_context_fingerprint from hyperbrowser.build_context (same Dockerfile/ignore/sparse-vs-full rules as packaging, without staging or compressing the tree) and pass it as expected_context_fingerprint on remote build_image_from_dockerfile. Packaging recomputes the fingerprint from the bytes actually archived; a mismatch raises DockerBuildContextChangedError before any build API call. Local builds reject the parameter with remote=True required.

Context archiving now builds normalized tar metadata with lstat-based entries and hashes file contents as they are written, so hard-linked paths stay distinct and identity ignores mtime/compression. SandboxImageSummary gains optional ready (separate from uploaded) for backward-compatible image listing.

Reviewed by Cursor Bugbot for commit 7e02540. Bugbot is set up for automated code reviews on this repo. Configure here.

@Dingway98
Dingway98 added this pull request to the merge queue Sep 26, 2026
@Dingway98
Dingway98 removed this pull request from the merge queue due to a manual request Sep 26, 2026
@Dingway98
Dingway98 merged commit 0f820e3 into main Sep 26, 2026
13 checks passed
@Dingway98
Dingway98 deleted the fix/harbor-image-builds branch September 26, 2026 21:03
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.

2 participants