From e4ccf53dcaf5122659b8c96cb39feeb7ffc963fb Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 12 Jun 2017 08:56:12 -0400 Subject: [PATCH] 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 --- jenkins/scripts/project-requirements-change.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jenkins/scripts/project-requirements-change.py b/jenkins/scripts/project-requirements-change.py index da78ee837c..2b423f2ad5 100755 --- a/jenkins/scripts/project-requirements-change.py +++ b/jenkins/scripts/project-requirements-change.py @@ -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" %