jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.94k stars 191 forks source link

[plugins] Cache github plugin #1997

Closed mikeland73 closed 3 months ago

mikeland73 commented 3 months ago

Summary

Excessive github requests are slow and can also lead to API rate limiting. This caches content for 24 hours.

Ideally we store resolved plugin data in the lock file and cache indefinitely (until user does update) but that's a bit more work so this is a stopgap.

Users can use devbox update to clear cache.

cc: @Lagoja

How was it tested?

Added print statements to track http requests and observed them going away after content is cached.

Lagoja commented 3 months ago

Does this also allow updating to newer versions of Github plugins by running devbox update?

mikeland73 commented 3 months ago

Does this also allow updating to newer versions of Github plugins by running devbox update

Not currently, but the plan is to build that mechanism into this command as well. In order to do that we need to

One caveat is that plugin semantics are a bit weird in case of upgrades. Specifically when it comes to creating files.

For non built-in plugins the semantics are the following:

For built-ins:

I think a future upgrade path that merges how both of these behave could be:

sentry-io[bot] commented 2 months ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