-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add timeout to warm gittar cache step #362
Conversation
Important for an eng reviewer to actually pull this branch to test it please |
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.
Looks good. Tested locally by dropping the timeout to 1ms and installing from my branch.
fyi to see the relevant logs I had to npm install with --verbose --foreground-scripts
Interesting @nicc. Were you able to see other logs from the |
Closes #314
Background
Sometimes the installation or upgrade of the zkapp-cli hangs during the
warm cache for project template
step in thepostinstall.js
file when a network request is made by gittar to fetch the zkapp-cli templates and examples from github here.Approach
This PR adds a timeout to the fetch gittar operation. If the fetch operation does not resolve before the the timeout, the
warm cache for project template
step is skipped, and the installation continues. See this discussion for more details.Next steps
A log was added to show which NPM packages were added to the cache in the
warm NPM cache for project template deps
step. A log was also added before the gittar fetch operation in thewarm cache for project template
step. We can use these logs to gain better visibility into hanging operations in the future and adjust the approach to addressing them accordingly.