Skip to content
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

Timeout for single request breaks the whole page #1762

Open
mnonnenmacher opened this issue Jan 10, 2025 · 6 comments
Open

Timeout for single request breaks the whole page #1762

mnonnenmacher opened this issue Jan 10, 2025 · 6 comments
Labels
bug Something isn't working as expected. ui Issues related to the UI.

Comments

@mnonnenmacher
Copy link
Contributor

mnonnenmacher commented Jan 10, 2025

Loading the statistics for a very large organization can take some time:

image

When the request (api/v1/organizations/1/statistics/runs) times out with 504 (gateway timeout), it is reattempted a few times. When it timed out for four times, the whole page goes into an error state:

image

Instead, only the affected parts of the page should show an error, because a problem with loading the statistics should not completely break the frontend.

@mnonnenmacher mnonnenmacher added bug Something isn't working as expected. ui Issues related to the UI. labels Jan 10, 2025
@sschuberth
Copy link
Contributor

@lamppu do we already have dedicated endpoints for the organization level? If not yet, is there a change that these would make the timeout not happen in the first place?

@lamppu
Copy link
Contributor

lamppu commented Jan 10, 2025

@lamppu do we already have dedicated endpoints for the organization level? If not yet, is there a change that these would make the timeout not happen in the first place?

Yes, it already uses a dedicated endpoint. But perhaps that endpoint should be split into multiple endpoints. But in any case, an error should be caught and handled in the frontend too.

@mnonnenmacher
Copy link
Contributor Author

mnonnenmacher commented Jan 10, 2025

@lamppu do we already have dedicated endpoints for the organization level? If not yet, is there a change that these would make the timeout not happen in the first place?

This happens for an organization with more than one thousand repositories and a firewall that enforces a timeout after 30 seconds, I think fixing this would require to not calculate the statistics on the fly which is a bigger effort. But even then the UI should handle an error of the endpoint more gracefully.

@sschuberth
Copy link
Contributor

an organization with more than one thousand repositories

Ouch 😮

@Etsija
Copy link
Contributor

Etsija commented Jan 16, 2025

Maybe CatchBoundary component could help here.

@Etsija
Copy link
Contributor

Etsija commented Jan 16, 2025

TanStack Query has external error handling, and there's also an example of error handling here, which could be tried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected. ui Issues related to the UI.
Projects
None yet
Development

No branches or pull requests

4 participants