Skip to content

Check out the commit a pinned binding asks the refresh to derive from - #85

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/refresh-binding-checkout-non-branch-ref
Aug 23, 2026
Merged

Check out the commit a pinned binding asks the refresh to derive from#85
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/refresh-binding-checkout-non-branch-ref

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

resolve_repo clones a sibling repository at the ref the caller names. git clone --branch
accepts a branch or a tag, so a commit SHA fails that clone and falls through to the full clone
of the fallback, which lands on the default branch. The fallback checks the ref out, as the
--branch clone it stands in for does.

Without that checkout the sibling sits on master's tip while the step announces the commit it is
given:

==> Resolving MobilityDB @ 6c550dc851d98f86f6de3451ca6ab6970c42fe1e (MEOS-API ...)
==> Deriving the catalog from MobilityDB cb041e3dd41f5150cd1436970a8e41bf23177f6c (-DALL=ON, build-libmeos=false)

A binding that pins reaches this path on its first run in a fresh work dir. MobilityDuck sets
MDB_REF from _MEOS_REF in vcpkg_ports/meos/portfile.cmake precisely so that the catalog and
the libmeos a build links come from one recorded commit, and a catalog derived from the tip
instead carries the mismatch the pin exists to prevent — silently, since a surface generated from
a newer master still compiles against an older library. The re-run branch of the same function
fetches the ref and checks out FETCH_HEAD, so the gap is confined to a work dir that holds no
clone yet.

Run against this repository with a commit SHA that is not the tip, the fallback clone alone
leaves HEAD at 90b9899f9 for a request of aa5734e79; with the checkout, HEAD is aa5734e79.
A branch ref takes the shallow --branch clone and is untouched by this change.

resolve_repo clones a sibling at the ref the caller names, and `git clone
--branch` takes a branch or a tag, so a commit SHA falls through to the full
clone the fallback provides. That clone lands on the default branch, and
nothing moved it onto the ref afterwards, so the refresh derived from master's
tip while announcing the commit it had been given.

A binding that pins reaches this path on every first run: MobilityDuck sets
MDB_REF from `_MEOS_REF` in its vcpkg portfile precisely so that the catalog
and the libmeos a build links come from one recorded commit, and deriving from
the tip instead reintroduces the mismatch the pin exists to prevent. The
re-run branch of the same function is unaffected, which is why the defect only
shows on a work dir that has no clone yet.

The fallback now checks the ref out, as the --branch clone it stands in for
already does.
@estebanzimanyi
estebanzimanyi merged commit 322dd76 into MobilityDB:master Aug 23, 2026
1 check passed
@estebanzimanyi
estebanzimanyi deleted the fix/refresh-binding-checkout-non-branch-ref branch August 23, 2026 02:08
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