Majic Projects
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
bug_report_small.png
Closed Bug report MAR-145 Python requirements upgrade checks not compatible with latest pip-tools
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
icon_info.png 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

Comments ()
There are no comments
History