vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Empty github dropdowns were seen...

Open greazer opened this issue 3 years ago • 1 comments

Testing #3761

  1. Installed the pre-release version of this extension into insiders.
  2. I opened a workspace connected to an existing repo.
  3. created a branch
  4. made some changes and committed them
  5. published the branch to github.

When trying to create a new pull request using this extension, none of the dropdowns populated. They were blank:

image

Waiting and clicking later didn't help. Nor did creating yet another branch.

After reloading VS Code it all seemed to start working as documented. I did not have the extension installed prior to starting this repro scenario, perhaps this is a key point?

greazer avatar Jul 26 '22 20:07 greazer

@greazer I'm not able to reproduce this issue. I tried uninstalling and reinstalling the extension. If you see it again can you share the output from GitHub Pull Request?

alexr00 avatar Jul 28 '22 11:07 alexr00

getting this issue too

airtonix avatar Sep 26 '22 00:09 airtonix

image

Same thing here. Here is the output:

[Info] Registering git provider
[Info] Looking for git repository
[Info] Found 1 repositories during activation
[Info] Git repository found, initializing review manager and pr tree view.
[Info] Review> Validate state in progress
[Info] Review> Validating state...
[Info] Found GitHub remote
[Info] Review> no matching pull request metadata found for current branch internal-commands
[Info] Review> no matching pull request metadata found on GitHub for current branch internal-commands
[Info] PullRequestTree> Removing PR #undefined from tree

Note that this happens on a GitHub organization, not GitHub user.

Here is the repository: https://github.com/justland/just-web/tree/internal-commands

unional avatar Sep 28 '22 19:09 unional

Folks seeing this issue, what browser are you using?

alexr00 avatar Oct 05 '22 12:10 alexr00

Why does it have anything to do with browser? It is within VS Code.

Btw, I'm using Brave at the moment. And this happens on justland GitHub organization repos, but not in unional GitHub personal account repos.

unional avatar Oct 05 '22 17:10 unional

There are a couple places you can use VS Code from within your browser (vscode.dev and Codespaces for example). I incorrectly assumed you were using one of those because I've seen similar issues with Firefox. However, since it's desktop then browser doesn't matter.

Are there any errors reported in the developer console when you seen this?

alexr00 avatar Oct 05 '22 18:10 alexr00

No error, it actually populate eventually, takes about a minute I think

UPDATE:

ERR No tree view with id 'github:compareChanges' registered.: Error: No tree view with id 'github:compareChanges' registered.

I do notice this, but it may not be related.

unional avatar Oct 06 '22 18:10 unional

Some more log messages, don't know if they are related:

rejected promise not handled within 1 second: Error: Command failed: C:\Program Files\Git\cmd\git.exe -c core.longpaths=true -c core.quotepath=false -c color.ui=false -c log.showSignature=false log --format=%x3cr%x3e%x20%H -n3 -m -L 2,2:.changeset/large-panthers-count.md
fatal: There is no path .changeset/large-panthers-count.md in the commit

