Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21090

virtualenv task creating a new virtualenv without the clean flag set

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • shiningpanda-plugin
    • None
    • Jenkins ver. 1.544
      ShiningPanda Plugin ver 0.20

      All other plugins are up to date at the time of writing this ticket.

      A job with some standard steps in it like:

      • VirtualEnv Builder clean=True
        $ pip install -r requirements.txt
      • VirtualEnv Builder clean=False
        $ python manage.py syncdb --noinput
      • VirtualEnv Builder clean=False
        $ python manage.py migrate
      • VirtualEnv Builder clean=False
        $ python manage.py tests

      Will decide to create an entirely new virtualenv at one of the steps that have clean not set.

      This of course breaks the build and makes the job useless

      I had this multiple times before in other jobs and the only solution seems to be to clear out all the steps and recreate them and then hope that it will work as expected.

          [JENKINS-21090] virtualenv task creating a new virtualenv without the clean flag set

          Mobpro Mobpro added a comment -

          log showing the wrong behavior:

          [xxx] $ /usr/bin/python2.7 /tmp/shiningpanda/69ecf1f1/virtualenv.py /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9
          New python executable in /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9/bin/python2.7
          Also creating executable in /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9/bin/python
          Installing setuptools...............................done.
          Installing pip...................done.
          [xxx] $ /bin/sh -xe /tmp/shiningpanda7270660549103376519.sh
          + pip install -r requirements.txt --use-mirrors
          ...
          ...
          ...
          Successfully installed {{ lots of packages }}
          Cleaning up...
          [xxx] $ /bin/sh -xe /tmp/shiningpanda4247388076512291355.sh
          + python manage.py syncdb --noinput
          ...
          ...
          ...
          (use ./manage.py migrate to migrate these)
          [xxx] $ /bin/sh -xe /tmp/shiningpanda398325920697469798.sh
          + python manage.py migrate
          ...
          ...
          ...
          Installed 0 object(s) from 0 fixture(s)
          [xxx] $ /usr/bin/python2.7 /tmp/shiningpanda/69ecf1f1/virtualenv.py --distribute /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9
          New python executable in /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9/bin/python2.7
          Also creating executable in /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9/bin/python
          Installing distribute...........................................................................................................................................................................................................................done.
          Installing pip....................done.
          [xxx] $ /bin/sh -xe /tmp/shiningpanda4593669991197625391.sh
          + python manage.py test --traceback --failfast
          Traceback (most recent call last):
            File "manage.py", line 8, in <module>
              from django.core.management import execute_from_command_line
          ImportError: No module named django.core.management
          Build step 'Virtualenv Builder' marked build as failure
          Finished: FAILURE
          

          Mobpro Mobpro added a comment - log showing the wrong behavior: [xxx] $ /usr/bin/python2.7 /tmp/shiningpanda/69ecf1f1/virtualenv.py /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9 New python executable in /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9/bin/python2.7 Also creating executable in /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9/bin/python Installing setuptools...............................done. Installing pip...................done. [xxx] $ /bin/sh -xe /tmp/shiningpanda7270660549103376519.sh + pip install -r requirements.txt --use-mirrors ... ... ... Successfully installed {{ lots of packages }} Cleaning up... [xxx] $ /bin/sh -xe /tmp/shiningpanda4247388076512291355.sh + python manage.py syncdb --noinput ... ... ... (use ./manage.py migrate to migrate these) [xxx] $ /bin/sh -xe /tmp/shiningpanda398325920697469798.sh + python manage.py migrate ... ... ... Installed 0 object(s) from 0 fixture(s) [xxx] $ /usr/bin/python2.7 /tmp/shiningpanda/69ecf1f1/virtualenv.py --distribute /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9 New python executable in /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9/bin/python2.7 Also creating executable in /tmp/shiningpanda/69ecf1f1/virtualenvs/d41d8cd9/bin/python Installing distribute...........................................................................................................................................................................................................................done. Installing pip....................done. [xxx] $ /bin/sh -xe /tmp/shiningpanda4593669991197625391.sh + python manage.py test --traceback --failfast Traceback (most recent call last): File "manage.py" , line 8, in <module> from django.core.management import execute_from_command_line ImportError: No module named django.core.management Build step 'Virtualenv Builder' marked build as failure Finished: FAILURE

          Mobpro Mobpro added a comment -

          When having removed and recreated all the steps the build work again.

          It seems that somehow the Jenkins UI and the actual parameters on which the steps are executed are different / not in sync.

          I have not found a way in Jenkins to show the real parameter data instead of what is shown in the "Configure" page to confirm this.

          Mobpro Mobpro added a comment - When having removed and recreated all the steps the build work again. It seems that somehow the Jenkins UI and the actual parameters on which the steps are executed are different / not in sync. I have not found a way in Jenkins to show the real parameter data instead of what is shown in the "Configure" page to confirm this.

          Mobpro Mobpro added a comment -

          It keeps on failing

          Every time we change something in the build steps this goes wrong again.

          Mobpro Mobpro added a comment - It keeps on failing Every time we change something in the build steps this goes wrong again.

            Unassigned Unassigned
            mobpro2 Mobpro Mobpro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: