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

fix yarn mutex to work on multiplatform #3890

Merged
merged 2 commits into from Jan 19, 2018
Merged

Conversation

@tardyp
Copy link
Member

tardyp commented Jan 14, 2018

buildbot_pkg was reportedly broken on windows since the yarn mutex fix

@codecov

This comment has been minimized.

Copy link

codecov bot commented Jan 14, 2018

Codecov Report

Merging #3890 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3890      +/-   ##
==========================================
- Coverage   88.55%   88.54%   -0.01%     
==========================================
  Files         325      326       +1     
  Lines       34256    34278      +22     
==========================================
+ Hits        30334    30353      +19     
- Misses       3922     3925       +3
Impacted Files Coverage Δ
master/buildbot/monkeypatches/twisted9127.py 36.36% <0%> (ø)
master/buildbot/process/buildstep.py 90.81% <0%> (+0.12%) ⬆️
master/buildbot/config.py 98.42% <0%> (+0.28%) ⬆️
master/buildbot/util/__init__.py 94.46% <0%> (+0.36%) ⬆️
master/buildbot/steps/shell.py 97.47% <0%> (+0.45%) ⬆️
master/buildbot/db/builds.py 98.42% <0%> (+0.78%) ⬆️
master/buildbot/monkeypatches/__init__.py 95.16% <0%> (+3.22%) ⬆️
worker/buildbot_worker/compat.py 85% <0%> (+10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7334be1...e855974. Read the comment docs.

@tardyp

This comment has been minimized.

Copy link
Member Author

tardyp commented Jan 14, 2018

@uglycoyote can you test on windows?

@uglycoyote

This comment has been minimized.

Copy link
Contributor

uglycoyote commented Jan 15, 2018

Sorry, no that seems not to have solved it, running pip install -e . on my plugin just hangs as it did before, although it's clear from the output that it is now using a OS-specific temp file location as your new code intends.

Here's the output I get from pip install -v -e . (verbose mode)

Obtaining file:///D:/buildbot/buildbot-react-plugin-boilerplate
  Running setup.py (path:D:\buildbot\buildbot-react-plugin-boilerplate\setup.py) egg_info for package from file:///D:/buildbot/buildbot-react-plugin-boilerplate
    Running command python setup.py egg_info
    running egg_info
    running build_js
    yarn: 0.27.5 npm:  5.6.0
    Running command: yarn install --pure-lockfile --mutex file:/C:\Users\admin\AppData\Local\Temp\yarn-mutex
    yarn install v0.27.5
    warning Waiting for the other yarn instance to finish

Also, simply running the command yarn install --pure-lockfile --mutex file:/C:\Users\admin\AppData\Local\Temp\yarn-mutex gives

yarn install v0.27.5
warning Waiting for the other yarn instance to finish

and hangs indefinitely.

I can confirm that the path C:\Users\admin\AppData\Local\Temp\ exists and is where many temp files are stored already on my computer. I also tried:

  • --mutex file:/d:/temp/yarn-mutex to see if a different folder would work
  • --mutex d:/temp/yarn-mutex to see if it doesn't really need file:/, but it says error unknown single instance type d
  • --mutex file://d:/temp/yarn-mutex to see if it's really supposed to have two slashes in file:// but it still hangs

also noteworthly is that I had a windows open watching the contents of d:\temp while doing all of this and never actually saw any temp files get created in there.

@uglycoyote

This comment has been minimized.

Copy link
Contributor

uglycoyote commented Jan 15, 2018

Simply running yarn install --pure-lockfile --mutex file seems to work fine without locking up.

from https://yarnpkg.com/lang/en/docs/cli/:

When using file Yarn will write/read a mutex file .yarn-single-instance in the current working directory by default.

maybe that's the best option?

@tardyp

This comment has been minimized.

Copy link
Member Author

tardyp commented Jan 15, 2018

@uglycoyote the goal is to be able to run several package builds in parallel. Each of those packages being in another directory.
If doing yarn install in parallel, the yarn cache files gets corrupted.
It looks like this --mutex option is supposed to fix, that but is pretty half backed. The default value should be the cache directory itself, and not the current directory (makes absolutely no sense to me why would they do that).
Anyway, I'll remove that mutex option and give up parallel build :-/

tardyp added 2 commits Jan 14, 2018
buildbot_pkg was reportedly broken on windows since the yarn mutex fix
@tardyp tardyp force-pushed the tardyp:windowsPkgFix branch from 02bb8a2 to e855974 Jan 17, 2018
@tardyp tardyp merged commit 345cbaf into buildbot:master Jan 19, 2018
24 of 25 checks passed
24 of 25 checks passed
codecov/project 88.54% (-0.01%) compared to 7334be1
Details
bb Build done.
Details
bb/coverage/2.7/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/coverage/3.5/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/docs/2.7/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/flake8/2.7/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/flake8/3.5/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/interop/2.7/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/interop/3.6/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/isort/2.7/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/js/2.7/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/pylint/2.7/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/smokes/2.7/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/smokes/3.5/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/trial/2.7/tw:16.1.0/sqla:0.8.0/db:sqlite:// Build done.
Details
bb/trial/2.7/tw:16.1.0/sqla:latest/db:sqlite:// Build done.
Details
bb/trial/2.7/tw:latest/sqla:latest/db:mysql+mysqldb://travis@127.0.0.1/bbtest Build done.
Details
bb/trial/2.7/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/trial/2.7/tw:latest/sqla:latest/db:sqlite:////tmp/test_db.sqlite Build done.
Details
bb/trial/3.4/tw:latest/sqla:latest/db:sqlite:// Build done.
Details
bb/trial_worker/2.7/tw:16.1.0/sqla:latest/db:sqlite:// Build done.
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 7334be1...e855974
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tardyp tardyp deleted the tardyp:windowsPkgFix branch Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.