emit warning while running flake8 without virtual env

Bug #1215400 reported by Kui Shi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Kui Shi

Bug Description

run_tests.sh -N -p
it will call the flake8 installed on your host to detect PEP8, and
the flake8 plugin "OpenStack hacking" may not installed on your
host, so this command may not detect the OpenStack Style Commandment
supplied by hacking(e.g H202).

run_tests.sh -p
it will call the flake8 from virtual env, flake8 plugin "OpenStack
hacking" installed in virtual env will be triggered.

The result from "run_tests.sh -p" should be trusted, and jenkins uses
virtual env to run flake8 too.

When "-N" is enabled, emit warning to remind user.

Kui Shi (skuicloud)
Changed in horizon:
assignee: nobody → Kui Shi (skuicloud)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/43362

Changed in horizon:
status: New → In Progress
Changed in horizon:
importance: Undecided → Wishlist
milestone: none → havana-rc1
importance: Wishlist → Low
tags: added: havana-rc-potential
Changed in horizon:
milestone: havana-rc1 → none
milestone: none → icehouse-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/43362
Committed: http://github.com/openstack/horizon/commit/2b5772ab8afeb1f8ab1877ee5695af79caaed27e
Submitter: Jenkins
Branch: master

commit 2b5772ab8afeb1f8ab1877ee5695af79caaed27e
Author: Kui Shi <email address hidden>
Date: Sun Oct 6 16:11:22 2013 +0800

    emit warning while running flake8 without virtual env

    run_tests.sh -N -p

    It will call the flake8 installed on your host to detect PEP8, and
    the flake8 plugin "OpenStack hacking" may not installed on your
    host, so this command may not detect the OpenStack Style Commandment
    supplied by hacking(e.g H202).

    run_tests.sh -p
    it will call the flake8 from virtual env, flake8 plugin "OpenStack
    hacking" installed in virtual env will be triggered.

    The result from "run_tests.sh -p" should be trusted, and jenkins uses
    virtual env to run flake8 too.

    When "-N" is enabled, check whether hacking can be imported, if not,
    emit warning to stderr to remind user.

    Test method
    -----------
    Suppose hacking is not installed on your host

    $ ./run_tests.sh -p
    no warning

    $ ./run_tests.sh -p -N
    emit warning

    $ source .venv/bin/activate
    $ ./run_tests.sh -p
    no warning

    $ ./run_tests.sh -p -N
    no warning

    Close-Bug #1215400

    Change-Id: If5125c180a3ebea72dc1fb96817523a6e07b2d66

Thierry Carrez (ttx)
tags: added: havana-backport-potential
removed: havana-rc-potential
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-1 → icehouse-2
David Lyle (david-lyle)
Changed in horizon:
status: In Progress → Fix Committed
milestone: icehouse-2 → none
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.