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

elm-install frequently fails when >1 build is run in parallel #40

Open
rupertlssmith opened this issue Aug 24, 2017 · 2 comments
Open

Comments

@rupertlssmith
Copy link

I get this error a lot on my build server:

error: git '--git-dir=/var/lib/jenkins/.elm-install/github.com/elm-lang/html/.git' '--work-tree=/var/lib/jenkins/.elm-install/github.com/elm-lang/html' checkout '1.0.0'  2>&1:fatal: Unable to create '/var/lib/jenkins/.elm-install/github.com/elm-lang/html/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.. Use --trace to view backtrace

The problem is easy enough to work around by either:

  • Making parallel builds run sequentially
  • Containerizing every build to ensure they do not interfere with each other.

So perhpas it is unfair to rase this as an issue against elm-github-install?

But it would be nice if it were possible to have a centralized cache under ~/.elm-install and for parallel builds to be able to run.

@gdotdesign
Copy link
Owner

I think understand the problem.

So perhpas it is unfair to rase this as an issue against elm-github-install?

I don't know 😄 maybe it's possible to wait for a process to exit using the git gem but I need to look into that.

If the builds are running in a different directory you can use the --cache-directory flag to avoid this.

@rupertlssmith
Copy link
Author

I will try the --cache-directory flag to set up each build with its own cache. I made the build serial but it takes too long now, at least that will get it back to parallel. Thanks.

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

No branches or pull requests

2 participants