Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-1031

puppetlabs_spec_helper: Random issues since 2.8.0


    • Template:
    • Team:
      Puppet Developer Experience
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Parallel fixture download of multiple git repos is not broken anymore.
    • QA Risk Assessment:
      Needs Assessment


      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.


          Issue Links




                • Assignee:
                  peiriannydd Trevor Vaughan
                • Votes:
                  4 Vote for this issue
                  6 Start watching this issue


                  • Created: