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

on-bcr-trigger flaky / prone to timeouts #153

Open
malt3 opened this issue Jan 7, 2025 · 1 comment
Open

on-bcr-trigger flaky / prone to timeouts #153

malt3 opened this issue Jan 7, 2025 · 1 comment

Comments

@malt3
Copy link

malt3 commented Jan 7, 2025

Looking at pipelines triggered by merging module updates in the bcr, I noticed that the on-bcr-trigger pipeline regularly runs into timeouts, leading to updates not being available until the next commit.

Error message:

> Build error occurred
Error: Static page generation for /modules/abseil-cpp is still timing out after 3 attempts. See more info here https://nextjs.org/docs/messages/static-page-generation-timeout

A simple fix could be to increase the timeout and see if it helps.

@hobofan
Copy link
Member

hobofan commented Jan 22, 2025

Without having profiled it, my best guess for the failure is:

    1. The map that contains all module versions (required on all pages due to the dependencies section) and their metadata takes too long to build. It's cached across page builds, but the build via a shared promise for all pages, which is why they will all timeout once assembling that map crosses the threshold of 60s
    1. The slowest operation for each module version is determining the release date/the BCR commit that introduced that version. That's quite slow, as it has to traverse the git history

To prevent hitting the time limit of 1., the assembly for that metadata could be pulled into a seperate build step that dumps the data in .json file at a known location, which is then picked up by the Next.js build (this should also have the side-effect of speeding up hot page reloads during development of the UI).

To speed up 2. we could also try to cache that slow to calculate data between builds, especially as it shouldn't change over time, once a release is added to the BCR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants