Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
When running under rspec or beaker.
-
Puppet Developer Experience
-
Needs Assessment
-
Bug Fix
-
Parallel fixture download of multiple git repos is not broken anymore.
-
Needs Assessment
Description
Basic Info
puppetlabs_spec_helper 2.8.0
EL 7.4
Describe your issue in as much detail as possible...
At all times, the directory in which I am operating should be known and consistent.
Actual Behavior:
Randomly, after a test has failed, the next time something using puppetlabs_spec_helper runs, it will end up with strange issues that appear to be trying to run code in directories under the fixtures space.
Based on the fact that this was affecting things in fixtures, I took a look at the last few commits and the parallelization implementation at https://github.com/puppetlabs/puppetlabs_spec_helper/blob/master/lib/puppetlabs_spec_helper/tasks/fixtures.rb#L255 appeared to be the culprit.
Indeed, when I set MAX_FIXTURE_THREAD_COUNT=1 I no longer have any issues.
The current implementation does not appear to be globally thread safe and I would recommend wrapping this implementation in the parallel gem as I have had good luck with this in the past.
Until then, I would set the default thread count to 1 and allow users to raise it if they so choose so that these random issues cease to happen.
Attachments
Issue Links
- links to