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

oao bootstrap fails in parallel mode with "ENOENT: no such file or directory" for tarball in yarn cache #53

Closed
edmorley opened this issue Oct 10, 2017 · 6 comments

Comments

@edmorley
Copy link

edmorley commented Oct 10, 2017

STR:

  1. Download this testcase: https://github.com/edmorley/neutrino-dev/archive/testcase-oao-parallel.zip
  2. Push to a new test repo that has Travis enabled

Expected:
The Travis run passes.

Actual:
The Travis run fails with errors like:

2017-10-10T16:16:07.815Z           storyboard WARN  ┌── REVEALED PAST LOGS BEGIN HERE (due to warning/error)
2017-10-10T16:16:02.162Z                 main TRACE ┌── Run cmd yarn install --frozen-lockfile at packages/neutrino-middleware-clean [CREATED]
2017-10-10T16:16:03.870Z                 yarn INFO  | yarn install v0.28.4
2017-10-10T16:16:05.368Z                 yarn INFO  | [1/4] Resolving packages...
2017-10-10T16:16:05.719Z                 yarn INFO  | [2/4] Fetching packages...
2017-10-10T16:16:07.816Z           storyboard WARN  └── REVEALED PAST LOGS END HERE
2017-10-10T16:16:07.815Z                 yarn ERROR | error An unexpected error occurred: "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.2.tgz: ENOENT: no such file or directory, open '/home/travis/.cache/yarn/v1/npm-deepmerge-1.5.2-10499d868844cdad4fee0842df8c7f6f0c95a753/.yarn-tarball.tgz'".

Examples:

This was using yarn 0.28.4 and oao 0.10.3.

Other observations:

  • I can't repro locally on: Windows 10 x64 + MSYS2 bash + yarn 0.28.4 + node 8.6.0 + oao 0.10.3.
  • Travis fails whether the yarn cache is empty or not

I believe this is due to yarnpkg/yarn#2629 - the summary of which is:

  • yarn's cache isn't currently safe for concurrent use
  • therefore callers of yarn who are doing concurrent things need to either:

As such I think oao needs to either:

  • stop making parallel the default, since it can break the yarn cache
  • start using --mutex to avoid the concurrency issues. (I'm presuming this will slow things down slightly, but presumably not as much as disabling parallel mode entirely)
@guigrpa
Copy link
Owner

guigrpa commented Oct 10, 2017

Did you check whether --mutex made the problem go away?

@edmorley
Copy link
Author

edmorley commented Oct 10, 2017

There wasn't a quick way to check it out, since it's not a one line change - a free port needs to be picked etc (if going with network mode, which seems to be preferred over file mode) - see lerna/lerna#764.

@guigrpa
Copy link
Owner

guigrpa commented Oct 10, 2017

Ooops, my bad, I hadn't look at the flag's syntax. I'll look into it as soon as I'm able to breathe :)

@edmorley
Copy link
Author

No rush - I just thought it worth filing this since we'd been using --no-parallel for a while since "otherwise it didn't work", but I couldn't remember why :-)

@guigrpa
Copy link
Owner

guigrpa commented Oct 10, 2017

I believe the first errors we got when we introduced parallel mode were different, but my memory is a bit weak…

@guigrpa
Copy link
Owner

guigrpa commented Mar 2, 2018

Closed due to lack of activity, reopen if necessary!

@guigrpa guigrpa closed this as completed Mar 2, 2018
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