ignore blacklisted requirements when validating changes

We want to allow project teams to specify the verions of linters and
other blacklisted items independently of each other.

Refer to
http://lists.openstack.org/pipermail/openstack-dev/2017-June/118085.html
and
http://lists.openstack.org/pipermail/openstack-dev/2017-June/118197.html
for more background.

Change-Id: I90362ea9968f423f0e6aeb638adb0e38bdf097d0
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-06-12 08:56:12 -04:00
parent 2b8174484f
commit e4ccf53dca

View File

@ -179,6 +179,8 @@ def main():
for k, entries in global_reqs.items():
# Discard the lines: we don't need them.
global_reqs[k] = set(r for (r, line) in entries)
backlist = requirement.parse(
open(reqdir + '/blacklist.txt', 'rt').read())
cwd = os.getcwd()
# build a list of requirements in the proposed change,
# and check them for style violations while doing so
@ -221,6 +223,11 @@ def main():
reqs == branch_reqs.reqs[name]):
# Unchanged [or a change that preserves a current value]
continue
if name in blacklist:
# Blacklisted items are not synced and are managed
# by project teams as they see fit, so no further
# testing is needed.
continue
if name not in global_reqs:
failed = True
print("Requirement %s not in openstack/requirements" %