Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Suffix binrc cache with version number#274

Merged
bcomnes merged 1 commit intoxenialfrom
prefix-binrc
Mar 11, 2019
Merged

Suffix binrc cache with version number#274
bcomnes merged 1 commit intoxenialfrom
prefix-binrc

Conversation

@bcomnes
Copy link
Copy Markdown
Contributor

@bcomnes bcomnes commented Mar 11, 2019

This is to prevent caching overlap with other versions of binrc

@bcomnes bcomnes merged commit cddd886 into xenial Mar 11, 2019
@bcomnes bcomnes deleted the prefix-binrc branch March 11, 2019 21:39
@rybit
Copy link
Copy Markdown
Member

rybit commented Mar 12, 2019

could you explain how you ran into this? Symptoms etc so we know if it is a problem.

@bcomnes
Copy link
Copy Markdown
Contributor Author

bcomnes commented Mar 12, 2019

I just explained on my 1:1, but for whoever may come across this:

Here is what we saw:

  • The version of binrc differs between trusty and xenial. The version on xenial downloads hugo extended, trusty downloads non-extended.
  • A site that was on trusty and had a seeded cache is switched over to xenial. When binrc tries to install hugo, it looks in the cache for the version it wants, and uses it if it finds it instead of downloading again.
  • This resulted in a xenial image using a non-extended version of hugo that it would restore from the cache.
  • This behavior was observed, even after you clear the cache. All restored caches would still have the old version of hugo. It was almost as if the cache wasn't actually getting cleared, and new cache saves would include old versions of stuff that were added from the trusty image.
  • This prefix trick basically invalidates the binrc cache by adding a version number suffix to the folder it uses, thus invalidating the cache.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants