VVV icon indicating copy to clipboard operation
VVV copied to clipboard

Avoid running apt-get more than once per day

Open msaggiorato opened this issue 4 years ago • 8 comments

This attempts to speed up provision by addressing #2272

msaggiorato avatar Oct 23 '20 00:10 msaggiorato

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

tomjn avatar Oct 23 '20 00:10 tomjn

I figure we store an SHA of a string of the version/utilities/etc

tomjn avatar Oct 23 '20 00:10 tomjn

Wondering if we can extend this also to other utilities or command like npm or wp-cli download.

Mte90 avatar Oct 23 '20 07:10 Mte90

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.

msaggiorato avatar Oct 23 '20 17:10 msaggiorato

I'll turn this into a draft, since I don't have time to work on this on the next couple days.

msaggiorato avatar Oct 27 '20 15:10 msaggiorato

I think the todo list of things here should be:

  1. the /vvv folder should be a separate issue and PR, ideally using a subfolder of /srv/ instead that's VM only ( unmapped )
  2. 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

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

tomjn avatar Nov 16 '20 14:11 tomjn

Additionally, only succesful provisions should update the hash so that it doesn't stay stuck in a broken state

tomjn avatar Nov 16 '20 14:11 tomjn

any updates @msaggiorato

Mte90 avatar Jan 22 '21 14:01 Mte90