Majic Projects
Majic Ansible Roles
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png Majic Ansible Roles / Closed Bug report MAR-145 Python requirements upgrade checks not compatible with latest pip-tools
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue basics
  • Type of issue
    Bug report
  • Category
    General
  • Targetted for
    4.0.0
  • Status
    Closed
  • Progress
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (1)
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    4 hours
  • Time spent
    4 hours
    Click here to see time logged against this issue
Issue details
  • Resolution
    RESOLVED
  • Reproducability
    Always
  • Severity
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description

The Python requirements upgrade checks are implemented through a wrapper script that utilises the pip-tools utilities.

When used with latest pip-tools release (4.0.0), the script will produce "spurious" output on the standard error stream, causing the cron job to fire off a mail due to detected errors. This happens because the pip-compile utility now outputs the debug/verbose information (mainly the one that includes full listing of compiled requirements) to stderr instead of stdout (change from previous behaviour).

It would be necessary to fix the wrapper script to hide the extra listing of requirements on the stderr, and to only show actual errors there.

The following should be done:

  • Update the script to fix the issue.
  • Make sure the script works with both Python 2 and Python 3.
  • Bump the requirements for wrapper script virtual environment itself as well.
Steps to reproduce this issue

Reproduction steps:

  1. Set-up test configuration for the requirements checks script:

    mkdir -p ~/tmp/pipreqcheckissue/django/ echo "django~=1.8.0" > ~/tmp/pipreqcheckissue/django/requirements.in echo "django==1.8.19" > ~/tmp/pipreqcheckissue/django/requirements.txt

  2. Set-up a virtual environment with latest pip-tools and pip:

    mkvirtualenv pipreqcheckissue workon pipreqcheckissue pip install -U pip-tools pip

  3. Run the upgrade checks script:

    cd ~/projects/majic-ansible-roles/ ./roles/common/files/pip_check_requirements_upgrades.sh ~/tmp/pipreqcheckissue/

Expected results:

  1. Output in step 3 is:

    [INFO] No upgrades available for: /home/USERNAME/tmp/pipreqcheckissue//django/requirements.txt

Actual results:

  1. Output in step 3 is (notice the first line showing Django version - this is output to stderr):

    django==1.8.19 [INFO] No upgrades available for: /home/branko/tmp/pipreqcheckissue//django/requirements.txt

Todos (0 / 0)
There are no comments