-
Notifications
You must be signed in to change notification settings - Fork 273
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
Make pull.without-history
work for Share project branches
#4301
Merged
Conversation
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
ChrisPenner
changed the title
Cp/squashed pull
Make Aug 31, 2023
pull.without-history
work for Share project branches
ChrisPenner
commented
Aug 31, 2023
mitchellwrosen
approved these changes
Sep 5, 2023
Looks like at least one of the transcripts does a pull.without-history and is failing because the share portion hasn't been deployed yet. Just a good reminder to deploy the share part first, then that should clear up 😄 |
ChrisPenner
force-pushed
the
cp/squashed-pull
branch
from
September 8, 2023 17:10
e5aff92
to
82951e3
Compare
ChrisPenner
force-pushed
the
cp/squashed-pull
branch
from
September 8, 2023 18:26
82951e3
to
11dc757
Compare
ChrisPenner
force-pushed
the
cp/squashed-pull
branch
from
September 8, 2023 19:27
b872cc6
to
fa05dd5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Pulling without history (i.e. a squashed version of a branch) is handy when you just need the code, but won't be contributing back. E.g. installing an executable.
Typically users will simply pull a release, which are already squashed, but the cloud team has requested the ability to do this with their main branch to speed up CI significantly.
This makes
pull.without-history
use a server-side squash rather than a local squash after pull so we can get away with pulling significantly less data and speed things up. Currently this is implemented only for project branches, not loose-code.Merge and deploy the server side first:
See server-side: https://github.com/unisoncomputing/enlil/pull/322
Implementation notes
When running
pull.without-history
to pull a remote branch, use the newincludeSquashed
flag to ask Share to include the squashed causal hash in the response (and to ensure it's available to download). Then use that squashed hash when downloading instead of the branch head.Interesting/controversial decisions
Optionally this could've been a new endpoint, but I think it's both sensible and simple to adapt the existing get branch endpoint.
Note: The squashed causal hash is always included on release downloads since those are already squashed, but it's the same as the branch-head in that case.
Test coverage
See the UCM session captured above.
Loose ends
Need to deploy the Share side before merging this.