8000 Fix bug with concurrent renaming by gregberge · Pull Request #1077 · bower/bower · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix bug with concurrent renaming #1077

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

Merged
merged 3 commits into from
Apr 5, 2014
Merged

Fix bug with concurrent renaming #1077

merged 3 commits into from
Apr 5, 2014

Conversation

gregberge
Copy link
Contributor

We stock the renaming promise in cache to ensure that there is not concurrent renaming.

It solves the problem, i have added a test to ensure that it's corrected.

The only remaining problem can be when we run bower in parallel but it's actually not supported (i think).

Fix #933

We stock the renaming promise in cache to ensure that there is not concurrent renaming.
@sindresorhus
Copy link
Contributor

The only remaining problem can be when we run bower in parallel but it's actually not supported (i think).

It almost does and the intention I guess it that it fully should: #596

@gregberge
Copy link
Contributor Author

I don't see how to handle multiple rename over several processes right now. But however I think that first we must fix the actual problem and then if we have a problem we open another issue.

@vvo
Copy link
vvo commented Jan 28, 2014

👍 concurrent rename in the same process is something that is hitting a lot more of users than
parallel installs (30+ participants versus 9).

@sindresorhus Do you think this could be merged soon?

@wibblymat
Copy link
Member

Did #1076 fix this?

@gregberge
Copy link
Contributor Author

No, #1076 decreases chances of problem described in #933.
But this issue fixes #933 by preventing two concurrent renaming of folders.

@gregberge
Copy link
Contributor Author

