)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f57b70bc903e9afc20c25990b0ae2a04d37e5be7","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  provider."},{"line_number":14,"context_line":"- We refresh trait information along with aggregate information whenever"},{"line_number":15,"context_line":"  we \"ensure\" a provider exists."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Note that this change set consolidates the refreshing (including cache"},{"line_number":18,"context_line":"expiry) of aggregate and trait associations into a single method.  The"},{"line_number":19,"context_line":"theory being that both aggregate associations and trait associations"},{"line_number":20,"context_line":"should change out of band with roughly the same frequency (i.e. very"},{"line_number":21,"context_line":"rarely)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I33d01d8cab43ce6cdde151d2e9429921a140e88d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"df87a7cf_4043df13","line":21,"range":{"start_line":16,"start_character":0,"end_line":21,"end_character":8},"updated":"2017-12-08 14:38:15.000000000","message":"Aha (per earlier comments in the series)","commit_id":"08d99e37d11ecff25c7d35bf30c2a25dc62f81a6"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"94a124d72ae2aaa4c917301417f4e0700e44a6ab","unresolved":false,"context_lines":[{"line_number":18,"context_line":"expiry) of aggregate and trait associations into a single method.  The"},{"line_number":19,"context_line":"theory being that both aggregate associations and trait associations"},{"line_number":20,"context_line":"should change out of band with roughly the same frequency (i.e. very"},{"line_number":21,"context_line":"rarely)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I33d01d8cab43ce6cdde151d2e9429921a140e88d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9f91af0f_85188b1d","line":21,"updated":"2018-01-03 11:54:47.000000000","message":"While I agree that aggregate changes will not be common, I fear that despite our hopes otherwise, people will manipulate traits frequently because a) they can, b) it enables much hackery.\n\nI don\u0027t know that that should change anything about this change, but it is something to be aware of.","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"82eeed8fe0671db21e0609ba8d7585ba427735fa","unresolved":false,"context_lines":[{"line_number":18,"context_line":"expiry) of aggregate and trait associations into a single method.  The"},{"line_number":19,"context_line":"theory being that both aggregate associations and trait associations"},{"line_number":20,"context_line":"should change out of band with roughly the same frequency (i.e. very"},{"line_number":21,"context_line":"rarely)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I33d01d8cab43ce6cdde151d2e9429921a140e88d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9f91af0f_dca64a54","line":21,"in_reply_to":"9f91af0f_85188b1d","updated":"2018-01-04 18:44:02.000000000","message":"Noted.  If that becomes an issue, we can reduce the timeout, or come up with some totally different way to keep stuff in sync.  (Subscribe-able notifications pushed from placement back to report client?  The gods help us.)  In any case, you\u0027re right that it\u0027s not something we want to try to tackle here.","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"12951065b142f3dc7952ab328e4616ed8cf38e56","unresolved":false,"context_lines":[{"line_number":18,"context_line":"expiry) of aggregate and trait associations into a single method.  The"},{"line_number":19,"context_line":"theory being that both aggregate associations and trait associations"},{"line_number":20,"context_line":"should change out of band with roughly the same frequency (i.e. very"},{"line_number":21,"context_line":"rarely)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I33d01d8cab43ce6cdde151d2e9429921a140e88d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9f91af0f_d0e32f33","line":21,"in_reply_to":"9f91af0f_ac0661cd","updated":"2018-01-09 17:35:18.000000000","message":"Okay.\n\nWhat documentation?","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"5797b865c8e6fb73d3394f8bb85d9d6368ee1f21","unresolved":false,"context_lines":[{"line_number":18,"context_line":"expiry) of aggregate and trait associations into a single method.  The"},{"line_number":19,"context_line":"theory being that both aggregate associations and trait associations"},{"line_number":20,"context_line":"should change out of band with roughly the same frequency (i.e. very"},{"line_number":21,"context_line":"rarely)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I33d01d8cab43ce6cdde151d2e9429921a140e88d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9f91af0f_ac0661cd","line":21,"in_reply_to":"9f91af0f_dca64a54","updated":"2018-01-09 12:58:04.000000000","message":"+1 to wait until the problem happens before we invent a fix. One thing we could do is to state in the documentation explicitly the existence of such cache and the timeout value so the user can be aware of the possible problems with her hackery.","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"59918e50695cd8b2c147ed21ba752084a3c42f75","unresolved":false,"context_lines":[{"line_number":414,"context_line":"                \"%(status_code)d: %(err_text)s.\","},{"line_number":415,"context_line":"                {\u0027placement_req_id\u0027: placement_req_id, \u0027uuid\u0027: rp_uuid,"},{"line_number":416,"context_line":"                 \u0027status_code\u0027: resp.status_code, \u0027err_text\u0027: resp.text})"},{"line_number":417,"context_line":"        return None"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    @safe_connect"},{"line_number":420,"context_line":"    def _get_resource_provider(self, uuid):"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_ffc8b222","line":417,"range":{"start_line":417,"start_character":15,"end_line":417,"end_character":19},"updated":"2017-12-07 14:21:07.000000000","message":"Right now this returns None to align with _get_provider_aggregates, but in a subsequent patch we should cause both to raise an exception on error.","commit_id":"e6ef1a782d2e8bcbb4c337fd4537e69eb1120181"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"eab5d2fa73ad8f58a4665f15bd44019226d58a60","unresolved":false,"context_lines":[{"line_number":392,"context_line":"    @safe_connect"},{"line_number":393,"context_line":"    def _get_provider_traits(self, rp_uuid):"},{"line_number":394,"context_line":"        \"\"\"Queries the placement API for a resource provider\u0027s traits.  Returns"},{"line_number":395,"context_line":"        a set() of string trait names, or None if no such resource provider was"},{"line_number":396,"context_line":"        found or there was an error communicating with the placement API."},{"line_number":397,"context_line":""},{"line_number":398,"context_line":"        :param rp_uuid: UUID of the resource provider to grab traits for."}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_a0ff4ba9","line":395,"range":{"start_line":395,"start_character":38,"end_line":395,"end_character":46},"updated":"2017-12-08 14:48:34.000000000","message":"I guess that will be changed to raising an exception in a separate patch.","commit_id":"08d99e37d11ecff25c7d35bf30c2a25dc62f81a6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"eab5d2fa73ad8f58a4665f15bd44019226d58a60","unresolved":false,"context_lines":[{"line_number":398,"context_line":"        :param rp_uuid: UUID of the resource provider to grab traits for."},{"line_number":399,"context_line":"        \"\"\""},{"line_number":400,"context_line":"        resp \u003d self.get(\"/resource_providers/%s/traits\" % rp_uuid,"},{"line_number":401,"context_line":"                        version\u003d\u00271.6\u0027)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        if resp.status_code \u003d\u003d 200:"},{"line_number":404,"context_line":"            return set(resp.json()[\u0027traits\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_0093975c","line":401,"range":{"start_line":401,"start_character":24,"end_line":401,"end_character":37},"updated":"2017-12-08 14:48:34.000000000","message":"The client will not work if the placement version is less than 1.14 anyhow. So I think we can define that as single version we use in every request so that we don\u0027t have to write it out at every self.get call. Of course this could be done in a separate patch.","commit_id":"08d99e37d11ecff25c7d35bf30c2a25dc62f81a6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f57b70bc903e9afc20c25990b0ae2a04d37e5be7","unresolved":false,"context_lines":[{"line_number":662,"context_line":"            self._provider_tree.update_inventory(rp_uuid, curr_inv, cur_gen)"},{"line_number":663,"context_line":"        return curr"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"    def _refresh_associations(self, rp_uuid, generation\u003dNone, force\u003dFalse):"},{"line_number":666,"context_line":"        \"\"\"Refresh the aggregates and traits for the provided resource provider"},{"line_number":667,"context_line":"        uuid."},{"line_number":668,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_2057bbcc","line":665,"range":{"start_line":665,"start_character":17,"end_line":665,"end_character":29},"updated":"2017-12-08 14:38:15.000000000","message":"metadata? This is metadata associated with the given resource provider in a way, right?","commit_id":"08d99e37d11ecff25c7d35bf30c2a25dc62f81a6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4efa6f97ba2ec6178849e591f9248e4095f98336","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        # provider and inventory information"},{"line_number":264,"context_line":"        self._provider_tree \u003d provider_tree.ProviderTree()"},{"line_number":265,"context_line":"        # Track the last time we updated providers\u0027 aggregates and traits"},{"line_number":266,"context_line":"        self.association_refresh_time \u003d {}"},{"line_number":267,"context_line":"        self._client \u003d self._create_client()"},{"line_number":268,"context_line":"        # NOTE(danms): Keep track of how naggy we\u0027ve been"},{"line_number":269,"context_line":"        self._warn_count \u003d 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f91af0f_73c08c7c","line":266,"range":{"start_line":266,"start_character":13,"end_line":266,"end_character":37},"updated":"2018-01-04 19:50:40.000000000","message":"if you change this again, would be cool to be consistent and prefix the attribute name with _ since it\u0027s \"private\".","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7feceb686606449816dbbc121dc022fb5b61de19","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        # provider and inventory information"},{"line_number":264,"context_line":"        self._provider_tree \u003d provider_tree.ProviderTree()"},{"line_number":265,"context_line":"        # Track the last time we updated providers\u0027 aggregates and traits"},{"line_number":266,"context_line":"        self.association_refresh_time \u003d {}"},{"line_number":267,"context_line":"        self._client \u003d self._create_client()"},{"line_number":268,"context_line":"        # NOTE(danms): Keep track of how naggy we\u0027ve been"},{"line_number":269,"context_line":"        self._warn_count \u003d 0"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f91af0f_2774fe98","line":266,"range":{"start_line":266,"start_character":13,"end_line":266,"end_character":37},"in_reply_to":"9f91af0f_73c08c7c","updated":"2018-01-04 23:08:25.000000000","message":"Fixed in followon: https://review.openstack.org/531260","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4efa6f97ba2ec6178849e591f9248e4095f98336","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            LOG.warning("},{"line_number":417,"context_line":"                \"[%(placement_req_id)s] Tried to get a provider\u0027s traits, but \""},{"line_number":418,"context_line":"                \"the provider %(uuid)s does not exist.\","},{"line_number":419,"context_line":"                {\u0027uuid\u0027: rp_uuid, \u0027placement_req_id\u0027: placement_req_id})"},{"line_number":420,"context_line":"        else:"},{"line_number":421,"context_line":"            LOG.error("},{"line_number":422,"context_line":"                \"[%(placement_req_id)s] Failed to retrieve traits from \""}],"source_content_type":"text/x-python","patch_set":9,"id":"9f91af0f_b34b7429","line":419,"updated":"2018-01-04 19:50:40.000000000","message":"Maybe consider ejecting the provider from the provider tree if this happens? not sure... possibly something to consider in a future patch, not here.","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7feceb686606449816dbbc121dc022fb5b61de19","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            LOG.warning("},{"line_number":417,"context_line":"                \"[%(placement_req_id)s] Tried to get a provider\u0027s traits, but \""},{"line_number":418,"context_line":"                \"the provider %(uuid)s does not exist.\","},{"line_number":419,"context_line":"                {\u0027uuid\u0027: rp_uuid, \u0027placement_req_id\u0027: placement_req_id})"},{"line_number":420,"context_line":"        else:"},{"line_number":421,"context_line":"            LOG.error("},{"line_number":422,"context_line":"                \"[%(placement_req_id)s] Failed to retrieve traits from \""}],"source_content_type":"text/x-python","patch_set":9,"id":"9f91af0f_8792aa9d","line":419,"in_reply_to":"9f91af0f_b34b7429","updated":"2018-01-04 23:08:25.000000000","message":"Later in the series [1] I make this raise an exception.\n\nIn the future, when we address retries for generation mismatches, we may also want to consider retries for this kind of condition.  Though they would likely be at a higher level.\n\nBut yeah, future considerations.\n\n[1] https://review.openstack.org/#/c/526540/","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"94a124d72ae2aaa4c917301417f4e0700e44a6ab","unresolved":false,"context_lines":[{"line_number":714,"context_line":"        \"\"\"Respond True if aggregates and traits have not been refreshed"},{"line_number":715,"context_line":"        \"recently\"."},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"        It is old if association_refresh_time for this uuid is not set"},{"line_number":718,"context_line":"        or more than ASSOCIATION_REFRESH seconds ago."},{"line_number":719,"context_line":"        \"\"\""},{"line_number":720,"context_line":"        refresh_time \u003d self.association_refresh_time.get(uuid, 0)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f91af0f_e5aab783","line":717,"updated":"2018-01-03 11:54:47.000000000","message":"This is carried over from earlier, but I just noticed that \"It\" doesn\u0027t refer properly.","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7feceb686606449816dbbc121dc022fb5b61de19","unresolved":false,"context_lines":[{"line_number":714,"context_line":"        \"\"\"Respond True if aggregates and traits have not been refreshed"},{"line_number":715,"context_line":"        \"recently\"."},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"        It is old if association_refresh_time for this uuid is not set"},{"line_number":718,"context_line":"        or more than ASSOCIATION_REFRESH seconds ago."},{"line_number":719,"context_line":"        \"\"\""},{"line_number":720,"context_line":"        refresh_time \u003d self.association_refresh_time.get(uuid, 0)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f91af0f_e71db60f","line":717,"in_reply_to":"9f91af0f_7c4cde9d","updated":"2018-01-04 23:08:25.000000000","message":"Fixed in followon: https://review.openstack.org/531260","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"82eeed8fe0671db21e0609ba8d7585ba427735fa","unresolved":false,"context_lines":[{"line_number":714,"context_line":"        \"\"\"Respond True if aggregates and traits have not been refreshed"},{"line_number":715,"context_line":"        \"recently\"."},{"line_number":716,"context_line":""},{"line_number":717,"context_line":"        It is old if association_refresh_time for this uuid is not set"},{"line_number":718,"context_line":"        or more than ASSOCIATION_REFRESH seconds ago."},{"line_number":719,"context_line":"        \"\"\""},{"line_number":720,"context_line":"        refresh_time \u003d self.association_refresh_time.get(uuid, 0)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f91af0f_7c4cde9d","line":717,"in_reply_to":"9f91af0f_e5aab783","updated":"2018-01-04 18:44:02.000000000","message":"Should be \"they\" I guess?  Will fix in a followon.","commit_id":"19d17ddeaf57d328a86cb7b51613c294a36557ad"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"2c28991fe5b68ed8aea13af3555154da210bfea6","unresolved":false,"context_lines":[{"line_number":409,"context_line":"                        version\u003d\u00271.6\u0027)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        if resp.status_code \u003d\u003d 200:"},{"line_number":412,"context_line":"            return set(resp.json()[\u0027traits\u0027])"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        placement_req_id \u003d get_placement_request_id(resp)"},{"line_number":415,"context_line":"        if resp.status_code \u003d\u003d 404:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_173a7935","line":412,"updated":"2018-01-12 09:38:53.000000000","message":"A little late to the party, but just wanted to get an observation down. Because we\u0027re ignoring the resource_provider_generation in the response, there\u0027s no guarantee that it has not changed since we last checked the inventory, so the two could be out of sync. If we were to pass the expected generation into this method we could check that it matches the returned value. I guess the same would be required for aggregates. Perhaps I\u0027m missing something?","commit_id":"1b5b724b7496a1f592abc7bdf69a85e7dc4463fa"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fdfed987e3a073aeddb7b1aa08e07a2ad0be55df","unresolved":false,"context_lines":[{"line_number":409,"context_line":"                        version\u003d\u00271.6\u0027)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        if resp.status_code \u003d\u003d 200:"},{"line_number":412,"context_line":"            return set(resp.json()[\u0027traits\u0027])"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        placement_req_id \u003d get_placement_request_id(resp)"},{"line_number":415,"context_line":"        if resp.status_code \u003d\u003d 404:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_bc94c48c","line":412,"in_reply_to":"7f96bb07_173a7935","updated":"2018-01-12 14:21:16.000000000","message":"You\u0027re not.  This series was developed before we had refined our thoughts on generation handling and concurrent updates.  There\u0027s going to need to be an effort soon (Queens, after feature freeze?) to resolve that issue across the board.\n\nFWIW, my initial thoughts on that are that methods like this one will return the generation along with the requested thing (in this case traits), and whoever up the stack is managing the ProviderTree cache will be responsible for making sure the generation matches.  If it doesn\u0027t, that consumer ought to do a full refresh_associations(force\u003dTrue), which will eventually reinvoke this method.","commit_id":"1b5b724b7496a1f592abc7bdf69a85e7dc4463fa"}],"nova/tests/functional/api/openstack/placement/test_report_client.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"aa6c1cd16d738ca64460bacca81261407208efb3","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                self.client._provider_tree.have_aggregates_changed("},{"line_number":125,"context_line":"                    self.compute_uuid, []))"},{"line_number":126,"context_line":"            self.assertFalse("},{"line_number":127,"context_line":"                self.client._provider_tree.have_traits_changed("},{"line_number":128,"context_line":"                    self.compute_uuid, []))"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"            # TODO(cdent): change this to use the methods built in"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_1a74df98","line":127,"range":{"start_line":127,"start_character":43,"end_line":127,"end_character":62},"updated":"2017-12-14 13:19:58.000000000","message":"This was renamed in a prior patch.  But I don\u0027t think it should have been - see that patch.","commit_id":"4ca657884dd3aa147f798c388f57318726c0450c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3f394d748eaee37df8c111cf220b22970323432a","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                self.client._provider_tree.have_aggregates_changed("},{"line_number":125,"context_line":"                    self.compute_uuid, []))"},{"line_number":126,"context_line":"            self.assertFalse("},{"line_number":127,"context_line":"                self.client._provider_tree.have_traits_changed("},{"line_number":128,"context_line":"                    self.compute_uuid, []))"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"            # TODO(cdent): change this to use the methods built in"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_d7908d51","line":127,"range":{"start_line":127,"start_character":43,"end_line":127,"end_character":62},"in_reply_to":"df87a7cf_1a74df98","updated":"2017-12-14 15:54:21.000000000","message":"Yup, this is reversed now","commit_id":"4ca657884dd3aa147f798c388f57318726c0450c"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f57b70bc903e9afc20c25990b0ae2a04d37e5be7","unresolved":false,"context_lines":[{"line_number":1721,"context_line":"class TestTraits(SchedulerReportClientTestCase):"},{"line_number":1722,"context_line":"    def test_get_provider_traits_found(self):"},{"line_number":1723,"context_line":"        uuid \u003d uuids.compute_node"},{"line_number":1724,"context_line":"        resp_mock \u003d mock.Mock(status_code\u003d200)"},{"line_number":1725,"context_line":"        traits \u003d ["},{"line_number":1726,"context_line":"            \u0027CUSTOM_GOLD\u0027,"},{"line_number":1727,"context_line":"            \u0027CUSTOM_SILVER\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_60d4e320","line":1724,"range":{"start_line":1724,"start_character":20,"end_line":1724,"end_character":46},"updated":"2017-12-08 14:38:15.000000000","message":"One thing I\u0027ve noticed throughout this is that we\u0027re not mocking real objects. We do this all over nova so it\u0027s not something to block on (and claudiub\u0027s efforts [1] might mitigate it entirely) but it\u0027s possibly something to consider.\n\n[1] https://review.openstack.org/#/c/447505/","commit_id":"08d99e37d11ecff25c7d35bf30c2a25dc62f81a6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f57b70bc903e9afc20c25990b0ae2a04d37e5be7","unresolved":false,"context_lines":[{"line_number":1810,"context_line":"                \u0027_associations_stale\u0027)"},{"line_number":1811,"context_line":"    def test_refresh_associations_not_stale(self, mock_stale, mock_trait_get,"},{"line_number":1812,"context_line":"                                            mock_agg_get):"},{"line_number":1813,"context_line":"        \"\"\"Test that refresh associations is not called when the map is"},{"line_number":1814,"context_line":"        not stale."},{"line_number":1815,"context_line":"        \"\"\""},{"line_number":1816,"context_line":"        mock_stale.return_value \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_e0e79311","line":1813,"range":{"start_line":1813,"start_character":65,"end_line":1813,"end_character":68},"updated":"2017-12-08 14:38:15.000000000","message":"cache","commit_id":"08d99e37d11ecff25c7d35bf30c2a25dc62f81a6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f57b70bc903e9afc20c25990b0ae2a04d37e5be7","unresolved":false,"context_lines":[{"line_number":1827,"context_line":"                \u0027_get_provider_traits\u0027)"},{"line_number":1828,"context_line":"    def test_refresh_associations_time(self, mock_trait_get, mock_agg_get,"},{"line_number":1829,"context_line":"                                       log_mock):"},{"line_number":1830,"context_line":"        \"\"\"Test that refresh associations is called when the map is stale.\"\"\""},{"line_number":1831,"context_line":"        uuid \u003d uuids.compute_node"},{"line_number":1832,"context_line":"        # Seed the provider tree so _refresh_associations finds the provider"},{"line_number":1833,"context_line":"        self.client._provider_tree.new_root(\u0027compute\u0027, uuid, 1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_a0ed0bf1","line":1830,"range":{"start_line":1830,"start_character":61,"end_line":1830,"end_character":64},"updated":"2017-12-08 14:38:15.000000000","message":"cache","commit_id":"08d99e37d11ecff25c7d35bf30c2a25dc62f81a6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f57b70bc903e9afc20c25990b0ae2a04d37e5be7","unresolved":false,"context_lines":[{"line_number":1851,"context_line":"        mock_agg_get.reset_mock()"},{"line_number":1852,"context_line":"        mock_trait_get.reset_mock()"},{"line_number":1853,"context_line":""},{"line_number":1854,"context_line":"        with mock.patch(\u0027time.time\u0027) as mock_future:"},{"line_number":1855,"context_line":"            # Not called a second time because not enough time has passed."},{"line_number":1856,"context_line":"            mock_future.return_value \u003d now + report.ASSOCIATION_REFRESH / 2"},{"line_number":1857,"context_line":"            self.client._refresh_associations(uuid, 1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_c0ea8fd6","line":1854,"range":{"start_line":1854,"start_character":40,"end_line":1854,"end_character":51},"updated":"2017-12-08 14:38:15.000000000","message":"heh","commit_id":"08d99e37d11ecff25c7d35bf30c2a25dc62f81a6"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"aa6c1cd16d738ca64460bacca81261407208efb3","unresolved":false,"context_lines":[{"line_number":2219,"context_line":"        cn \u003d self.compute_node"},{"line_number":2220,"context_line":"        # Make sure the resource provider exists for preventing to call the API"},{"line_number":2221,"context_line":"        self._init_provider_tree()"},{"line_number":2222,"context_line":"        self.client.aggregate_refresh_time[uuids.cn] \u003d mock.Mock()"},{"line_number":2223,"context_line":""},{"line_number":2224,"context_line":"        mock_get.return_value.json.return_value \u003d {"},{"line_number":2225,"context_line":"            \u0027resource_provider_generation\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_1aa93fde","line":2222,"range":{"start_line":2222,"start_character":20,"end_line":2222,"end_character":29},"updated":"2017-12-14 13:19:58.000000000","message":"association","commit_id":"4ca657884dd3aa147f798c388f57318726c0450c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3f394d748eaee37df8c111cf220b22970323432a","unresolved":false,"context_lines":[{"line_number":2219,"context_line":"        cn \u003d self.compute_node"},{"line_number":2220,"context_line":"        # Make sure the resource provider exists for preventing to call the API"},{"line_number":2221,"context_line":"        self._init_provider_tree()"},{"line_number":2222,"context_line":"        self.client.aggregate_refresh_time[uuids.cn] \u003d mock.Mock()"},{"line_number":2223,"context_line":""},{"line_number":2224,"context_line":"        mock_get.return_value.json.return_value \u003d {"},{"line_number":2225,"context_line":"            \u0027resource_provider_generation\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_f7fef169","line":2222,"range":{"start_line":2222,"start_character":20,"end_line":2222,"end_character":29},"in_reply_to":"df87a7cf_1aa93fde","updated":"2017-12-14 15:54:21.000000000","message":"Cheers - missed that","commit_id":"4ca657884dd3aa147f798c388f57318726c0450c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"aa6c1cd16d738ca64460bacca81261407208efb3","unresolved":false,"context_lines":[{"line_number":2236,"context_line":"        self.assertIsNone(result)"},{"line_number":2237,"context_line":"        self.assertFalse(self.client._provider_tree.exists(cn.uuid))"},{"line_number":2238,"context_line":"        self.assertTrue(mock_debug.called)"},{"line_number":2239,"context_line":"        self.assertNotIn(cn.uuid, self.client.aggregate_refresh_time)"},{"line_number":2240,"context_line":"        self.assertIn(\u0027deleted by another thread\u0027, mock_debug.call_args[0][0])"},{"line_number":2241,"context_line":"        self.assertEqual(uuids.request_id,"},{"line_number":2242,"context_line":"                         mock_debug.call_args[0][1][\u0027placement_req_id\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_7ab72b3c","line":2239,"range":{"start_line":2239,"start_character":46,"end_line":2239,"end_character":55},"updated":"2017-12-14 13:19:58.000000000","message":"ditto.","commit_id":"4ca657884dd3aa147f798c388f57318726c0450c"}]}
