-
Notifications
You must be signed in to change notification settings - Fork 115
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
Repository.show()
returns wrong file contents to GHPRI extension
#121
Comments
I cannot reproduce this in desktop, but am seeing some very fishy behavior in web: This pull request only contains one commit, |
That error message comes from: https://github.com/microsoft/vscode-pull-request-github/blob/dae6028f027a7500be09045b5f2b6294d7f0355a/src/view/gitContentProvider.ts#L54-L58 The message is a bit misleading since there is no 'local' repository when running in web. There's two mysteries here:
|
Now I also see the LHS of the first diff coming back empty for other PRs like https://github.dev/dotnet/roslyn/pull/57667 |
Yes, I'm pretty sure that's what this is. I have an issue for it so I'll try to fix it today: microsoft/vscode-pull-request-github#3242. This notification occurs when you refresh a tab with a PR in it and the diff editor tries to restore. Because there's a race, we don't have the required information yet to restore. I don't think this message is related since the inputs I could see going into I could repro the left hand being empty or wrong for many PRs. |
When I test this scenario the commit in the error the message is the commit of the "into" branch, which is correct. |
Worth clarifying: when this happens it is not only the first diff, it is all diffs in the PR. I've added the following log line:
right before calling
All the arguments for this look correct to me. I am kicking off a new pre-release build of GHPRI with this logging + the fix for microsoft/vscode-pull-request-github#3242. |
If I sign out of GitHub for all extensions and then reload the page, I'm still seeing the LHS open completely empty and the error about not being able to find an open repository locally, with GHPRI v0.37.2022021409. When that happens, this is what the GHPRI log says:
Then when I reload the page again, I am already signed in, now I see a diff view with no changes, but only for the first file that is opened in the diff editor. All subsequent changed files do have the right contents, and additionally closing and reopening the first diff results in the right contents being shown...
and (truncated for length) RemoteHub logs are:
|
I was able to repro in vscode.dev and insiders.vscode.dev earlier today, but the repro is flaky and I can't repro anymore in insiders.vscode.dev. I still cannot repro this at all in the extension development host. I have added some debug logging in RemoteHub to continue to gather information. |
@alexdima has also run into this with pressing "." on https://github.com/microsoft/vscode/pull/145293/files. I was also able to repro with those steps. Interestingly, the first diff actually opens ok there, but subsequent diffs do not. |
I very often see no diff when I click on a change in a PR in github.dev, but it seems quite random only for some files of the PR, not all. |
Closing as duplicate of #177 which should be resolved in the latest pre-release of RemoteHub. |
In the latest RemoteHub pre-release, https://insiders.vscode.dev/github/microsoft/vscode/pull/142606 turns up no diff on the first try, then an empty LHS on the second try.
The text was updated successfully, but these errors were encountered: