Change project-cone-sync to not dump projects outside of the cone.#60465
Merged
CyrusNajmabadi merged 5 commits intodotnet:main-vs-depsfrom Apr 1, 2022
Merged
Change project-cone-sync to not dump projects outside of the cone.#60465CyrusNajmabadi merged 5 commits intodotnet:main-vs-depsfrom
CyrusNajmabadi merged 5 commits intodotnet:main-vs-depsfrom
Conversation
ryzngard
approved these changes
Mar 29, 2022
Contributor
ryzngard
left a comment
There was a problem hiding this comment.
I can't comment on if this is the direction we want to go, but can comment that the code does what is described 👍
Worth another set of eyes
Contributor
Author
|
@jasonmalinowski ready for review. |
Contributor
|
Re-targeting from |
Contributor
Author
|
Ping @jasonmalinowski |
jasonmalinowski
approved these changes
Apr 1, 2022
| // if it's a project that's specifically in the sync'ed cone, include this checksum so that | ||
| // this project definitely syncs over. | ||
| if (t.mustCompute) | ||
| return await t.state.GetChecksumAsync(cancellationToken).ConfigureAwait(false); |
Member
There was a problem hiding this comment.
Small allocation nit: you could remove the await here and make the other returns be a Task.FromResult.
| Assert.Equal(2, project2SyncedSolution.Projects.Count()); | ||
| AssertEx.SetEqual(new[] { project2.Name, project3.Name }, project2SyncedSolution.Projects.Select(p => p.Name)); | ||
|
|
||
| // if we then sync just P1, we should have 3 projects synved over now. |
Member
There was a problem hiding this comment.
Suggested change
| // if we then sync just P1, we should have 3 projects synved over now. | |
| // if we then sync just P1, we should have 3 projects synced over now. |
This file contains hidden or 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
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.
The prior way we did project-cone syncing was to only include the checksums for the project (and dependents) in the total checksum we sent over. This had the problem that on the OOP side all other projects would get dumped (including all the project trackers and whatnot) losing all that information we had. If another OOP request was made for the full solution, we'd have to go generate those again.
The new approach here works subtly different. When syncing a project-cone, we ensure that we only get the up to date checksum for that project (and it's dependents). For any other projects, instead of dropping them, we include the most recently computed checksum for it so that we keep what we have on the OOP side once sync'ed over.