Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix finding local-versions when on a lane #6519

Merged
merged 5 commits into from
Oct 4, 2022
Merged

Conversation

davidfirst
Copy link
Member

@davidfirst davidfirst commented Oct 4, 2022

Until now, it was done by traversing the local and remote snaps. The “remote-head” was the head on the remote-lane, and if not-exist (the component is new on this lane), it’s the remote-head of main.
The issue with this is that sometimes we get incorrect results. In case of merging lane-a into lane-b, and a new component introduced as part of the merge to lane-b, all the history of this component of lane-a is considered local. Because this history is considered local, bit-reset removes it unexpectedly.
Another issue is the export performance. We send way too many objects unnecessarily. Especially when lane-a is merged into lane-b, both on the same scope and lane-a has tons of snaps that were already exported.

This PR fixes it by searching all remote-refs files (of lanes only, not main) for a component and during the local history traversal, if a hash is found there, it'll stop the traversal and not mark it as local.

For export, if exporting a lane to a new scope, then, we need all history from original component-scope. however, the history might already been there from previous snaps. to check this, we find all remote-refs of the same scope as the current lane and search for the hashes to stop the traversal.

@davidfirst davidfirst enabled auto-merge (squash) October 4, 2022 20:49
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.

None yet

2 participants