Officially cancel the Additional Properties Wavier

The Additional Properties Wavier on Nova responses was intended
to be cancelled in the 2017.01 guideline. This required official
removal from the board approved guideline. This patch removes the
Additional Properties Waiver from next.json, to be approved for
the 2018.01 guideline and officially cancelling the waiver.

Change-Id: Ia65eb241d5e82ac4dd91c3e3b41f5b69dbdb8a43
This commit is contained in:
Chris Hoge 2017-10-16 16:37:49 -07:00
parent 02698b5411
commit 5748c296a6
3 changed files with 5 additions and 97 deletions

View File

@ -3284,8 +3284,8 @@
"designated-sections" : {
"required" : {
"nova" : {
"guidance": "By default, designated except scheduler, filter, drivers, API extensions and networking. Additional properties allowed on Nova 2.0 API responses.",
"comment": "All code except driver/plugins listed. Even for replaceable drivers or plugins, we still expect use of the existing nova service that wraps those interfaces. Additional properties may be returned on Nova 2.0 API responses. Endpoints with additional response data must be reported. The Nova 2.1 and greater API must return complete and unmodified responses.",
"guidance": "By default, designated except scheduler, filter, drivers, API extensions and networking. Additional properties on responses are not allowed.",
"comment": "All code except driver/plugins listed. Even for replaceable drivers or plugins, we still expect use of the existing nova service that wraps those interfaces. Additional properties may not be returned on Nova 2.0 API responses. The Nova 2.1 and greater API must return complete and unmodified responses.",
"sections": {
"scheduler driver": { "description": "(Host and cell)", "designated": false, "comment": "none provided"},
"filter scheduler driver": { "description": "(Host and cell) While the line above implies the entire driver is fair game, this case is incredibly common and worth mentioning specifically.", "designated": false, "comment": "none provided"},

View File

@ -2,6 +2,9 @@
Additional Properties Waiver
============================
THE ADDITIONAL PROPERTIES WAIVER IS NO LONGER ALLOWED AS OF THE
2018.01 GUIDELINE.
In mid-2015, the OpenStack QA team implemented strict response
checking as an implementation detail and enforcement of Nova
microversions. Microversions, in development since the Kilo release of

View File

@ -1,95 +0,0 @@
#!/usr/bin/env python
import functools
import re
import sys
import subunit
import testtools
SUCCESS = []
SKIPS = []
FAILS = []
ADDPROP_FAIL = []
def find_additionalProperties_in_traceback(traceback):
error_msg_re = re.compile(
"^tempest.lib.exceptions.InvalidHTTPResponseBody\:")
found_error_msg = False
error_msg = []
for line in traceback:
temp_line = line.strip()
if not temp_line:
continue
if found_error_msg:
error_msg.append(line)
if error_msg_re.search(temp_line):
found_error_msg = True
continue
if not found_error_msg and not error_msg:
return False
else:
properties_regex = re.compile(
"^Failed validating 'additionalProperties' in schema")
# TODO(mtreinish): Add more specific checks to limit the allowed
# APIs with additional properties
if not properties_regex.search(error_msg[1].strip()):
return False
else:
return error_msg
def show_outcome(stream, test):
global RESULTS
status = test['status']
if status == 'exists':
return
if status == 'fail':
for raw_name in test['details']:
name = raw_name.split(':')[0]
detail = test['details'][raw_name]
if detail.content_type.type == 'test':
detail.content_type.type = 'text'
if name == 'traceback':
traceback = detail.as_text().split('\n')
res = find_additionalProperties_in_traceback(traceback)
if isinstance(res, list):
title = (
"%s Failed with AdditionalProperties jsonschema "
"failure" % test['id'])
stream.write("\n%s\n%s\n" % (title, ('~' * len(title))))
for line in res:
line = line.encode('utf8')
stream.write("%s\n" % line)
stream.write('\n\n')
ADDPROP_FAIL.append(test)
break
else:
FAILS.append(test)
elif status == 'success' or status == 'xfail':
SUCCESS.append(test)
elif status == 'skip':
SKIPS.append(test)
stream = subunit.ByteStreamToStreamResult(
sys.stdin, non_subunit_name='stdout')
outcome = testtools.StreamToDict(
functools.partial(show_outcome,
sys.stdout))
summary = testtools.StreamSummary()
result = testtools.CopyStreamResult([outcome, summary])
result.startTestRun()
try:
stream.run(result)
finally:
result.stopTestRun()
print("\n\n------------------------------------------------------------------")
print("%s Tests Failed" % len(FAILS))
print("%s Tests Failed with AdditionalProperties" % len(ADDPROP_FAIL))
print("%s Tests Skipped" % len(SKIPS))
print("%s Tests Passed" % len(SUCCESS))
print("To see the full details run this subunit stream through subunit-trace")