-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: new project widget broken if 'null' item(s) received from gh api #11630
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @szab100. The change looks good. This feels like a bug in GHE or octokit - perhaps worth following up with those projects.
/hold for CLA
hi @szab100, and thank you for your contribution! Can you please sign our CLA via this DocuSign form? If there are any questions, you can reach me via moritz@gitpod.io. |
done. |
Thx for signing the CLA! |
I agree, that octokit client lib should never really return 'null' values, perhaps it is due to failed / retried paginated requests. About the other mentioned issue (performance): it would be nice to see an improvement on that too soon, a few more comments / suggestions for that:
|
/werft run 👍 started the job as gitpod-build-fix-new-project-widget-fork.0 |
Thanks for these 👍. I've added them to #11628 so they don't get lost. |
Description
The |Team or persona scope| / Projects / New Project widget has been super slow since the feature's debut when running against large Github Enterprise instances with 10s of thousands of repositories under many-100 git-orgs. Since the current implementation is filtering to show only the repos where the current user has 'admin' permissions only after all pages are fetched and it makes the UI wait for the entire result set to be fetched before returning, the UI is frozen for 5-10+ minutes.
Still, even as being frozen / super slow (added a TODO to fix / optimize), this feature remained usable, since it is a one-time project setup. However, since we upgraded to GH Enterprise v 3.x, it seems that some returned pages might contain one or more null items, where the current filter expression fails. This PR simply aims at fixing this blocking issue, while not giving a remedy yet for the slowness of this API call.
Related Issue(s)
#11628
#11629
Fixes #
#11629
How to test
The fix should be trivial, simply ensure the feature still works after applying this change.
Release Notes