From 16f23daee9c9928d90e0efc233022d70753735ad Mon Sep 17 00:00:00 2001 From: Anthony Lin Date: Mon, 14 May 2018 17:27:14 +0000 Subject: [PATCH] [Fix] Fix Incorrect Method Name We are seeing the following error [0] while using Shipyard to run a commit configdocs. The relevant exceptions are [1] and it is a result of incorrect reference to method name. The bug will be triggered when we use ext_marker. This patch set is meant to correct that. [0] shipyard commit configdocs Error: Validations failed Reason: Validation - Error: None Message: Promenade unable to validate configdocs Source: Promenade - Error: None Message: 500 Server Error: Internal Server Error for url: http://promenade-api.ucp.svc.cluster.local:80/api/v1.0/validatedesign Source: Promenade [1] Exceptions messages in Promenade API pod 2018-05-14 14:56:20,147 ERROR - - - promenade.exceptions:default_exception_handler [142] Unhanded Exception being handled: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/falcon/api.py", line 201, in __call__ process_request(req, resp) File "./promenade/control/middleware.py", line 103, in process_request if ext_marker is not None and self.is_uuid_like(ext_marker): AttributeError: 'ContextMiddleware' object has no attribute 'is_uuid_like' Change-Id: I89713fbb953a46e61093c4dadaa5a752b1a81c6c --- promenade/control/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/promenade/control/middleware.py b/promenade/control/middleware.py index 84b9e74f..eb6bcfe6 100644 --- a/promenade/control/middleware.py +++ b/promenade/control/middleware.py @@ -100,7 +100,7 @@ class ContextMiddleware(object): def process_request(self, req, resp): ctx = req.context ext_marker = req.get_header('X-Context-Marker') - if ext_marker is not None and self.is_uuid_like(ext_marker): + if ext_marker is not None and self._is_uuid_like(ext_marker): # external passed in an ok context marker ctx.set_external_marker(ext_marker) else: