-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix import of unroundtripable git commit
Summary: By unroundtripable, we mean: given a git commit, the bonsai generated from it doesn't contain enough information to produce the exact same commit back when deriving the git commit from the bonsai. Here is the faulty sequence: * Update bonsai git mappings with the imported commits * `derive_bulk`, by contract attempts to derive these commits again * When `derive_bulk` is done, it attempts to update the bonsai git mappings (as they are the mapping for the "git_commits" derived data type) * There is a conflict between the imported and the derived commits, so this update fails To fix the issue, we must never call `derive_bulk` for git commits. Instead, * First derive all types but git commits and delta manifests (which depend on git commits) * Then update the mappings. This replaces deriving the git commits * Finally, derive delta manifests, which depend on git commits, but see them as "already derived" since they were imported and the mappings exist There is still an open issue after this: If the git_delta_manifests derivation fails and someone reruns the import, we will see that the mappings exists and proceed without deriving the delta manifests. This will be patched separately. Reviewed By: gustavoavena Differential Revision: D54905694 fbshipit-source-id: f5b68c25a08fd1ee0df6b222ad61cd34c9f8de37
- Loading branch information
1 parent
d542a90
commit a431fab
Showing
2 changed files
with
58 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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