What was the end-user or developer problem that led to this PR?
Sometimes tests that gem build to local version of bundler fail.
What is your fix for the problem, implemented in this PR?
Some tests using system_gems :bundler run gem build bundler.gemspec to build a local version of the bundler gem and install that to the temporary gem location for tests. After the test finishes, it removes the bundler*.gem artifact generated by gem build at the root of the repo.
The problem is that if two tests like this run concurrently, they can run into race condtions because they use the same common folder (the root folder). For example, test1 generates the bundler*.gem file, test2 (re)generates the bundler*.gem file, test1 removes the file after it's done, test2 fails to remove the file because it was already removed by other test.
To fix this issue, we generate this artifact on a "thread specific" folder, so it doesn't interfere with other threads.
What was the end-user or developer problem that led to this PR?
Sometimes tests that
gem build
to local version of bundler fail.What is your fix for the problem, implemented in this PR?
Some tests using
system_gems :bundler
rungem build bundler.gemspec
to build a local version of the bundler gem and install that to the temporary gem location for tests. After the test finishes, it removes thebundler*.gem
artifact generated bygem build
at the root of the repo.The problem is that if two tests like this run concurrently, they can run into race condtions because they use the same common folder (the root folder). For example, test1 generates the
bundler*.gem
file, test2 (re)generates thebundler*.gem
file, test1 removes the file after it's done, test2 fails to remove the file because it was already removed by other test.To fix this issue, we generate this artifact on a "thread specific" folder, so it doesn't interfere with other threads.