make requirements check job check for minimum version definitions.

While we don't track the minimum version of a given requirement in
requirements.txt we still need to ensure that they exist.

Change-Id: I84bfbc3a1db4032ee1a2b5995e6930978be42828
Closes-Bug: #1776247
This commit is contained in:
Matthew Thode 2018-06-11 12:52:05 -05:00
parent 17c857251d
commit 7e91070789
No known key found for this signature in database
GPG Key ID: 64A37BEAAE19A4E8

View File

@ -155,6 +155,11 @@ def _validate_one(name, reqs, blacklist, global_reqs):
"not match openstack/requirements value : %s" % ( "not match openstack/requirements value : %s" % (
name, str(req), str(global_reqs[name]))) name, str(req), str(global_reqs[name])))
return True return True
# check for minimum being defined
min = [s for s in req.specifiers.split(',') if '>' in s]
if not min:
print("Requirement for package %s has no lower bound" % name)
return True
for extra, count in counts.items(): for extra, count in counts.items():
if count != len(global_reqs[name]): if count != len(global_reqs[name]):
print("Package %s%s requirement does not match " print("Package %s%s requirement does not match "