VVV
VVV copied to clipboard
Avoid running apt-get more than once per day
This attempts to speed up provision by addressing #2272
I was thinking more updating the packages than the sources, but this is needed too. We'll need to account for utilities as well and the VVV version though, the date isn't enough
I figure we store an SHA of a string of the version/utilities/etc
Wondering if we can extend this also to other utilities or command like npm or wp-cli download.
Wondering if we can extend this also to other utilities or command like npm or wp-cli download.
I'll think about this, i'm sure we can do this kind of thing for everything.
I'll turn this into a draft, since I don't have time to work on this on the next couple days.
I think the todo list of things here should be:
- the
/vvv
folder should be a separate issue and PR, ideally using a subfolder of/srv/
instead that's VM only ( unmapped ) - we can't rely on just time
- if the config files changes we should run
apt
- if the config file says always run
apt
then always run it - if the VVV version has changed we should run
apt
- if the config files changes we should run
So we should compare an SHA hash of:
{VVV version}{utility src git hashes}{current date}
We can then provide finder control in the future by allowing the config
to specify how granular the date is, e.g. 2020/07
rather than 2020/07/01
for monthly updates
We should also look into appending the VVV commit hash to the version in the vagrant file so that people on develop
get updates on git pull
.
At that point we're probably good to extend this to the entire main provisioner
Additionally, only succesful provisions should update the hash so that it doesn't stay stuck in a broken state
any updates @msaggiorato