Skip to content

Skip mirrors for relative submodule URLs - #4276

Open
davido wants to merge 1 commit into
buildkite:mainfrom
davido:issue-2815-minimal-relative-submodule-mirror-fallback
Open

Skip mirrors for relative submodule URLs#4276
davido wants to merge 1 commit into
buildkite:mainfrom
davido:issue-2815-minimal-relative-submodule-mirror-fallback

Conversation

@davido

@davido davido commented Aug 27, 2026

Copy link
Copy Markdown

Submodule URLs from .gitmodules may be relative to the superproject remote. The mirror checkout path currently reads those raw values and runs from the mirror cache directory, where ../java-prettify is treated as a local filesystem path instead of resolving against the superproject remote.

Skip only the mirror optimization for relative submodule URLs and let git submodule update resolve them with Git's normal semantics. Absolute submodule URLs still use mirrors.

Add regression tests that fail on the current behavior by observing the attempted mirror clone of ../java-prettify, and pass once that relative URL falls back to the normal submodule update path.

Refs bazelbuild/continuous-integration#2815.

Description

Context

Changes

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go tool gofumpt -extra -w .)

Affiliation (optional, external contributors)

Disclosures / Credits

Submodule URLs from .gitmodules may be relative to the superproject
remote. The mirror checkout path currently reads those raw values and
runs from the mirror cache directory, where ../java-prettify is treated
as a local filesystem path instead of resolving against the superproject
remote.

Skip only the mirror optimization for relative submodule URLs and let
git submodule update resolve them with Git's normal semantics. Absolute
submodule URLs still use mirrors.

Add regression tests that fail on the current behavior by observing
the attempted mirror clone of ../java-prettify, and pass once that
relative URL falls back to the normal submodule update path.

Closes buildkite#4282.
Refs bazelbuild/continuous-integration#2815.
@davido
davido force-pushed the issue-2815-minimal-relative-submodule-mirror-fallback branch from 43888b3 to f45afa8 Compare August 28, 2026 11:04
@swebb

swebb commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for opening this PR @davido. I’ve created a ticket to track it internally.

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