Take only the tag from the googletest GIT_TAG line - #446
Closed
philipcraig wants to merge 1 commit into
Closed
philipcraig wants to merge 1 commit into
philipcraig wants to merge 1 commit into
Conversation
The sandbox image passed the whole rest of the GIT_TAG line to git clone --branch, so a CRLF checkout, a trailing comment or a second GIT_TAG line made the clone fail with "Remote branch not found". The sed expression now captures the tag alone, accepts tab indentation and stops at the first match. Part of #445.
Collaborator
Author
philipcraig
added a commit
that referenced
this pull request
Sep 20, 2026
Closes #441. Closes #445. - `scripts/agentic-sandbox.py` labels the image with a hash of its inputs and prints a one-line hint to pass `--rebuild-docker` when the hash no longer matches. It never rebuilds on its own. An image with no label, such as one built before #392, counts as stale. - The inputs are `docker/Dockerfile`, `.bazelversion`, `MODULE.bazel`, `MODULE.bazel.lock`, `pyproject.toml`, `uv.lock` and the googletest `GIT_TAG` in `CMakeLists.txt`. Only the tag is hashed from `CMakeLists.txt`, so adding a test does not raise the hint. - The `bazel fetch` layer mounts only the files that define the graph, which need no sources. That removes `.dockerignore` and the whole-checkout mount, and an ordinary source edit no longer invalidates the layer. `BUILD.bazel` and `.bazelrc` are mounted but not hashed: a new dependency has to change `MODULE.bazel` as well. - `CONTRIBUTING.md` lists the inputs once, states the network fallback and the googletest exception, and the `.bazelversion` rule near the top now points there. - The Docker workflow drops `.dockerignore` from its `paths` filters. From #445: - The googletest clone takes only the tag from the first `GIT_TAG` line, so a CRLF checkout, a trailing comment or a second `GIT_TAG` line no longer breaks `git clone --branch`. This is the commit from #446. - The `bazel fetch` comment now says that any `CMakeLists.txt` edit re-clones googletest and re-runs the fetch, and notes the repository cache and output base the layer captures. - The two `.dockerignore` items are moot, because this PR deletes the file. --------- Co-authored-by: Jonathan B. Coe <jonathanbcoe@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #445.
docker/Dockerfilepassed the whole rest of theGIT_TAGline togit clone --branch. A CRLF checkout, a trailing# commentor a secondGIT_TAGline made the clone fail with "Remote branch not found".sedexpression now captures the tag alone, accepts tab indentation, ignores a longer keyword such asGIT_TAGGED, and stops at the first match, so it needs no pipe tohead..dockerignore#445 overlaps Tell contributors when the sandbox image is stale #444, which deletes.dockerignoreand rewrites thebazel fetchcomment. This change touches neither, so the two merge cleanly in either order.