Allow running gate lint and docs checks to run in virtual environments as non-root

Bug #1455992 reported by Nolan Brubaker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Wishlist
Jesse Pretorius
Kilo
Fix Released
Wishlist
Jesse Pretorius
Trunk
Fix Released
Wishlist
Jesse Pretorius

Bug Description

Right now, the scripts/gate-check-lint.sh and scripts/gate-check-docs.sh files rely on the scripts/script-library.sh file, which does a check for the root user when sourced.

This isn't a major problem on the actual gating host, but when running the checks locally before pushing commits, it does get annoying.

Neither linting nor doc building should require running as root, though they should run in a virtual environment if not.

I can see a number of ways of addressing this, but I'm not sure which one is best. It's possible it could be a combination.

1 - Factor out any root-specific work to another script so that jobs that do need root can use it; those that don't can then source the script library just fine.
2 - Alter each script to provide it's own user ID checking (which seems redundant)
3 - Always run lint and gate checking jobs in virtualenvs, regardless of what user we're using

We should also look into how other OpenStack projects do this; I thinks there is a run-test.sh convention we may be able to adopt.

summary: - Allo running gate lint and docs checks to run in virtual environments as
- non-root
+ Allow running gate lint and docs checks to run in virtual environments
+ as non-root
Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

Some work has been done to implement tox based lint checks. Once they're fully working I'd like to switch over to using the standard template pep8 and bashate checks from -infra and entirely do away with our gate-check-lint script.

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

master review for the tox-base tests: https://review.openstack.org/216170

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

tox-based checks for these have now merged

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.