)]}'
{"tempest/scenario/test_swift_telemetry_middleware.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"4b4b081df52a6fbe27bfd7052d630cc265d456cc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 IBM Corp."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_989631ef","line":1,"updated":"2014-08-27 20:58:41.000000000","message":"assuming copy/paste error","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"dee8d840218069d790281f4d053ac68a5b674af1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 IBM Corp."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_2c8a42bf","line":1,"in_reply_to":"1abeadc6_989631ef","updated":"2014-08-27 21:23:29.000000000","message":"Indeed, thanks.\n\n/me must wake up","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"4b4b081df52a6fbe27bfd7052d630cc265d456cc","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def setUpClass(cls):"},{"line_number":41,"context_line":"        super(TestSwiftTelemetry, cls).setUpClass()"},{"line_number":42,"context_line":"        if not (CONF.service_available.ceilometer):"},{"line_number":43,"context_line":"            skip_msg \u003d (\"%s skipped. ceilometer are not available\" %"},{"line_number":44,"context_line":"                        cls.__name__)"},{"line_number":45,"context_line":"            raise cls.skipException(skip_msg)"},{"line_number":46,"context_line":"        # establish clients"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_0ccd86b7","line":43,"updated":"2014-08-27 20:58:41.000000000","message":"s/ceilometer are/ceilometer is/","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"dee8d840218069d790281f4d053ac68a5b674af1","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def setUpClass(cls):"},{"line_number":41,"context_line":"        super(TestSwiftTelemetry, cls).setUpClass()"},{"line_number":42,"context_line":"        if not (CONF.service_available.ceilometer):"},{"line_number":43,"context_line":"            skip_msg \u003d (\"%s skipped. ceilometer are not available\" %"},{"line_number":44,"context_line":"                        cls.__name__)"},{"line_number":45,"context_line":"            raise cls.skipException(skip_msg)"},{"line_number":46,"context_line":"        # establish clients"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_acbd726a","line":43,"in_reply_to":"1abeadc6_0ccd86b7","updated":"2014-08-27 21:23:29.000000000","message":"That\u0027s also a pasto...","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"4b4b081df52a6fbe27bfd7052d630cc265d456cc","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        containers \u003d []"},{"line_number":51,"context_line":"        objects \u003d []"},{"line_number":52,"context_line":"        for count in range(10):"},{"line_number":53,"context_line":"            LOG.debug(\u0027requesting samples try %s\u0027, count)"},{"line_number":54,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":55,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":56,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_ac5f32e4","line":53,"updated":"2014-08-27 20:58:41.000000000","message":"add colon after \u0027samples\u0027","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"dee8d840218069d790281f4d053ac68a5b674af1","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        containers \u003d []"},{"line_number":51,"context_line":"        objects \u003d []"},{"line_number":52,"context_line":"        for count in range(10):"},{"line_number":53,"context_line":"            LOG.debug(\u0027requesting samples try %s\u0027, count)"},{"line_number":54,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":55,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":56,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_ac649222","line":53,"in_reply_to":"1abeadc6_ac5f32e4","updated":"2014-08-27 21:23:29.000000000","message":"/me nods","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"4b4b081df52a6fbe27bfd7052d630cc265d456cc","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @test.services(\u0027object_storage\u0027, \u0027telemetry\u0027)"},{"line_number":71,"context_line":"    def test_swift_middleware_notifies(self):"},{"line_number":72,"context_line":"        container_name \u003d self._create_container()"},{"line_number":73,"context_line":"        obj_name, _ \u003d self._upload_object_to_container(container_name)"},{"line_number":74,"context_line":"        self._confirm_notifications(container_name, obj_name)"},{"line_number":75,"context_line":"        self._delete_object(container_name, obj_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_acd49220","line":72,"updated":"2014-08-27 20:58:41.000000000","message":"it\u0027d be cool if these inherited methods weren\u0027t private... probably just the Java in me... i\u0027m willing to suppress it.","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"ca609cd31b82dbe4341e1c5a47593cdea88d9dda","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @test.services(\u0027object_storage\u0027, \u0027telemetry\u0027)"},{"line_number":71,"context_line":"    def test_swift_middleware_notifies(self):"},{"line_number":72,"context_line":"        container_name \u003d self._create_container()"},{"line_number":73,"context_line":"        obj_name, _ \u003d self._upload_object_to_container(container_name)"},{"line_number":74,"context_line":"        self._confirm_notifications(container_name, obj_name)"},{"line_number":75,"context_line":"        self._delete_object(container_name, obj_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_fad454ea","line":72,"in_reply_to":"1abeadc6_ac4bb285","updated":"2014-08-28 17:53:19.000000000","message":"makes sense to me.","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"dee8d840218069d790281f4d053ac68a5b674af1","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @test.services(\u0027object_storage\u0027, \u0027telemetry\u0027)"},{"line_number":71,"context_line":"    def test_swift_middleware_notifies(self):"},{"line_number":72,"context_line":"        container_name \u003d self._create_container()"},{"line_number":73,"context_line":"        obj_name, _ \u003d self._upload_object_to_container(container_name)"},{"line_number":74,"context_line":"        self._confirm_notifications(container_name, obj_name)"},{"line_number":75,"context_line":"        self._delete_object(container_name, obj_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_ac4bb285","line":72,"in_reply_to":"1abeadc6_acd49220","updated":"2014-08-27 21:23:29.000000000","message":"I was hesitant to make too many changes to the parent class when I extracted it, more comments in the main reply.","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"4b4b081df52a6fbe27bfd7052d630cc265d456cc","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        container_name \u003d self._create_container()"},{"line_number":73,"context_line":"        obj_name, _ \u003d self._upload_object_to_container(container_name)"},{"line_number":74,"context_line":"        self._confirm_notifications(container_name, obj_name)"},{"line_number":75,"context_line":"        self._delete_object(container_name, obj_name)"},{"line_number":76,"context_line":"        self._delete_container(container_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_ec23ea55","line":75,"updated":"2014-08-27 20:58:41.000000000","message":"seems like delete items should be in tearDown.","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"dee8d840218069d790281f4d053ac68a5b674af1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        container_name \u003d self._create_container()"},{"line_number":73,"context_line":"        obj_name, _ \u003d self._upload_object_to_container(container_name)"},{"line_number":74,"context_line":"        self._confirm_notifications(container_name, obj_name)"},{"line_number":75,"context_line":"        self._delete_object(container_name, obj_name)"},{"line_number":76,"context_line":"        self._delete_container(container_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_cc370efe","line":75,"in_reply_to":"1abeadc6_ec23ea55","updated":"2014-08-27 21:23:29.000000000","message":"That\u0027s a good point. This is borrowed from the original SwiftBasicOps test where the deletion of stuff is an actual part of the test, not just armature. I\u0027ll make some adjustments.","commit_id":"f0b37c354166e2e580e60695415cf638d9957ecf"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a42c3b812d1e73191b26e630c9bc25c745f09041","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                          !\u003d \u0027None\u0027]"},{"line_number":64,"context_line":"            objects \u003d [sample[\u0027resource_metadata\u0027][\u0027object\u0027]"},{"line_number":65,"context_line":"                       for sample in results"},{"line_number":66,"context_line":"                       if sample[\u0027resource_metadata\u0027][\u0027object\u0027] !\u003d \u0027None\u0027]"},{"line_number":67,"context_line":"            if len(objects) \u003e 0:"},{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":"            time.sleep(1)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_5dbbdf71","line":66,"updated":"2014-10-22 13:44:37.000000000","message":"out of curiosity. why do we compare against a string value and not literal None?","commit_id":"1ea13420abbe0884ecf75677a50b7fc55bb6203f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c35d0d592c092d9b02393741d6f5e7c4d04ff3e2","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                          !\u003d \u0027None\u0027]"},{"line_number":64,"context_line":"            objects \u003d [sample[\u0027resource_metadata\u0027][\u0027object\u0027]"},{"line_number":65,"context_line":"                       for sample in results"},{"line_number":66,"context_line":"                       if sample[\u0027resource_metadata\u0027][\u0027object\u0027] !\u003d \u0027None\u0027]"},{"line_number":67,"context_line":"            if len(objects) \u003e 0:"},{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":"            time.sleep(1)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_78143144","line":66,"in_reply_to":"9aa7fdbe_5dbbdf71","updated":"2014-10-22 13:52:49.000000000","message":"Good question, it\u0027s been so long since I wrote this I\u0027ll have to dig to refresh my memory. It\u0027s a shame we don\u0027t use revision control in a sensible fashion instead of the hilarious history destroying gerrit way. Otherwise I\u0027d just be able to look at the log. :(","commit_id":"1ea13420abbe0884ecf75677a50b7fc55bb6203f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"75dcd19090f3860db307c78341d736f89af909ec","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                          !\u003d \u0027None\u0027]"},{"line_number":64,"context_line":"            objects \u003d [sample[\u0027resource_metadata\u0027][\u0027object\u0027]"},{"line_number":65,"context_line":"                       for sample in results"},{"line_number":66,"context_line":"                       if sample[\u0027resource_metadata\u0027][\u0027object\u0027] !\u003d \u0027None\u0027]"},{"line_number":67,"context_line":"            if len(objects) \u003e 0:"},{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":"            time.sleep(1)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_58492d8a","line":66,"in_reply_to":"9aa7fdbe_78143144","updated":"2014-10-22 14:07:31.000000000","message":"It\u0027s because that\u0027s what\u0027s in the resource_metadata:\n\n   u\u0027object\u0027: u\u0027None\u0027\n\nSome samples are objects and some are containers and in the results dictionary that\u0027s made clear by !\u003d (literal) \u0027None\u0027.","commit_id":"1ea13420abbe0884ecf75677a50b7fc55bb6203f"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a42c3b812d1e73191b26e630c9bc25c745f09041","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            if len(objects) \u003e 0:"},{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":"            time.sleep(1)"},{"line_number":70,"context_line":"        LOG.debug(\u0027requested %s/120 samples\u0027, count)"},{"line_number":71,"context_line":"        self.assertIn(container_name, containers, )"},{"line_number":72,"context_line":"        self.assertIn(obj_name, objects)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_9dfe2737","line":70,"updated":"2014-10-22 13:44:37.000000000","message":"wow. this is so strange that the scope of count is beyond the for statement.","commit_id":"1ea13420abbe0884ecf75677a50b7fc55bb6203f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c35d0d592c092d9b02393741d6f5e7c4d04ff3e2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            if len(objects) \u003e 0:"},{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":"            time.sleep(1)"},{"line_number":70,"context_line":"        LOG.debug(\u0027requested %s/120 samples\u0027, count)"},{"line_number":71,"context_line":"        self.assertIn(container_name, containers, )"},{"line_number":72,"context_line":"        self.assertIn(obj_name, objects)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_18a085f3","line":70,"in_reply_to":"9aa7fdbe_9dfe2737","updated":"2014-10-22 13:52:49.000000000","message":"That\u0027s just happy Python, it\u0027s a fairly common idiom to count something up in the loop and then see how far we got. I agree it is a bit strange, but handy.","commit_id":"1ea13420abbe0884ecf75677a50b7fc55bb6203f"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a42c3b812d1e73191b26e630c9bc25c745f09041","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":"            time.sleep(1)"},{"line_number":70,"context_line":"        LOG.debug(\u0027requested %s/120 samples\u0027, count)"},{"line_number":71,"context_line":"        self.assertIn(container_name, containers, )"},{"line_number":72,"context_line":"        self.assertIn(obj_name, objects)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @test.services(\u0027object_storage\u0027, \u0027telemetry\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_bd784bf3","line":71,"updated":"2014-10-22 13:44:37.000000000","message":"(nit) can we remove that trailing comma","commit_id":"1ea13420abbe0884ecf75677a50b7fc55bb6203f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c35d0d592c092d9b02393741d6f5e7c4d04ff3e2","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":"            time.sleep(1)"},{"line_number":70,"context_line":"        LOG.debug(\u0027requested %s/120 samples\u0027, count)"},{"line_number":71,"context_line":"        self.assertIn(container_name, containers, )"},{"line_number":72,"context_line":"        self.assertIn(obj_name, objects)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @test.services(\u0027object_storage\u0027, \u0027telemetry\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_38a7090e","line":71,"in_reply_to":"9aa7fdbe_bd784bf3","updated":"2014-10-22 13:52:49.000000000","message":"Ooops. Will fix.","commit_id":"1ea13420abbe0884ecf75677a50b7fc55bb6203f"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"c5ab98d429f2be77c5691038324f3b7939786513","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        container_name \u003d self.create_container()"},{"line_number":77,"context_line":"        obj_name, _ \u003d self.upload_object_to_container(container_name)"},{"line_number":78,"context_line":"        self._confirm_notifications(container_name, obj_name)"},{"line_number":79,"context_line":"        self.delete_object(container_name, obj_name)"},{"line_number":80,"context_line":"        self.delete_container(container_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa7fdbe_924dc3c6","line":79,"updated":"2014-10-27 19:06:58.000000000","message":"These deletes should really be in addCleanups right after their create calls. Actually the helper methods in the base class should do this as they do for the helper methods that create other types of objects.","commit_id":"c98825afb3f1e8003460ccdc994f8898e3424374"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f68d45bf49d188eca7fe640afa6d2d8b529d09bb","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        container_name \u003d self.create_container()"},{"line_number":77,"context_line":"        obj_name, _ \u003d self.upload_object_to_container(container_name)"},{"line_number":78,"context_line":"        self._confirm_notifications(container_name, obj_name)"},{"line_number":79,"context_line":"        self.delete_object(container_name, obj_name)"},{"line_number":80,"context_line":"        self.delete_container(container_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9aa7fdbe_309ebd63","line":79,"in_reply_to":"9aa7fdbe_924dc3c6","updated":"2014-10-28 12:26:33.000000000","message":"Right, I\u0027ve fixed this in the super class, and made this patchset depend on that fix. Thanks!","commit_id":"c98825afb3f1e8003460ccdc994f8898e3424374"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"5fd6f7667381a3a5919e1fb2f26d51a8e6f2d184","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    @classmethod"},{"line_number":42,"context_line":"    def resource_setup(cls):"},{"line_number":43,"context_line":"        super(TestSwiftTelemetry, cls).resource_setup()"},{"line_number":44,"context_line":"        if not (CONF.service_available.ceilometer):"},{"line_number":45,"context_line":"            skip_msg \u003d (\"%s skipped. ceilometer is not available\" %"},{"line_number":46,"context_line":"                        cls.__name__)"},{"line_number":47,"context_line":"            raise cls.skipException(skip_msg)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9aa7fdbe_befd053e","line":44,"updated":"2014-10-29 05:11:15.000000000","message":"ceilometer services checking will be done by \u0027service\u0027 decorator used for test case (L73). We can remove the service check from here.","commit_id":"626b56bd5a6bf466ba26881de448c2522c4f6c43"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"7a7ba0c935a27dd2f4b5023b330f7b09b0e639cb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def _confirm_notifications(self, container_name, obj_name):"},{"line_number":48,"context_line":"        containers \u003d []"},{"line_number":49,"context_line":"        objects \u003d []"},{"line_number":50,"context_line":"        # Loop for up to 120 seconds waiting on notifications"},{"line_number":51,"context_line":"        for count in range(120):"},{"line_number":52,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":53,"context_line":"                \u0027storage.api.request\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8c0949_717d396e","line":50,"updated":"2014-11-05 13:32:18.000000000","message":"I\u0027m not sure why 120 secs is sufficient here. Should we leave TODO or NOTE to understand this magic number?","commit_id":"187076883cf1c532e326c7765e85c9b82e65ffba"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"39f758e349f15af037ea85b52c709d80b4ba598a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def _confirm_notifications(self, container_name, obj_name):"},{"line_number":48,"context_line":"        containers \u003d []"},{"line_number":49,"context_line":"        objects \u003d []"},{"line_number":50,"context_line":"        # Loop for up to 120 seconds waiting on notifications"},{"line_number":51,"context_line":"        for count in range(120):"},{"line_number":52,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":53,"context_line":"                \u0027storage.api.request\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a8c0949_9139c543","line":50,"in_reply_to":"7a8c0949_717d396e","updated":"2014-11-05 13:49:56.000000000","message":"Yeah, good point. I\u0027m not sure what to say in the note though. Basically I pulled 120 out of thin air. I wanted it long enough to grant some leeway in the face of notifications lagging on the bus but not so long that it didn\u0027t cause a failure when notifications are lagging too much on the bus.\n\nI know from conversations in #qa that any tests which rely on verifying notifications are not very welcome in tempest these days but I\u0027m largely of the school of thought that if things aren\u0027t working reliably and smoothly in real life the tests should reflect that to cause enough pain to lead to eventual fixes. In that sense I\u0027d be inclined to lower 120 to something much smaller and cause lots of failures.\n\nHowever it has been demonstrated time and time again that latency in the test nodes can be both extreme in length and extreme in unpredictability and apparently not straightforward to fix. It\u0027d be nice if we could though.\n\nI\u0027ll make another patchset with a small NOTE that is less contentious than the above...","commit_id":"187076883cf1c532e326c7765e85c9b82e65ffba"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"469c051931ba926c40db7347f5eef867b3220d6a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def resource_setup(cls):"},{"line_number":43,"context_line":"        super(TestSwiftTelemetry, cls).resource_setup()"},{"line_number":44,"context_line":"        # establish clients"},{"line_number":45,"context_line":"        cls.telemetry_client \u003d cls.manager.telemetry_client"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _confirm_notifications(self, container_name, obj_name):"},{"line_number":48,"context_line":"        containers \u003d []"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_552cee4a","line":45,"updated":"2014-11-10 18:33:22.000000000","message":"why not add this to manager for all tests to use?","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"41d9492f4dbd2818f44fd357e0d27cbf61a78b3c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def resource_setup(cls):"},{"line_number":43,"context_line":"        super(TestSwiftTelemetry, cls).resource_setup()"},{"line_number":44,"context_line":"        # establish clients"},{"line_number":45,"context_line":"        cls.telemetry_client \u003d cls.manager.telemetry_client"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _confirm_notifications(self, container_name, obj_name):"},{"line_number":48,"context_line":"        containers \u003d []"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_7f1d2ebd","line":45,"in_reply_to":"5a890539_552cee4a","updated":"2014-11-11 14:43:56.000000000","message":"Because at the moment nobody else does use, so YAGNI?\n\nOf course that may not be the desired approach in this context?\n\nWill, however, update the comment to be more grammatically correct.","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"469c051931ba926c40db7347f5eef867b3220d6a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # arbitrary: Long enough to give the notifications to travel"},{"line_number":53,"context_line":"        # across a highly latent bus but not so long as to allow"},{"line_number":54,"context_line":"        # excessive latency to never be visible."},{"line_number":55,"context_line":"        for count in range(120):"},{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_5574ee9b","line":55,"updated":"2014-11-10 18:33:22.000000000","message":"I really don\u0027t like hard coded value like this.\nAt the very least, this should be defined as CONST at the top of the module. would be better to use some existing CONF values. I suggest CONF.network.ping_timeout as its default matches this\n\nAs a understand it, that\u0027s a waiter method. I suggest using call_until_true() like all similar waiters. Alternatively, maybe check that waiters.py or the telemetry_client don\u0027t already have an appropriate waiter you might be able to use?","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a969d6c13fcb33320d9406dedba25056db4fb884","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # arbitrary: Long enough to give the notifications to travel"},{"line_number":53,"context_line":"        # across a highly latent bus but not so long as to allow"},{"line_number":54,"context_line":"        # excessive latency to never be visible."},{"line_number":55,"context_line":"        for count in range(120):"},{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_dfef01af","line":55,"in_reply_to":"5a890539_5574ee9b","updated":"2014-11-11 14:40:29.000000000","message":"@yfried: how long to wait for notification-driven samples to surface in the API is a difficult question for ceilometer tests to answer optimally, as cdent explains in the comment above.\n\nI don\u0027t think the value of network.ping_timeout is particularly relevant since the latency depends on two hops on  the message bus and the ingestion path in the ceilometer collector.","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"41d9492f4dbd2818f44fd357e0d27cbf61a78b3c","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # arbitrary: Long enough to give the notifications to travel"},{"line_number":53,"context_line":"        # across a highly latent bus but not so long as to allow"},{"line_number":54,"context_line":"        # excessive latency to never be visible."},{"line_number":55,"context_line":"        for count in range(120):"},{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_9f6f3992","line":55,"in_reply_to":"5a890539_5574ee9b","updated":"2014-11-11 14:43:56.000000000","message":"I hadn\u0027t been familiar with call_until_true, that looks like a good match. Will do.\n\nIs everyone okay with the notion of overloading ping_timeout? If so I\u0027ll go ahead and use that.","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f9539dd20a9fb3db2c1e3a6440f4677939ec7448","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # arbitrary: Long enough to give the notifications to travel"},{"line_number":53,"context_line":"        # across a highly latent bus but not so long as to allow"},{"line_number":54,"context_line":"        # excessive latency to never be visible."},{"line_number":55,"context_line":"        for count in range(120):"},{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_b9624dd6","line":55,"in_reply_to":"5a890539_9f6f3992","updated":"2014-11-11 17:25:23.000000000","message":"@cdent: IIUC the configured ping timeout is intended to bound the time waited until a test can ping or ssh into a newly spun-up server.\n\nSo it captures more how quickly an instance is expected to fire up, as opposed to how quickly we could expect two hops on the AMQP bus and and a write to the metering store to complete.\n\nTBH it doesn\u0027t seem from my perspective like that overloading the ping_timeout would be sensible, as we could have a scenario where instance start-up is laggy due to say a slowness in glance serving out the test image, whereas the AMQP provider is lightly loaded so notifications and metering messages flow unimpeded. And of course, the vice-versa scenario is also possible.\n\nOpen to correction though, as always.","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a969d6c13fcb33320d9406dedba25056db4fb884","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        # excessive latency to never be visible."},{"line_number":55,"context_line":"        for count in range(120):"},{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":59,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":60,"context_line":"                          for sample in results"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_7f6d2d32","line":57,"updated":"2014-11-11 14:40:29.000000000","message":"Could this query be improved by constraining on timestamp before the swift call on line 76 is made?\n\n(i.e. to ensure that we don\u0027t inadvertently declare victory on prior storage.api.request samples?)","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"469c051931ba926c40db7347f5eef867b3220d6a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":59,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":60,"context_line":"                          for sample in results"},{"line_number":61,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":62,"context_line":"                          !\u003d \u0027None\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_4477dd02","line":59,"updated":"2014-11-10 18:33:22.000000000","message":"I\u0027m not familiar with either Swift or Celiometer. Are you sure that the client might not return a valid list as a result of stuff that happens outside the test?","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"903e172d3ffcf47a6253dd6ba0576bdc901db40b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":59,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":60,"context_line":"                          for sample in results"},{"line_number":61,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":62,"context_line":"                          !\u003d \u0027None\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_597329e9","line":59,"in_reply_to":"5a890539_39b57dee","updated":"2014-11-11 17:38:46.000000000","message":"call_until_true takes a closure which returns true or false, that closure is one we design ourselves, so we can make it not only that there are some containers and objects, but that they are the ones we are looking for, not just any.\n\nDesigning that closure will take some finesse, I guess.","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a969d6c13fcb33320d9406dedba25056db4fb884","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":59,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":60,"context_line":"                          for sample in results"},{"line_number":61,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":62,"context_line":"                          !\u003d \u0027None\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_3fac85a0","line":59,"in_reply_to":"5a890539_4477dd02","updated":"2014-11-11 14:40:29.000000000","message":"@yfried: do you mean, this code should be made more defensive to avoid the KeyError in case the \u0027container\u0027 field is completely missing from the resource_metadata? e.g.\n\n  containers \u003d [s[\u0027resource_metadata\u0027].get(\u0027container\u0027)\n                for s in results\n                if s[\u0027resource_metadata\u0027].get(\u0027container\u0027)]\n\nor more that the list returned by the client could possibly be completely mal-formed and not even contain valid samples?\n\nIt\u0027s fair I think for a test like this to make some minimal assumptions about the wellformed-ness of API responses when the status code indicates success.","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"41d9492f4dbd2818f44fd357e0d27cbf61a78b3c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":59,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":60,"context_line":"                          for sample in results"},{"line_number":61,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":62,"context_line":"                          !\u003d \u0027None\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_df7461ff","line":59,"in_reply_to":"5a890539_4477dd02","updated":"2014-11-11 14:43:56.000000000","message":"If there is another testing putting content to swift concurrently then a list could potentially happening. Changing to call_until_true will encapsulate the checking of the contents of containers, not just the containers being there, so should get us to the right place.","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d20205ed645bbbb98a75d9b0537578c82e030196","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":59,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":60,"context_line":"                          for sample in results"},{"line_number":61,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":62,"context_line":"                          !\u003d \u0027None\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_d4f9a04e","line":59,"in_reply_to":"5a890539_597329e9","updated":"2014-11-11 18:11:55.000000000","message":"@cdent: a-ha, I see. I thought the proposal was to apply call_until_true directly on the  telemetry_client.list_samples as opposed to an intermediary function.\n\nYep, I guess that would indeed make the code marginally less verbose, and more consistent with other tests. But of course, the problem of sizing the wait is unchanged. I agree that 120s is acceptably conservative as a first stab at this.","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f9539dd20a9fb3db2c1e3a6440f4677939ec7448","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":57,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":58,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":59,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":60,"context_line":"                          for sample in results"},{"line_number":61,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":62,"context_line":"                          !\u003d \u0027None\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_39b57dee","line":59,"in_reply_to":"5a890539_df7461ff","updated":"2014-11-11 17:25:23.000000000","message":"@cdent: I may be missing something, but I thought call_until_true swallowed the response from the call, so seems we\u0027d have less checking that the samples have the expected metadata set (?)","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"469c051931ba926c40db7347f5eef867b3220d6a","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                          for sample in results"},{"line_number":61,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":62,"context_line":"                          !\u003d \u0027None\u0027]"},{"line_number":63,"context_line":"            objects \u003d [sample[\u0027resource_metadata\u0027][\u0027object\u0027]"},{"line_number":64,"context_line":"                       for sample in results"},{"line_number":65,"context_line":"                       if sample[\u0027resource_metadata\u0027][\u0027object\u0027] !\u003d \u0027None\u0027]"},{"line_number":66,"context_line":"            if len(objects) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_732c9d4b","line":63,"updated":"2014-11-10 18:33:22.000000000","message":"same question here","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"469c051931ba926c40db7347f5eef867b3220d6a","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            if len(objects) \u003e 0:"},{"line_number":67,"context_line":"                break"},{"line_number":68,"context_line":"            time.sleep(1)"},{"line_number":69,"context_line":"        LOG.debug(\u0027requested %s/120 samples\u0027, count)"},{"line_number":70,"context_line":"        self.assertIn(container_name, containers)"},{"line_number":71,"context_line":"        self.assertIn(obj_name, objects)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a890539_55886e22","line":69,"updated":"2014-11-10 18:33:22.000000000","message":"see above comment about hard-coded values","commit_id":"59106a8d2e39b6ac0adf8d3a88f77ddd025aa64f"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"a17d337214bc235d78cbf8268224c8798b3cbfc5","unresolved":false,"context_lines":[{"line_number":27,"context_line":"# NOTE(chdent): The choice of 120 seconds is fairly"},{"line_number":28,"context_line":"# arbitrary: Long enough to give the notifications the"},{"line_number":29,"context_line":"# chance to travel # across a highly latent bus but not"},{"line_number":30,"context_line":"# so long as to allow excessive latency to never be visible."},{"line_number":31,"context_line":"NOTIFICATIONS_WAIT \u003d 120"},{"line_number":32,"context_line":"NOTIFICATIONS_SLEEP \u003d 1"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_b9715fe2","line":30,"updated":"2014-11-12 07:59:59.000000000","message":"nit: please add a TODO so we know this value needs more attention down the road","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2ebc9ad87ea40f3eac4e56e89990178695d435eb","unresolved":false,"context_lines":[{"line_number":27,"context_line":"# NOTE(chdent): The choice of 120 seconds is fairly"},{"line_number":28,"context_line":"# arbitrary: Long enough to give the notifications the"},{"line_number":29,"context_line":"# chance to travel # across a highly latent bus but not"},{"line_number":30,"context_line":"# so long as to allow excessive latency to never be visible."},{"line_number":31,"context_line":"NOTIFICATIONS_WAIT \u003d 120"},{"line_number":32,"context_line":"NOTIFICATIONS_SLEEP \u003d 1"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_c49d5b5b","line":30,"in_reply_to":"5a890539_b9715fe2","updated":"2014-11-12 11:25:39.000000000","message":"\u0027k, in the next set","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"696c58d61c9fda91af008b53aad78b14647441d8","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# arbitrary: Long enough to give the notifications the"},{"line_number":29,"context_line":"# chance to travel # across a highly latent bus but not"},{"line_number":30,"context_line":"# so long as to allow excessive latency to never be visible."},{"line_number":31,"context_line":"NOTIFICATIONS_WAIT \u003d 120"},{"line_number":32,"context_line":"NOTIFICATIONS_SLEEP \u003d 1"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_94ac6aa2","line":31,"updated":"2014-11-12 08:21:24.000000000","message":"just saw conf values for \"container_sync_timeout\" and \"container_sync_interval\" can these be used here?","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2ebc9ad87ea40f3eac4e56e89990178695d435eb","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# arbitrary: Long enough to give the notifications the"},{"line_number":29,"context_line":"# chance to travel # across a highly latent bus but not"},{"line_number":30,"context_line":"# so long as to allow excessive latency to never be visible."},{"line_number":31,"context_line":"NOTIFICATIONS_WAIT \u003d 120"},{"line_number":32,"context_line":"NOTIFICATIONS_SLEEP \u003d 1"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_8416f3a5","line":31,"in_reply_to":"5a890539_94ac6aa2","updated":"2014-11-12 11:25:39.000000000","message":"There\u0027s no container sync going on here: I believe that\u0027s when a container is synchronized between several swift replicas.\n\nAll that this wait is doing is providing an opportunity for a notification on the AMQP bus to get across that bus. In the past there has been latency on this bus when testing nodes are highly loaded. As we cannot predict that load, we need to be flexible.\n\nHowever, as Eoghan points out, its probably not a good idea to overload an existing config setting.\n\nNote that in my local testing there\u0027s no latency at all: we don\u0027t have to wait for true: it is true the first time.\n\nPutting the loop in is the result of observing logs from the gate from earlier versions of this patchset.","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"a17d337214bc235d78cbf8268224c8798b3cbfc5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"            # Extract container info from samples."},{"line_number":67,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":68,"context_line":"                          for sample in results"},{"line_number":69,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":70,"context_line":"                          !\u003d \u0027None\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_940aaa1f","line":67,"updated":"2014-11-12 07:59:59.000000000","message":"nit: maybe log this in DEBUG level?","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"b714eb2a41d264857b23dff696c718e594c3fb31","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"            # Extract container info from samples."},{"line_number":67,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":68,"context_line":"                          for sample in results"},{"line_number":69,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":70,"context_line":"                          !\u003d \u0027None\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_c79d5d5b","line":67,"in_reply_to":"5a890539_8464334a","updated":"2014-11-12 11:47:17.000000000","message":"you are right. didn\u0027t see that one","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2ebc9ad87ea40f3eac4e56e89990178695d435eb","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"            # Extract container info from samples."},{"line_number":67,"context_line":"            containers \u003d [sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":68,"context_line":"                          for sample in results"},{"line_number":69,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":70,"context_line":"                          !\u003d \u0027None\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_8464334a","line":67,"in_reply_to":"5a890539_940aaa1f","updated":"2014-11-12 11:25:39.000000000","message":"That would duplicate what\u0027s in the results log just above. We can deduce the value of both containers and objects from the value of results, however we cannot deduce the value of results from containers and objects so given that we don\u0027t want to spam the logs too much (ceilometer already has that reputation), I think just the one log message is best.","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"a17d337214bc235d78cbf8268224c8798b3cbfc5","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":70,"context_line":"                          !\u003d \u0027None\u0027]"},{"line_number":71,"context_line":"            # Extract object info from samples."},{"line_number":72,"context_line":"            objects \u003d [sample[\u0027resource_metadata\u0027][\u0027object\u0027]"},{"line_number":73,"context_line":"                       for sample in results"},{"line_number":74,"context_line":"                       if sample[\u0027resource_metadata\u0027][\u0027object\u0027] !\u003d \u0027None\u0027]"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_1907d31d","line":72,"updated":"2014-11-12 07:59:59.000000000","message":"nit: same here","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2ebc9ad87ea40f3eac4e56e89990178695d435eb","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                          if sample[\u0027resource_metadata\u0027][\u0027container\u0027]"},{"line_number":70,"context_line":"                          !\u003d \u0027None\u0027]"},{"line_number":71,"context_line":"            # Extract object info from samples."},{"line_number":72,"context_line":"            objects \u003d [sample[\u0027resource_metadata\u0027][\u0027object\u0027]"},{"line_number":73,"context_line":"                       for sample in results"},{"line_number":74,"context_line":"                       if sample[\u0027resource_metadata\u0027][\u0027object\u0027] !\u003d \u0027None\u0027]"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_e4541756","line":72,"in_reply_to":"5a890539_1907d31d","updated":"2014-11-12 11:25:39.000000000","message":"See above.","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"a17d337214bc235d78cbf8268224c8798b3cbfc5","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                       for sample in results"},{"line_number":74,"context_line":"                       if sample[\u0027resource_metadata\u0027][\u0027object\u0027] !\u003d \u0027None\u0027]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"            return (containers"},{"line_number":77,"context_line":"                    and objects"},{"line_number":78,"context_line":"                    and container_name in containers"},{"line_number":79,"context_line":"                    and obj_name in objects)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_f959275c","line":76,"updated":"2014-11-12 07:59:59.000000000","message":"nit: maybe this would be more readable as:\nall(containers, objects, container_name in containers, obj_name in objects)","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"b714eb2a41d264857b23dff696c718e594c3fb31","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                       for sample in results"},{"line_number":74,"context_line":"                       if sample[\u0027resource_metadata\u0027][\u0027object\u0027] !\u003d \u0027None\u0027]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"            return (containers"},{"line_number":77,"context_line":"                    and objects"},{"line_number":78,"context_line":"                    and container_name in containers"},{"line_number":79,"context_line":"                    and obj_name in objects)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_47a96d7a","line":76,"in_reply_to":"5a890539_a445af71","updated":"2014-11-12 11:47:17.000000000","message":"ok","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2ebc9ad87ea40f3eac4e56e89990178695d435eb","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                       for sample in results"},{"line_number":74,"context_line":"                       if sample[\u0027resource_metadata\u0027][\u0027object\u0027] !\u003d \u0027None\u0027]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"            return (containers"},{"line_number":77,"context_line":"                    and objects"},{"line_number":78,"context_line":"                    and container_name in containers"},{"line_number":79,"context_line":"                    and obj_name in objects)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_a445af71","line":76,"in_reply_to":"5a890539_f959275c","updated":"2014-11-12 11:25:39.000000000","message":"I\u0027ll have to disagree on this one for two reasons:\n\n* explicitly stating the booleans is, to me, far more readable\n* we want to return False as soon as we find False, all() has to evaluate all members of the iterable before it can return","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"a17d337214bc235d78cbf8268224c8798b3cbfc5","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        self.assertTrue(test.call_until_true(_check_samples,"},{"line_number":82,"context_line":"                                             NOTIFICATIONS_WAIT,"},{"line_number":83,"context_line":"                                             NOTIFICATIONS_SLEEP),"},{"line_number":84,"context_line":"                        \u0027Notifications received\u0027)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @test.services(\u0027object_storage\u0027, \u0027telemetry\u0027)"},{"line_number":87,"context_line":"    def test_swift_middleware_notifies(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_74037e0d","line":84,"updated":"2014-11-12 07:59:59.000000000","message":"I think you are misusing the msg argument. it should be an error message to be logged in case call_until_true fails","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2ebc9ad87ea40f3eac4e56e89990178695d435eb","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        self.assertTrue(test.call_until_true(_check_samples,"},{"line_number":82,"context_line":"                                             NOTIFICATIONS_WAIT,"},{"line_number":83,"context_line":"                                             NOTIFICATIONS_SLEEP),"},{"line_number":84,"context_line":"                        \u0027Notifications received\u0027)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @test.services(\u0027object_storage\u0027, \u0027telemetry\u0027)"},{"line_number":87,"context_line":"    def test_swift_middleware_notifies(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a890539_44540b21","line":84,"in_reply_to":"5a890539_74037e0d","updated":"2014-11-12 11:25:39.000000000","message":"I went all over the internet trying to find a standard on what the assertion message should be and there doesn\u0027t seem to be a consensus. I pretty much agree with you, but found more statements to the contrary.\n\nI\u0027ll change it.","commit_id":"f9d90752616b209111b0aa8f78f4a7c285363e49"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"59ea197b9824c6e09f94751ea3c8d655ddee2387","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    @classmethod"},{"line_number":46,"context_line":"    def resource_setup(cls):"},{"line_number":47,"context_line":"        super(TestSwiftTelemetry, cls).resource_setup()"},{"line_number":48,"context_line":"        cls.telemetry_client \u003d cls.manager.telemetry_client"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _confirm_notifications(self, container_name, obj_name):"},{"line_number":51,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"5a890539_8b134e0c","line":48,"updated":"2014-11-12 20:32:39.000000000","message":"This fails if ceilometer is not running since in that case the manager does not set the telemetry_client. A conditional skip is needed here. The inheritance from SwiftScenarioTest will cause a skip here if swift is not running.","commit_id":"3e3300973338d6e5358cce1c9bbc5ebb019f7a5d"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"073c118137a5521df5edacb686fd93257d33f0be","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            called again."},{"line_number":70,"context_line":"            \"\"\""},{"line_number":71,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":72,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":73,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"            # Extract container info from samples."}],"source_content_type":"text/x-python","patch_set":20,"id":"5a890539_c0d7d921","line":72,"updated":"2014-11-13 14:54:39.000000000","message":"Mentioned on an earlier patchset:\n\nCould this query be improved by constraining on a timestamp from just before the swift calls on lines 98-99 are made?\n\n(i.e. to ensure that we don\u0027t inadvertently declare victory on prior/unrelated storage.api.request samples?)\"","commit_id":"10a5be2f69e6ebd083eab53023939d104dfc55a2"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6a6d0f77f1067bd6e520dba3089f7307c6384ea2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            called again."},{"line_number":70,"context_line":"            \"\"\""},{"line_number":71,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":72,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":73,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"            # Extract container info from samples."}],"source_content_type":"text/x-python","patch_set":20,"id":"5a890539_570ba429","line":72,"in_reply_to":"5a890539_2327c713","updated":"2014-11-13 21:29:14.000000000","message":"\u003e Victory is declared only when container_name and obj_name are matched and both of those are unique identifiers for just this test\n\nAh yes, nicely done.\n\nSo in terms complexity, I don\u0027t think the timestamp constraint would actually be fragile in this case, as there\u0027s a very definite anchor point ... i.e. current time before the swift API calls are issued.\n\nBut aside from that, you could potentially reduce complexity a tad, by replacing the list comprehensions with metadata-based constraints on the API query. Not a blocker though, just a suggestion.","commit_id":"10a5be2f69e6ebd083eab53023939d104dfc55a2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b1fc6ab27f4f98640e5f74bd12700f469641d5d6","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            called again."},{"line_number":70,"context_line":"            \"\"\""},{"line_number":71,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":72,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":73,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"            # Extract container info from samples."}],"source_content_type":"text/x-python","patch_set":20,"id":"5a890539_d775c1fa","line":72,"in_reply_to":"5a890539_570ba429","updated":"2014-11-14 10:59:06.000000000","message":"I think we should let it ride as it is. As this stands the focus of the test is gathering the data and processing the resulting list (the results will be a list that needs to be processed in some form, whether we have a more narrow query or not). I think a visible query would be distracting noise.","commit_id":"10a5be2f69e6ebd083eab53023939d104dfc55a2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f8ca6a136d527c80481dc8a3620fdfce574e685e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            called again."},{"line_number":70,"context_line":"            \"\"\""},{"line_number":71,"context_line":"            _, results \u003d self.telemetry_client.list_samples("},{"line_number":72,"context_line":"                \u0027storage.api.request\u0027)"},{"line_number":73,"context_line":"            LOG.debug(\u0027got samples %s\u0027, results)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"            # Extract container info from samples."}],"source_content_type":"text/x-python","patch_set":20,"id":"5a890539_2327c713","line":72,"in_reply_to":"5a890539_c0d7d921","updated":"2014-11-13 15:21:29.000000000","message":"Victory is declared only when container_name and obj_name are matched and both of those are unique identifiers for just this test (see lines 87-88).\n\nAn argument could be made to limit the query based on time in order to limit the size of the result set but I haven\u0027t done that because:\n\n* it complicates the relatively simple call to list_samples\n* it introduces yet another dimension on which to consider time, an area which we\u0027ve already demonstrated has dragons galore\n\nSo, yeah, I\u0027d rather just do the simplest thing in this case. If it proves not to work, we can fix it.","commit_id":"10a5be2f69e6ebd083eab53023939d104dfc55a2"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"db15babcc337db8609e97739852d89edee3dbaf3","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @classmethod"},{"line_number":49,"context_line":"    def resource_setup(cls):"},{"line_number":50,"context_line":"        super(TestSwiftTelemetry, cls).resource_setup()"},{"line_number":51,"context_line":"        if not CONF.service_available.ceilometer:"},{"line_number":52,"context_line":"            skip_msg \u003d (\"%s skipped as ceilometer is not available\" %"},{"line_number":53,"context_line":"                        cls.__name__)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_180bda2a","line":50,"updated":"2014-11-15 20:25:38.000000000","message":"IMHO it\u0027s better to save resources and time and put this line after config check","commit_id":"9a3a79c2a31f7adadec7a6e69db4099942f5dd1e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9005dce2ed1c2f3706574724c610337ca3550132","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @classmethod"},{"line_number":49,"context_line":"    def resource_setup(cls):"},{"line_number":50,"context_line":"        super(TestSwiftTelemetry, cls).resource_setup()"},{"line_number":51,"context_line":"        if not CONF.service_available.ceilometer:"},{"line_number":52,"context_line":"            skip_msg \u003d (\"%s skipped as ceilometer is not available\" %"},{"line_number":53,"context_line":"                        cls.__name__)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_27ab0f76","line":50,"in_reply_to":"5a890539_180bda2a","updated":"2014-11-16 15:10:39.000000000","message":"Done","commit_id":"9a3a79c2a31f7adadec7a6e69db4099942f5dd1e"}]}