stack trace: Error: Command failed: C:\Program Files\Git\cmd\git.exe -c core.longpaths=true -c core.quotepath=false -c color.ui=false -c log.showSignature=false log --format=%x3cr%x3e%x20%H -n3 -m -L 2,2:.changeset/large-panthers-count.md
fatal: There is no path .changeset/large-panthers-count.md in the commit

	at c:\Users\homa\.vscode\extensions\eamodio.gitlens-12.0.7\dist\gitlens.js:36:7507
	at ChildProcess.exithandler (node:child_process:415:5)
	at ChildProcess.emit (node:events:526:28)
	at maybeClose (node:internal/child_process:1092:16)
	at ChildProcess._handle.onexit (node:internal/child_process:302:5)


  ERR command 'issues.issueCompletion' not found: Error: command 'issues.issueCompletion' not found
    at v._tryExecuteCommand (vscode-file://vscode-app/c:/Users/homa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1696:3532)
    at v.executeCommand (vscode-file://vscode-app/c:/Users/homa/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1696:3414)
    at async Promise.all (index 0)
    ```
    

unional avatar Oct 07 '22 00:10 unional

No error, it actually populate eventually, takes about a minute I think

We should have exactly 1 item in the branch drop down to start with. We then fetch all the branches to show in the drop down. This is to keep the start up performance of the view quick. Do you even see 1 branch in the drop down?

alexr00 avatar Oct 10 '22 18:10 alexr00

Right now, I do see one (old). Have seen Zero.

It takes about 5 minutes before it repopulate with the updated branches.

unional avatar Oct 11 '22 07:10 unional

5 minutes should never happen, we give up after 5 seconds (and we do it twice, so shouldn't be too much more than 10 seconds). Are you on a very slow internet connection?

alexr00 avatar Oct 11 '22 14:10 alexr00

Nope. 300mpbs

unional avatar Oct 11 '22 15:10 unional

Can you set the setting githubPullRequests.logLevel, reproduce the issue again, then share the output from GitHub Pull Request?

alexr00 avatar Oct 11 '22 16:10 alexr00

image

(the screenshot cut short, the current branch is connect)

Another example that it only refresh after 2 minutes. I feel like it is on a fixed schedule and the interval is very long.

Will enable the logLevel and see.

unional avatar Oct 11 '22 17:10 unional

Closing since we don't have debug level logs. Please do ping the issue if you see again!

alexr00 avatar Dec 09 '22 12:12 alexr00

This log is not the same situation, but I observe the pull request panel got stuck for a while before showing, so could be related

[Debug 1670785481.945s] RateLimit> API call count: 24 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670785482.407s] RateLimit> Rate limit remaining: 4984
[Debug 1670785482.426s] RateLimit> Rate limit remaining: 4983
[Debug 1670785490.459s] RateLimit> API call count: 25 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670785490.946s] RateLimit> Rate limit remaining: 4982
[Debug 1670785492.436s] RateLimit> API call count: 26 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670785492.837s] RateLimit> Rate limit remaining: 4981
[Debug 1670785556.175s] CreatePullRequestViewProvider> Total commits: 1
[Debug 1670785556.175s] CreatePullRequestViewProvider> Initializing "create" view: {"availableBaseRemotes":[{"owner":"justland","repositoryName":"just-web"}],"availableCompareRemotes":[{"owner":"justland","repositoryName":"just-web"}],"defaultBaseRemote":{"owner":"justland","repositoryName":"just-web"},"defaultBaseBranch":"main","defaultCompareRemote":{"owner":"justland","repositoryName":"just-web"},"defaultCompareBranch":"events-export","branchesForRemote":["main"],"branchesForCompare":["events-export"],"defaultTitle":"fix: update events-plus","defaultDescription":"update repobuddy and test setup.\nSome project should uses jsdom preset","defaultMergeMethod":"rebase","allowAutoMerge":true,"mergeMethodsAvailability":{"merge":false,"squash":true,"rebase":true},"createError":""}
[Debug 1670785556.176s] GitHubRepository> List branches for justland/just-web - enter
[Debug 1670785556.176s] RateLimit> API call count: 27 (ListBranches)
[Debug 1670785556.691s] RateLimit> Rate limit remaining: 4840
[Debug 1670785556.691s] GitHubRepository> List branches for justland/just-web - done
[Debug 1670785556.701s] GitHubRepository> Fetch default branch - enter
[Debug 1670785556.701s] GitHubRepository> Fetch metadata - enter
[Debug 1670785556.701s] GitHubRepository> Fetch metadata justland/just-web - done
[Debug 1670785556.701s] GitHubRepository> Fetch default branch - done
[Debug 1670785556.701s] GitHubRepository> List branches for justland/just-web - enter
[Debug 1670785556.702s] RateLimit> API call count: 28 (ListBranches)
[Debug 1670785557.073s] RateLimit> Rate limit remaining: 4839
[Debug 1670785557.073s] GitHubRepository> List branches for justland/just-web - done
[Debug 1670785557.089s] RateLimit> API call count: 29 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670785557.12s] CreatePullRequestViewProvider> Compare branch name: events-export, Base branch name: main
[Debug 1670785557.122s] RateLimit> API call count: 30 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670785557.465s] RateLimit> Rate limit remaining: 4980
[Debug 1670785557.491s] RateLimit> API call count: 31 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670785557.499s] RateLimit> Rate limit remaining: 4979
[Debug 1670785557.866s] RateLimit> Rate limit remaining: 4978
[Debug 1670785585.712s] GitHubRepository> Create pull request - enter
[Debug 1670785585.712s] GitHubRepository> Fetch metadata - enter
[Debug 1670785585.712s] GitHubRepository> Fetch metadata justland/just-web - done
[Debug 1670785585.712s] RateLimit> API call count: 32
[Debug 1670785587.562s] RateLimit> Rate limit remaining: undefined
[Debug 1670785587.562s] GitHubRepository> Create pull request - done
[Debug 1670785587.563s] PullRequestGitHelper> associate events-export with Pull Request #200
[Debug 1670785587.726s] RateLimit> API call count: 33
[Debug 1670785587.732s] RateLimit> API call count: 34 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670785588.177s] RateLimit> Rate limit remaining: 4977
[Debug 1670785588.497s] RateLimit> Rate limit remaining: undefined
[Debug 1670785588.498s] Review> Queuing additional validate state

unional avatar Dec 10 '22 04:12 unional

Here is the log when the not refreshing issue happens:

[Debug 1670834491.4s] RateLimit> API call count: 22 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670834491.4s] CreatePullRequestViewProvider> Compare branch name: remove-sc, Base branch name: main
[Debug 1670834491.404s] GitHubRepository> Fetch repo permissions and available merge methods - enter
[Debug 1670834491.404s] GitHubRepository> Fetch metadata - enter
[Debug 1670834491.404s] GitHubRepository> Fetch metadata justland/just-web - done
[Debug 1670834491.406s] GitHubRepository> Fetch repo permissions and available merge methods - done
[Debug 1670834491.406s] RateLimit> API call count: 23 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670834491.848s] RateLimit> Rate limit remaining: 4990
[Debug 1670834491.954s] RateLimit> Rate limit remaining: 4989
[Debug 1670834565.146s] CreatePullRequestViewProvider> Total commits: 1
[Debug 1670834565.146s] CreatePullRequestViewProvider> Initializing "create" view: {"availableBaseRemotes":[{"owner":"justland","repositoryName":"just-web"}],"availableCompareRemotes":[{"owner":"justland","repositoryName":"just-web"}],"defaultBaseRemote":{"owner":"justland","repositoryName":"just-web"},"defaultBaseBranch":"main","defaultCompareRemote":{"owner":"justland","repositoryName":"just-web"},"defaultCompareBranch":"remove-sc","branchesForRemote":["main"],"branchesForCompare":["remove-sc"],"defaultTitle":"fix: remove startcontext","defaultDescription":"","defaultMergeMethod":"rebase","allowAutoMerge":true,"mergeMethodsAvailability":{"merge":false,"squash":true,"rebase":true},"createError":""}
[Debug 1670834565.147s] GitHubRepository> List branches for justland/just-web - enter
[Debug 1670834565.147s] RateLimit> API call count: 24 (ListBranches)
[Debug 1670834565.493s] RateLimit> Rate limit remaining: 4911
[Debug 1670834565.493s] GitHubRepository> List branches for justland/just-web - done
[Debug 1670834565.496s] GitHubRepository> Fetch default branch - enter
[Debug 1670834565.496s] GitHubRepository> Fetch metadata - enter
[Debug 1670834565.496s] GitHubRepository> Fetch metadata justland/just-web - done
[Debug 1670834565.496s] GitHubRepository> Fetch default branch - done
[Debug 1670834565.496s] GitHubRepository> List branches for justland/just-web - enter
[Debug 1670834565.496s] RateLimit> API call count: 25 (ListBranches)
[Debug 1670834565.815s] RateLimit> Rate limit remaining: 4910
[Debug 1670834565.815s] GitHubRepository> List branches for justland/just-web - done
[Debug 1670834565.832s] RateLimit> API call count: 26 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670834565.867s] CreatePullRequestViewProvider> Compare branch name: remove-sc, Base branch name: main
[Debug 1670834565.87s] RateLimit> API call count: 27 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670834566.25s] RateLimit> Rate limit remaining: 4987
[Debug 1670834566.259s] RateLimit> Rate limit remaining: 4986
[Debug 1670834566.272s] RateLimit> API call count: 28 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670834566.585s] RateLimit> Rate limit remaining: 4985
[Debug 1670834573.352s] RateLimit> API call count: 29 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670834573.667s] RateLimit> Rate limit remaining: 4984

You can see there is a huge delay around:

[Debug 1670834491.406s] RateLimit> API call count: 23 (/repos/{owner}/{repo}/compare/{base}...{head})
[Debug 1670834491.848s] RateLimit> Rate limit remaining: 4990
[Debug 1670834491.954s] RateLimit> Rate limit remaining: 4989
[Debug 1670834565.146s] CreatePullRequestViewProvider> Total commits: 1

unional avatar Dec 12 '22 08:12 unional

the pull request panel got stuck for a while before showing, so could be related

What did you see in the "create" view when it was stuck?

alexr00 avatar Dec 12 '22 09:12 alexr00

Something like loading, can't really remember. The panel was empty, with the top GITHUB still showing. And a left aligned text showing loading or getting info something like that.

unional avatar Dec 12 '22 10:12 unional

Thanks @unional. The "Loading..." while we fetch the content to show in the view is expected.

alexr00 avatar Dec 14 '22 13:12 alexr00

@greazer I'm not able to reproduce this issue. I tried uninstalling and reinstalling the extension. If you see it again can you share the output from GitHub Pull Request?

@alexr00 Start using git worktrees... you'll see it immediately.

airtonix avatar Dec 16 '22 09:12 airtonix