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

Question: Concurrent Cache Access? #74

Open
mchouque opened this issue Sep 28, 2017 · 2 comments
Open

Question: Concurrent Cache Access? #74

mchouque opened this issue Sep 28, 2017 · 2 comments

Comments

@mchouque
Copy link

Hello,

This is not an issue but more of a general question regarding the cache.

Can I share the cache between concurrent runs? Say I have my control-repo, a bunch of private modules and a bunch of forge modules. Can I run multiple instances of g10k at the same time while using the same cachedir?

I looked quickly at the code and it doesn't seem to be any kind of lock except for mutexes?

Thanks again for all your hard work!

Regards,
Mathieu

@xorpaul
Copy link
Owner

xorpaul commented Sep 29, 2017

Yes, you can use the cachedir for multiple parallel g10k runs.

The pure access of the cache isn't problematic at all, but updating the cache in parallel could lead to race conditions, e.g. two g10k runs trying to download or extract the same Puppetlabs Forge archive or git pull the same git repository at the same time.

How does you setup look like? Just one control repo that you specify in a g10k config YAML? How are you calling g10k? With -config or do you use multiple -puppetfile calls at the same time.

@mchouque
Copy link
Author

My setup and use for g10k is to compile a complete Puppet environment when someone modifies a module to catch as many errors as possible.

So I have:

  • one control repo
  • Jenkins launching compilation jobs on merge requests
  • Jenkins calling g10k with different config files (and thus different Puppetfiles with my link hack)

But yes, they all pull the code from the same control repo, same set of modules and same set of forge modules.

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

No branches or pull requests

2 participants