)]}'
{"shade/__init__.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"0af7aa3fef7bb2c46c23ce8e4cff2bfbaaa9554b","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            self._swift_client \u003d swift_client.Connection("},{"line_number":243,"context_line":"                preauthurl\u003dendpoint,"},{"line_number":244,"context_line":"                preauthtoken\u003dtoken,"},{"line_number":245,"context_line":"                #auth_version\u003d\u00272.0\u0027,"},{"line_number":246,"context_line":"                os_options\u003ddict(region_name\u003dself.region_name),"},{"line_number":247,"context_line":"            )"},{"line_number":248,"context_line":"        return self._swift_client"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_908046c0","line":245,"updated":"2015-01-08 22:53:38.000000000","message":"There is a commented out line here.","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"cde7aa921f9f2c0812f54df1ed745a7eadaa04a6","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            self._swift_client \u003d swift_client.Connection("},{"line_number":243,"context_line":"                preauthurl\u003dendpoint,"},{"line_number":244,"context_line":"                preauthtoken\u003dtoken,"},{"line_number":245,"context_line":"                #auth_version\u003d\u00272.0\u0027,"},{"line_number":246,"context_line":"                os_options\u003ddict(region_name\u003dself.region_name),"},{"line_number":247,"context_line":"            )"},{"line_number":248,"context_line":"        return self._swift_client"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_170888d8","line":245,"in_reply_to":"3a961159_908046c0","updated":"2015-01-12 19:35:17.000000000","message":"Done","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"0af7aa3fef7bb2c46c23ce8e4cff2bfbaaa9554b","unresolved":false,"context_lines":[{"line_number":668,"context_line":""},{"line_number":669,"context_line":"    def create_container(self, name):"},{"line_number":670,"context_line":"        if self.get_container(name):"},{"line_number":671,"context_line":"            return"},{"line_number":672,"context_line":"        try:"},{"line_number":673,"context_line":"            self.swift_client.put_container(name)"},{"line_number":674,"context_line":"            self.get_container(name, skip_cache\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_b08382c9","line":671,"updated":"2015-01-08 22:53:38.000000000","message":"Should this really silently succeed?","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"cde7aa921f9f2c0812f54df1ed745a7eadaa04a6","unresolved":false,"context_lines":[{"line_number":668,"context_line":""},{"line_number":669,"context_line":"    def create_container(self, name):"},{"line_number":670,"context_line":"        if self.get_container(name):"},{"line_number":671,"context_line":"            return"},{"line_number":672,"context_line":"        try:"},{"line_number":673,"context_line":"            self.swift_client.put_container(name)"},{"line_number":674,"context_line":"            self.get_container(name, skip_cache\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_f7b77cf6","line":671,"in_reply_to":"3a961159_b08382c9","updated":"2015-01-12 19:35:17.000000000","message":"I think so - although I could debug log there some. Containers are very thin objects and I haven\u0027t found a time where I\u0027ve wanted to know if there was already a container there before as much as I just want to make sure it exists. (I can always do a get_container if I _Do_ want to know that)","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"0af7aa3fef7bb2c46c23ce8e4cff2bfbaaa9554b","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            return"},{"line_number":672,"context_line":"        try:"},{"line_number":673,"context_line":"            self.swift_client.put_container(name)"},{"line_number":674,"context_line":"            self.get_container(name, skip_cache\u003dTrue)"},{"line_number":675,"context_line":"        except swift_exceptions.ClientException as e:"},{"line_number":676,"context_line":"            raise OpenStackCloudException("},{"line_number":677,"context_line":"                \"Container creation failed: %s (%s/%s)\" % ("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d06d6e33","line":674,"updated":"2015-01-08 22:53:38.000000000","message":"Should this return the container?","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"cde7aa921f9f2c0812f54df1ed745a7eadaa04a6","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            return"},{"line_number":672,"context_line":"        try:"},{"line_number":673,"context_line":"            self.swift_client.put_container(name)"},{"line_number":674,"context_line":"            self.get_container(name, skip_cache\u003dTrue)"},{"line_number":675,"context_line":"        except swift_exceptions.ClientException as e:"},{"line_number":676,"context_line":"            raise OpenStackCloudException("},{"line_number":677,"context_line":"                \"Container creation failed: %s (%s/%s)\" % ("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_f7477c78","line":674,"in_reply_to":"3a961159_d06d6e33","updated":"2015-01-12 19:35:17.000000000","message":"Done","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"0af7aa3fef7bb2c46c23ce8e4cff2bfbaaa9554b","unresolved":false,"context_lines":[{"line_number":678,"context_line":"                    e.http_reason, e.http_host, e.http_path))"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":"    def _get_file_md5(self, filename):"},{"line_number":681,"context_line":"        return subprocess.check_output([\u0027md5sum\u0027, filename]).split()[0]"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"    def _is_object_stale(self, container, name, filename, file_md5):"},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_f068aa22","line":681,"updated":"2015-01-08 22:53:38.000000000","message":"This is a portability concern, yeah?  We\u0027re depending on the md5sum program.  How about hashlib instead: http://stackoverflow.com/questions/1131220/get-md5-hash-of-big-files-in-python\n\nRead it in, say 4096 or 8192 byte chunks for efficiency and fitting in memory.","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"0af7aa3fef7bb2c46c23ce8e4cff2bfbaaa9554b","unresolved":false,"context_lines":[{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        try:"},{"line_number":686,"context_line":"            metadata \u003d self.get_object_metadata(container, name)"},{"line_number":687,"context_line":"        except OpenStackCloudException:"},{"line_number":688,"context_line":"            self.log.debug("},{"line_number":689,"context_line":"                \"swift stale check, no object: {container}/{name}\".format("},{"line_number":690,"context_line":"                    container\u003dcontainer, name\u003dname))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_107456fc","line":687,"updated":"2015-01-08 22:53:38.000000000","message":"I\u0027m not sure what\u0027s going on here -- it looks like this is expecting the 404 not found case to raise this exception.  However, I think any number of conditions could raise the exception, including 5xx codes, and maybe even lack of connectivity.  Maybe we should check the ClientException for a 404 code.  However, you lost that information when masking the exception with OpenStackCloudException.","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"cde7aa921f9f2c0812f54df1ed745a7eadaa04a6","unresolved":false,"context_lines":[{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        try:"},{"line_number":686,"context_line":"            metadata \u003d self.get_object_metadata(container, name)"},{"line_number":687,"context_line":"        except OpenStackCloudException:"},{"line_number":688,"context_line":"            self.log.debug("},{"line_number":689,"context_line":"                \"swift stale check, no object: {container}/{name}\".format("},{"line_number":690,"context_line":"                    container\u003dcontainer, name\u003dname))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e99ec468","line":687,"in_reply_to":"3a961159_107456fc","updated":"2015-01-12 19:35:17.000000000","message":"Done","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"0af7aa3fef7bb2c46c23ce8e4cff2bfbaaa9554b","unresolved":false,"context_lines":[{"line_number":691,"context_line":"            return True"},{"line_number":692,"context_line":"        if file_md5 is None:"},{"line_number":693,"context_line":"            file_md5 \u003d self._get_file_md5(filename)"},{"line_number":694,"context_line":"        if file_md5 !\u003d metadata[\u0027etag\u0027]:"},{"line_number":695,"context_line":"            self.log.debug("},{"line_number":696,"context_line":"                \"swift md5 mismatch: {filename}!\u003d{container}/{name}\".format("},{"line_number":697,"context_line":"                    filename\u003dfilename, container\u003dcontainer, name\u003dname))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_306f9229","line":694,"updated":"2015-01-08 22:53:38.000000000","message":"http://docs.openstack.org/developer/swift/overview_large_objects.html\n\n\"Usually in Swift the ETag is the MD5 sum of the contents of the object\"\n\nDoes it really mean \"always\" instead of \"usually\"?  If so, maybe the docs should be updated.  If not, then this might not work at all with some swift installations.\n\nAlso, that\u0027s really unfortunate because we should not be using md5s for this sort of thing because of the hash collision weakness (a malicious party could create a collision either locally or in the cloud and fool this code).","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"cde7aa921f9f2c0812f54df1ed745a7eadaa04a6","unresolved":false,"context_lines":[{"line_number":691,"context_line":"            return True"},{"line_number":692,"context_line":"        if file_md5 is None:"},{"line_number":693,"context_line":"            file_md5 \u003d self._get_file_md5(filename)"},{"line_number":694,"context_line":"        if file_md5 !\u003d metadata[\u0027etag\u0027]:"},{"line_number":695,"context_line":"            self.log.debug("},{"line_number":696,"context_line":"                \"swift md5 mismatch: {filename}!\u003d{container}/{name}\".format("},{"line_number":697,"context_line":"                    filename\u003dfilename, container\u003dcontainer, name\u003dname))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_09a4f0b7","line":694,"in_reply_to":"3a961159_306f9229","updated":"2015-01-12 19:35:17.000000000","message":"Done","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"0af7aa3fef7bb2c46c23ce8e4cff2bfbaaa9554b","unresolved":false,"context_lines":[{"line_number":724,"context_line":"        except swift_exceptions.ClientException as e:"},{"line_number":725,"context_line":"            raise OpenStackCloudException("},{"line_number":726,"context_line":"                \"Object metadata fetch failed: %s (%s/%s)\" % ("},{"line_number":727,"context_line":"                    e.http_reason, e.http_host, e.http_path))"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":""},{"line_number":730,"context_line":"class OperatorCloud(OpenStackCloud):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_50617e37","line":727,"updated":"2015-01-08 22:53:38.000000000","message":"Normally I really dislike this pattern because it masks the true cause of errors.  It looks like this specific case probably has the right information assuming there is an http response.  But what if there\u0027s a DNS resolution problem or something?  is that a ClientException or something else?  (If something else, that\u0027s okay, if it\u0027s a ClientException, then we\u0027ve just masked the problem).\n\nSomething we might want to do in the future is to attach the original exception to the new one.  I think python3 makes it easy to wrap, but I think there are still ways to do that in python2.","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"cde7aa921f9f2c0812f54df1ed745a7eadaa04a6","unresolved":false,"context_lines":[{"line_number":724,"context_line":"        except swift_exceptions.ClientException as e:"},{"line_number":725,"context_line":"            raise OpenStackCloudException("},{"line_number":726,"context_line":"                \"Object metadata fetch failed: %s (%s/%s)\" % ("},{"line_number":727,"context_line":"                    e.http_reason, e.http_host, e.http_path))"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":""},{"line_number":730,"context_line":"class OperatorCloud(OpenStackCloud):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e98c0431","line":727,"in_reply_to":"3a961159_50617e37","updated":"2015-01-12 19:35:17.000000000","message":"Agree - I think I\u0027m going to make another pass to clear up the information we bubble up into exceptions. I\u0027ve also added another commit to ensure that we always at least debug log with exc_info everytime we mask an exception.","commit_id":"ea922e2cc799527f56ad94bff99401eb5ea2e25d"}]}
