trove API schema matching code has dead debug message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
Fix Released
|
Medium
|
Amrith Kumar |
Bug Description
A very useful debug message in the bowels of common/wsgi.py which shows how the API schema matching is working is broken.
@classmethod
def get_schema(cls, action, body):
if cls.schemas:
if matching_schema:
return matching_schema
Since the matching_schema almost always does not have a property called 'name', most often the debug message looks like this:
2015-04-26 03:38:31.354 DEBUG trove.common.wsgi [req-3f321202-
This is quite unhelpful most of the time, and ends up being misleading.
Changed in trove: | |
assignee: | nobody → Amrith (amrith) |
importance: | Undecided → Medium |
description: | updated |
Changed in trove: | |
status: | New → In Progress |
Changed in trove: | |
milestone: | none → liberty-1 |
Changed in trove: | |
status: | Fix Committed → Fix Released |
Changed in trove: | |
milestone: | liberty-1 → 4.0.0 |
Reviewed: https:/ /review. openstack. org/186732 /git.openstack. org/cgit/ openstack/ trove/commit/ ?id=342c52c6e9f 11bc9f54ef1fe3e 242e76654ee991
Committed: https:/
Submitter: Jenkins
Branch: master
commit 342c52c6e9f11bc 9f54ef1fe3e242e 76654ee991
Author: Amrith Kumar <email address hidden>
Date: Thu May 28 15:27:09 2015 -0400
Fixes a broken debug message in schema matching
This rather useful debug tool in the bowels of common/wsgi.py produces
a misleading message because, most often, the matching_schema has no
property called 'name'. Fixed it to print the schema in its entirety
because in most cases one would take the name and go lookup the schema
anyway.
The other way around would be to go and change all of apischema.py and
add a name property. This seemed to be the less intrusive and
disruptive change.
Change-Id: I4075bc911d2cc0 7cb6e7d98ffcff9 6441f7b3416
Closes-Bug: #1460033