@wibblymat you can merge it safely, I am using these patched version of bower and there is no problem (#933) since two weeks now.

else {
var defer = Q.defer();
defer.resolve();
checkExistingDirectory = defer.promise;
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to replace these three lines with just checkExistingDirectory = new Q();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wibblymat fixed in 8016bd4

@evillemez
Copy link

Any news on if/when this will get merged?

@gregberge
Copy link
Contributor Author

+1

@mhaligowski
Copy link

@wibblymat when this is going to be merged? AFAIK it affects many people right now.

@MathiasTim
Copy link

+1 for a merge, having the same problem here with our jenkis build process

@Paul-PSDigital
Copy link

hear hear!

@vvo
Copy link
vvo commented Mar 11, 2014

update: After some testing on my CI system using https://github.com/neoziro/bower/tree/v1.2.8-patched it seems to resolve the problem completely. Provided it doesn't have any other side-effects, this seems good to me from a functional test standpoint (not vouching for formatting, unit tests, etc) as my build passes 100 times in a row instead of failing 4/5.

unbreakable build driven development, merge ! :-)

@lukebarton
Copy link

Please can we get this through the appropriate release channel asap?

@PowerKiKi
Copy link

Our Travis CI builds are (almost) systematically broken because of that. A release would be greatly appreciated.

@gregberge
Copy link
Contributor Author

I will close the PR since there is no response from maintainers.

@gregberge gregberge closed this Mar 12, 2014
@lukebarton
Copy link

You are joking right?
On 12 Mar 2014 11:30, "Greg Bergé" notifications@github.com wrote:

I will close the PR since there is no response from maintainers.

Reply to this email directly or view it on GitHubhttps://github.com//pull/1077#issuecomment-37398402
.

@PowerKiKi
Copy link

Please consider re-opening this PR. The issue affects several people and all feedback on this PR are positive. I don't see any valid reason to close it without any feedback from core developers.

This is something we desperately need, unless proven otherwise. And so far nothing against this PR was mentioned.

@benschwarz benschwarz reopened this Mar 12, 2014
@benschwarz
Copy link
Member

We're not done here yet. As a team we need to figure out the right thing to do.

@evillemez
Copy link

@neoziro Please please pretty please re-open this. Closing the PR won't make the problem go away - and this is a serious issue that is affecting quite a few people. @wibblymat What will it take to get this merged once it's reopened?

We are also using the neoziro/v1.2.8-patched branch at the moment because it's the only way we can seem to get around install fails, which is breaking both our CI testing and deployments.

If there's something wrong with the PR, could the maintainers please comment and give some direction?

@wildlyinaccurate
Copy link

I know "+1" comments are frowned upon but I just wanted to add my voice so it's clear how many people are affected.

@vvo
Copy link
vvo commented Mar 14, 2014

we should remember that the number of +1 only shows the people who took the
time to:

  • search for the bug (can take hours)
  • find github
  • maybe create an account
  • add comment

And then there are the other people that are only facing the bug and did
not showed up here.

How many hours lost?

On 14 March 2014 11:17, Joseph Wynn notifications@github.com wrote:

I know "+1" comments are frowned upon but I just wanted to add my voice so
it's clear how many people are affected.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1077#issuecomment-37633157
.

Vincent Voyer
06 13 92 69 96

@mistergaskill
Copy link

This issue affects my team as well. We have been using this branch for a month as bower 1.2 is unusable for us without it.

@lukebarton
Copy link

Also remember that this PR is not the only report of this bug. I have seen
at least two or three tickets reporting this same bug, but none had gone as
far to provide a solution.
On 14 Mar 2014 10:24, "Vincent Voyer" notifications@github.com wrote:

we should remember that the number of +1 only shows the people who took
the
time to:

  • search for the bug (can take hours)
  • find github
  • maybe create an account
  • add comment

And then there are the other people that are only facing the bug and did
not showed up here.

How many hours lost?

On 14 March 2014 11:17, Joseph Wynn notifications@github.com wrote:

I know "+1" comments are frowned upon but I just wanted to add my voice
so
it's clear how many people are affected.

Reply to this email directly or view it on GitHub<
https://github.com/bower/bower/pull/1077#issuecomment-37633157>
.

Vincent Voyer
06 13 92 69 96

Reply to this email directly or view it on GitHubhttps://github.com//pull/1077#issuecomment-37633762
.

@evillemez
Copy link

@benschwarz You reopened the PR - do you know of anything that is preventing it from being merged?

@quentindemetz
Copy link

I've been using neoziro's fork for the past month, which completely resolved our previous deployment issues. Stock bower would randomly fail about 50% of the time.

@pyromaniac
Copy link

👍, we are waiting for this fix so much

@gregberge
Copy link
Contributor Author

This issue is a joke.

@vvo
Copy link
vvo commented Mar 24, 2014

Many users reported that this pull request has no critical side effects and is far more stable
in continuous environments than the current bower.

We understand that bower team may find a smarter/greater way to fix this bug in the future
and have it refactored like you like.

But in the meantime, the best action would have been to
merge this and open another issue where the bower team would say "Hey, we fixed the critical bug with .. but a better approach would be to do .."

Incremental strategy in the particular case of a critical bug (a bug that is impacting many users) seems more interesting than "wait, we will find a perfect way to do it, maybe later..".

@pyromaniac
Copy link

@neoziro, what do you mean?
Also, could you please update your patch with current master to simplify merging work?

@gregberge
Copy link
Contributor Author

@pyromaniac no sorry, the bower team don't care about this problem, I gave time to fix it but now it's over. If they have treated the reals problems instead of adding the support of SVN, there would't have any merging problem.

There are maybe a thousand of people impacted by this, the quick fix is right there, it didn't completely solve the problem, but it's a good quick fix. They don't care about community and production problems linked to bower.

@ppawel
Copy link
ppawel commented Mar 26, 2014

Will look into switching to component or nuGet or something else from the next project because of this issue. Bower apparently cannot be trusted as a critical piece of project infrastructure...

@xaka
Copy link
xaka commented Apr 4, 2014

bower team, hello hello? can we have your attention here as a community, please? @sindresorhus

@desandro
Copy link
Member
desandro commented Apr 4, 2014

Hi there! Sorry for the radio silence. We have a tremendous back log of issues we're trying to work our way through. We appreciate your patience.

@neoziro Thank you so much for your contribution. This is tremendous work. Don't give up on us!

@benschwarz @wibblymat This looks good to me. What concerns do we have around not merging? Do we have additional work that's coming down the pipeline that could resolve this?

@benschwarz
Copy link
Member

:shipit:

benschwarz added a commit that referenced this pull request Apr 5, 2014
@benschwarz benschwarz merged commit cd541c7 into bower:master Apr 5, 2014
@DavidSouther
Copy link

Hurrah! When can we expect a Bower release with these fixes?

@sheerun
Copy link
Contributor
sheerun commented Apr 5, 2014

This PR doesn't solve NOENT problem, and it doesn't use write lock, so it:

  1. Only solves ENOTEMPTY problem in one-process environment
  2. Anything can happen between cache read and write

See my long comment in #933 (comment)

I think this should be reverted and #1211 merged.

@xzyfer
Copy link
xzyfer commented Apr 6, 2014

FWIW I agree with @sheerun. This patch tackles a symptom rather than the root cause. We've been using this patch internally and continued to experience bower concurrency issues.

IMHO #1211 appears to be the more sensible approach.

benschwarz added a commit to benschwarz/bower that referenced this pull request Apr 6, 2014
…aming"

This reverts commit cd541c7, reversing
changes made to 3074711.
@paulirish
Copy link
Member

Ben is about to back out 1077 and land @sheerun's #1211.

Thanks all for jumping in here and on 933. Appreciate it.

benschwarz added a commit that referenced this pull request Apr 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

random ENOTEMPTY in Travis run
0