github_pr_tree icon indicating copy to clipboard operation
github_pr_tree copied to clipboard

File tree does not populate sometimes.

Open thockin opened this issue 5 years ago • 7 comments

Example: https://github.com/kubernetes/kubernetes/pull/73977/commits/7527b3d51a7e996d964dbc5e8a68fe273f23bfdf

(If I don't quote it, github transforms it...weird)

thockin avatar Jun 14 '19 18:06 thockin

Another example, this one is only partially populated:

https://github.com/kubernetes/kubernetes/pull/73977/commits/a3817b0d0ff1d58a99322706f49a640e64b823be

thockin avatar Jun 14 '19 19:06 thockin

any thoughts on this? Still happening, and makes relying on the file tree hard if I know it is sometimes missing things

thockin avatar Aug 12 '19 19:08 thockin

Yes, it is a problem indeed.

The way the extension works is that it reads what's already on the page and creates the tree from that data alone. On very large PRs, Github uses pagination so only after scrolling the data is available.

I don't have a great solution idea (yet), but I wouldn't want to go into the API path (where it'll just read it directly from the GitHub graphql API). If we'll figure out that's the only way, then maybe it will be an optional setting.

I'll be glad to hear more ideas on how this can be resolved.

berzniz avatar Aug 13 '19 09:08 berzniz

Here's another one for your collection: https://github.com/dotnet/winforms/pull/1565/commits/034cfd2403b0ea37dadbc7a4f84f41b66ecaf54a

Octotree seems to be dealing with the issue by firing multiple requests. To be able to do that and not get rate limited it asks for GitHub PAT. image

RussKie avatar Mar 03 '20 05:03 RussKie

Thanks for the information. This extension works differently - by only looking at the DOM. This is limiting sometimes, but does not require access tokens to public/private repos.

Open to ideas/PRs for this.

berzniz avatar Mar 05 '20 16:03 berzniz

by only looking at the DOM

I suspect at some point DOM changes (i.e. more files become available for browse), but the extension is not catching it.

RussKie avatar Mar 05 '20 20:03 RussKie

I think I found another aspect to this problem.

  • Show all files from all commits - shows all files in the tree image
  • Show a selected commit - doesn't show or shows only subset of files image

Looking at the Chrome network log - there are no errors, so I don't think it is to do with the GitHub rate limiting, it is probably more to do with information not being retrieved or parsed correctly.

Repro:

  • open https://github.com/dotnet/winforms/pull/3249/files - see all files
  • select a single commit (e.g. https://github.com/dotnet/winforms/pull/3249/commits/c25d9a0d5955d161cc53f11c6e4974fe47162509?file-filters%5B%5D=) and observe no files in the tree.

RussKie avatar May 12 '20 02:05 RussKie