-
-
Notifications
You must be signed in to change notification settings - Fork 480
Improve slow user authorization if many orgs/repos #5665
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
base: main
Are you sure you want to change the base?
Improve slow user authorization if many orgs/repos #5665
Conversation
This reverts commit 63ac98c.
|
What do you think about letting the UI call the /refresh automatically. Basically:
|
|
Hi @anbraten That is indeed an alternate approach to this issue, though I think it might get concerning at scale. Because
It could perhaps be an automated action in the login flow, which it is already with this change. Having it configurable is maybe unnecessary, but I didn't want to alter the behavior for organisations that have no problems currently. |
- Context propagation to updateRepoPermissions - Missing error handler in go func - Reduce async handler complexity
|
Surge PR preview deployment succeeded. View it at https://woodpecker-ci-woodpecker-pr-5665.surge.sh |
Isn't login sync used also for repo/org rights checks? |
This PR is a solution for #2502.
To resolve the issue a configuration option
WOODPECKER_ASYNC_REPOSITORY_UPDATEhas been added to allow administrators to decide how Woodpecker should deal with the repository update call that is part of the login flow. It can be either sync/async.Sync is do-able for smaller organisations with few repositories, but larger organisations might opt for async to improve login speed at the cost of consistency. The repository list will be eventually consistent depending on the forge & store performance. The configuration flag was added to avoid altering default behavior for existing setups, unless changed by the administrator.
To improve UX for new users I made it mandatory for them to await the repository update, to avoid having new users log in to a blank homepage as this might be confusing. After this initial slow login they will also get async updates, and thus faster logins.
Closes #2502