Skip to content

ci: ignore Dockerfile comments when fingerprinting [bump:patch]#14

Merged
julian-goldstein merged 1 commit into
masterfrom
fingerprint-ignore-comments
Jun 19, 2026
Merged

ci: ignore Dockerfile comments when fingerprinting [bump:patch]#14
julian-goldstein merged 1 commit into
masterfrom
fingerprint-ignore-comments

Conversation

@julian-goldstein

Copy link
Copy Markdown
Contributor

Problem

detect fingerprints each from-source tool by hashing its whole Dockerfile plus the build-arg version vars. So a comment- or whitespace-only edit changes the hash and forces a full rebuild — e.g. the PROOF OF CONCEPTA fully-static… doc tweak in Dockerfile.qemu (already on master) makes the next release rebuild qemu on both arches despite zero build-relevant change. The fingerprint is meant to skip exactly these no-op rebuilds.

Not a correctness bug (it errs safe — never reuses a stale binary), but wasted CI: a comment typo could cost an hour of clang.

Fix

Normalise the Dockerfile before hashing: drop blank lines and line-leading comments, keep parser directives (# syntax=, # escape=) since those affect the build. Inline # is untouched (it's not a Dockerfile comment).

Verified locally (reproducing detect's logic vs v0.5)

  • clang/make/git/qemu → all reuse (qemu no longer forced to rebuild by the comment)
  • adding a real RUN … to Dockerfile.qemu → still rebuilds (safety preserved)
  • adding another comment → still reuses

Note

This touches vendor.yml, which is in the trigger paths, so merging cuts a release. Subject is [bump:patch], so it'll publish a patch (e.g. v0.6.1 after the demo's v0.6.0).

The change-detection fingerprint hashed the whole Dockerfile, so a comment- or
whitespace-only edit forced a full from-source rebuild (e.g. a one-word doc
tweak to Dockerfile.qemu would rebuild qemu on both arches). Normalise the
Dockerfile first: drop blank lines and line-leading comments, but keep parser
directives (# syntax=, # escape=) which do affect the build. Inline '#' is left
intact since it is not a Dockerfile comment. Real instruction changes still
rebuild.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@julian-goldstein julian-goldstein added this pull request to the merge queue Jun 19, 2026
Merged via the queue into master with commit c68a5e1 Jun 19, 2026
1 check passed
@julian-goldstein julian-goldstein deleted the fingerprint-ignore-comments branch June 19, 2026 18:47
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