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

Avoid running apt-get more than once per day #2281

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

msaggiorato
Copy link
Member

This attempts to speed up provision by addressing #2272

@msaggiorato msaggiorato requested a review from tomjn October 23, 2020 00:27
@msaggiorato msaggiorato changed the title Avoid running apt-get more than once per hour Avoid running apt-get more than once per day Oct 23, 2020
@tomjn
Copy link
Member

tomjn commented Oct 23, 2020

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
Copy link
Member

tomjn commented Oct 23, 2020

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

@Mte90
Copy link
Member

Mte90 commented Oct 23, 2020

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

@msaggiorato
Copy link
Member Author

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.

@@ -12,6 +12,7 @@
. "/srv/config/bash_aliases"

# cleanup
mkdir -p /vvv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo this should go in /vagrant and the move to /vvv should be a separate issue where we symlink it to /vagrant, that way we aren't spreading things across multiple folders

@msaggiorato
Copy link
Member Author

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

@msaggiorato msaggiorato marked this pull request as draft October 27, 2020 15:58
@tomjn tomjn added this to the Lighter VVV Core milestone Oct 27, 2020
@tomjn
Copy link
Member

tomjn commented Nov 16, 2020

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
Copy link
Member

tomjn commented Nov 16, 2020

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

@Mte90
Copy link
Member

Mte90 commented Jan 22, 2021

any updates @msaggiorato

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

Successfully merging this pull request may close these issues.

3 participants