Make Copybara source mirrors resolve historical GitOrigin-RevId commits

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • DevProd Build
    • Fully Compatible
    • ALL
    • Build OnDeck
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Problem

      Copybara syncs intermittently fail when the destination's GitOrigin-RevId points at a valid historical commit that is present in the local source mirror but is not advertised by any ref. Copybara invokes git ls-remote for the raw SHA, so it reports that the commit cannot be found.

      Root Cause

      The local bare source mirror is populated with repository history, but historical source commits are not exposed as refs. Git's ls-remote protocol does not resolve an unadvertised object by raw SHA.

      Fix

      Advertise the baseline and pending source commits under deterministic refs in the local mirror before Copybara resolves them. This preserves the mirror while making every commit needed by the sync resolvable through the normal Git ref-discovery path.

      Validation

      Added unit coverage for the real bare-mirror ref advertisement and for the pending-commit integration path. The focused tests and the full sync_copybara test module pass.

      Related build failure: BF-45133.

            Assignee:
            Daniel Moody
            Reporter:
            Daniel Moody
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: