Improve dev UX for synchronizing the vmr when local changes have not been pushed to remote
See original GitHub issueSteps to Reproduce:
- Make source-build change in installer and commit.
- Run vmr-sync.sh e.g.
./eng/vmr-sync.sh -t ../tmp/ -v ../dotnet
Results: Failure
fail: Failed to synchronize repo installer
Required dependency file 'eng/Version.Details.xml' in repository 'dotnet/installer' branch 'cea92f3626c016b4141a961465594db0b9a5efe2' was not found..
dbug: Microsoft.DotNet.DarcLib.DependencyFileNotFoundException: Required dependency file 'eng/Version.Details.xml' in repository 'dotnet/installer' branch 'cea92f3626c016b4141a961465594db0b9a5efe2' was not found.
---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at Microsoft.DotNet.DarcLib.HttpRequestManager.ExecuteAsync(Int32 retryCount)
at Microsoft.DotNet.DarcLib.GitHubClient.ExecuteRemoteGitCommandAsync(HttpMethod method, String requestUri, ILogger logger, String body, String versionOverride, Int32 retryCount, Boolean logFailure)
at Microsoft.DotNet.DarcLib.GitHubClient.GetFileContentsAsync(String owner, String repo, String filePath, String branch)
--- End of inner exception stack trace ---
at Microsoft.DotNet.DarcLib.GitHubClient.GetFileContentsAsync(String owner, String repo, String filePath, String branch)
at Microsoft.DotNet.DarcLib.GitHubClient.GetFileContentsAsync(String filePath, String repoUri, String branch)
at Microsoft.DotNet.DarcLib.GitFileManager.ReadXmlFileAsync(String filePath, String repoUri, String branch)
at Microsoft.DotNet.DarcLib.GitFileManager.ReadVersionDetailsXmlAsync(String repoUri, String branch)
at Microsoft.DotNet.DarcLib.GitFileManager.ParseVersionDetailsXmlAsync(String repoUri, String branch, Boolean includePinned)
at Microsoft.DotNet.DarcLib.VirtualMonoRepo.VmrManagerBase.GetRepoDependencies(String remoteRepoUri, String commitSha)
at Microsoft.DotNet.DarcLib.VirtualMonoRepo.VmrManagerBase.GetAllDependencies(VmrDependencyUpdate root, CancellationToken cancellationToken)
at Microsoft.DotNet.DarcLib.VirtualMonoRepo.VmrUpdater.UpdateRepositoryRecursively(VmrDependencyUpdate rootUpdate, Boolean noSquash, CancellationToken cancellationToken)
at Microsoft.DotNet.Darc.Operations.VirtualMonoRepo.UpdateOperation.ExecuteInternalAsync(IVmrUpdater vmrManager, SourceMapping mapping, String targetRevision, CancellationToken cancellationToken)
at Microsoft.DotNet.Darc.Operations.VirtualMonoRepo.VmrOperationBase`1.ExecuteAsync(TVmrManager vmrManager, SourceMapping mapping, String targetRevision, CancellationToken cancellationToken)
Expected results:
Preferred: the vmr-sync process would support local changes. MVP: the vmr-sync process would give an explicit error message indicating local changes were not pushed.
Note:
I realize the script assumes the following:
The following scenario is assumed:
- There is a PR in dotnet/installer
- The PR is failing on the ‘VMR Source-Build’ job in the ‘Synchronize dotnet/dotnet’ step
I am asking for broader support to better support dev workflows.
Issue Analytics
- State:
- Created 9 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Sync local git repo with remote in one shot discarding ...
I have many local changes, stashed changes, and few commits which are not yet pushed to remote. One way can be to remove...
Read more >Better UI/UX to push code to remote dev host · Issue #2533
As a user I would like to have a better set of features to push my local sources/change to remote host. To put...
Read more >How I Messed Up Our Repo and Ideas for Improving Git UX
“simple” gives a nice error message when you try to git push on a branch that isn't tracking a remote branch: fatal: The...
Read more >How do I “git pull” and overwrite my local changes? - Koukia
So here is what you can do about it: WARNING: If you have any local commits or uncommitted changes, they will be gone...
Read more >Chapter 29 Pull, but you have local work
29 Pull, but you have local work. Problem: You want to pull changes from upstream, but you have done some new work locally...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MichaelSimons this should work now. I have still one more thing to improve but the issue itself is fixed.
@MichaelSimons I just had another idea - I could actually call this
vmr-sync.sh
script to update the local VMR during the CI too because we need to pull changes there the same way. We will then get coverage for this script for free.