question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: "another git process seems to be running..." in sync mode

See original GitHub issue

I’m still trying to reproduce the issue myself, since it pops up occasionally in my CI even with it inline.

Right now I’m having doubts as to whether or not “parallel” changes the behavior at all, or with what runners does it change the behavior, or if it only affects certain commands, such as nx run-many.

One possible guess is here:

https://github.com/jscutlery/semver/blob/2d72467f542dc026241114bf3a36e54b234010d5/packages/semver/src/executors/version/version.ts#L86

There might be a race condition with performing concurrent addToStage() since we’re using concatMap, so each project is still being updated in parallel. It’s hard to reproduce though, but if the changes at addToStage were performed sequentially it might help in my case.

In your case, my guess is that the addToStage() from updating the changeLogs and updating the packageJson hit at the same time, since those are also done in parallel:

https://github.com/jscutlery/semver/blob/2d72467f542dc026241114bf3a36e54b234010d5/packages/semver/src/executors/version/version.ts#L54

_Originally posted by @dereekb in https://github.com/jscutlery/semver/issues/500#issuecomment-1129200958_

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
dereekbcommented, May 28, 2022

Your issue sounds the same as the other person’s here.

https://github.com/jscutlery/semver/issues/500#issuecomment-1126896815

It’s a tricky bug to reproduce, although I guess we know it is still happening for new projects that might not have that big of size. Wasn’t occurring on my machine at home, but was occurring sometimes on CircleCI, until I made a large enough release that it triggered every time. The race condition occurs on the filesystem.

I haven’t checked the e2e tests so I can’t speak to that, but if it isn’t invoking git on the CI machine directly then it won’t catch it.

1reaction
nradulaski-godaddycommented, Jun 16, 2022

This issue happens all the time with affected and run-many unless I use --parallel=1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Another git process seems to be running in this repository
Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are...
Read more >
Git process seems to be running in this repository Solution
Conclusion. The Another git process seems to be running in this repository error is raised if two processes are running Git at the...
Read more >
How to resolve "another git process seems to be running" error
The, “another git process seems to be running” error occurs when you open multiple Terminals to use git. However, do not worry, there...
Read more >
Another git process seems to be running in this repository
Today I ran into an error when I was trying to switch branches from master to a feature branch using Git. The error...
Read more >
git-update-index Documentation - Git
Runs git update-index itself on the paths whose index entries are different ... If split-index mode is already enabled and --split-index is given...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found