)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":25,"context_line":"  built into it prevents deep recursion. I change them"},{"line_number":26,"context_line":"  to copy and things still work but I\u0027m not sure it is"},{"line_number":27,"context_line":"  okay. I have them marked for a conversation with"},{"line_number":28,"context_line":"  efried. No test seems to care whether a copy or"},{"line_number":29,"context_line":"  deepcopy is being used. Further investigation required."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Other things to note:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fdfeff1_46f28fe5","line":28,"range":{"start_line":28,"start_character":2,"end_line":28,"end_character":8},"updated":"2019-02-21 13:54:55.000000000","message":"I feel so left out :(","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a4874b6c1de3f2e8bf220e0912bd1106a979e71d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"  built into it prevents deep recursion. I change them"},{"line_number":26,"context_line":"  to copy and things still work but I\u0027m not sure it is"},{"line_number":27,"context_line":"  okay. I have them marked for a conversation with"},{"line_number":28,"context_line":"  efried. No test seems to care whether a copy or"},{"line_number":29,"context_line":"  deepcopy is being used. Further investigation required."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Other things to note:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fdfeff1_696e84ca","line":28,"range":{"start_line":28,"start_character":2,"end_line":28,"end_character":8},"in_reply_to":"9fdfeff1_46f28fe5","updated":"2019-02-21 14:04:15.000000000","message":"I think I said him because I _think_ he wrote that code with the deepcopies, but it\u0027s not always clear.","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":31,"context_line":"Other things to note:"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"* As with the other changes, where context is actually used"},{"line_number":34,"context_line":"  by the object is is required in the constructor. This"},{"line_number":35,"context_line":"  cascades some changes to tests."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"* A test that checks to see if adding traits resets the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fdfeff1_a62c9b4a","line":34,"range":{"start_line":34,"start_character":16,"end_line":34,"end_character":18},"updated":"2019-02-21 13:54:55.000000000","message":"it","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"oslo.versionedobjects is removed from requirements. This"},{"line_number":42,"context_line":"doesn\u0027t have a huge impact on the size of the virtualenv:"},{"line_number":43,"context_line":"114M -\u003e 107M [1] but it does take us from 132 python"},{"line_number":44,"context_line":"dependencies (via pip list) to 119, removing plenty of"},{"line_number":45,"context_line":"stuff that was only being called in because stuff that"},{"line_number":46,"context_line":"we don\u0027t used depended on it."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fdfeff1_865b97f4","line":43,"range":{"start_line":43,"start_character":0,"end_line":43,"end_character":12},"updated":"2019-02-21 13:54:55.000000000","message":"well, that\u0027s actually more than a 6% reduction, so pretty good IMHO for a single patch...","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":43,"context_line":"114M -\u003e 107M [1] but it does take us from 132 python"},{"line_number":44,"context_line":"dependencies (via pip list) to 119, removing plenty of"},{"line_number":45,"context_line":"stuff that was only being called in because stuff that"},{"line_number":46,"context_line":"we don\u0027t used depended on it."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"lower-constraints.txt is updated to reflect the removal"},{"line_number":49,"context_line":"of dependencies that are no longer needed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fdfeff1_c6d43f22","line":46,"range":{"start_line":46,"start_character":9,"end_line":46,"end_character":13},"updated":"2019-02-21 13:54:55.000000000","message":"use","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":48,"context_line":"lower-constraints.txt is updated to reflect the removal"},{"line_number":49,"context_line":"of dependencies that are no longer needed."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"[1] Of note, 26M of that is babel. Do we need to translate"},{"line_number":52,"context_line":"exceptions?"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Change-Id: Ie0a9351e0d7c762c9c96c45cbe50132a0fbd1486"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9fdfeff1_46e04ff9","line":51,"range":{"start_line":51,"start_character":13,"end_line":51,"end_character":33},"updated":"2019-02-21 13:54:55.000000000","message":"interesting. what is the OpenStack project\u0027s guidelines on this, if any? Probably worth a quick topic in Denver?","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1ae336c272ff8dc87526c129dae188f265b7466c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  simply don\u0027t write it. The HTTP layer continues to"},{"line_number":31,"context_line":"  maintain the guards it already had in place to prevent"},{"line_number":32,"context_line":"  badness. Tests which were testing the object layer"},{"line_number":33,"context_line":"  are removed."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"  The create_provider function in functional/db/test_base"},{"line_number":36,"context_line":"  allowed (trying to) create a provider with a root"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9fdfeff1_b13ece26","line":33,"updated":"2019-02-25 21:51:05.000000000","message":"✔","commit_id":"7af7abd0a3caf1dce564d384f69fc55776343573"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a71378de2cb79ea265871b7f726c0d77732ddddd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"of dependencies that are no longer needed."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"[1] Of note, 26M of that is babel. Do we need to translate"},{"line_number":62,"context_line":"exceptions?"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Change-Id: Ie0a9351e0d7c762c9c96c45cbe50132a0fbd1486"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9fdfeff1_97005a04","line":62,"updated":"2019-02-25 23:43:13.000000000","message":"http://lists.openstack.org/pipermail/openstack-discuss/2019-February/thread.html#3002","commit_id":"7af7abd0a3caf1dce564d384f69fc55776343573"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baca014df52a017f6b67d3cd853a3fbc767aa106","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  track that any more if we haven\u0027t got OVO."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* The last_modified handling in placement/util no longer"},{"line_number":52,"context_line":"  need NotImplemented handling, that was an artifact of"},{"line_number":53,"context_line":"  OVO."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"oslo.versionedobjects is removed from requirements. This"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9fdfeff1_1adecf3d","line":52,"range":{"start_line":52,"start_character":2,"end_line":52,"end_character":6},"updated":"2019-02-25 23:52:46.000000000","message":"needs","commit_id":"bed7808b59da04b43251be920d7754fc2f93a3e5"}],"lower-constraints.txt":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":10,"context_line":"coverage\u003d\u003d4.0"},{"line_number":11,"context_line":"debtcollector\u003d\u003d1.19.0"},{"line_number":12,"context_line":"decorator\u003d\u003d3.4.0"},{"line_number":13,"context_line":"eventlet\u003d\u003d0.18.2"},{"line_number":14,"context_line":"extras\u003d\u003d1.0.0"},{"line_number":15,"context_line":"fasteners\u003d\u003d0.14.1"},{"line_number":16,"context_line":"fixtures\u003d\u003d3.0.0"}],"source_content_type":"text/plain","patch_set":4,"id":"9fdfeff1_e69ce36b","side":"PARENT","line":13,"updated":"2019-02-21 13:54:55.000000000","message":"\\o/","commit_id":"ddfba5d1b93cd1aad3837c4c996a09580383793d"}],"placement/objects/resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3c02547f476460c95543ed1c7dcae39ac4bc6c11","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"        if self.uuid is None:"},{"line_number":1015,"context_line":"            raise exception.ObjectActionError(action\u003d\u0027create\u0027,"},{"line_number":1016,"context_line":"                                              reason\u003d\u0027uuid is required\u0027)"},{"line_number":1017,"context_line":"        if self.name is None:"},{"line_number":1018,"context_line":"            raise exception.ObjectActionError(action\u003d\u0027create\u0027,"},{"line_number":1019,"context_line":"                                              reason\u003d\u0027name is required\u0027)"},{"line_number":1020,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_93002068","line":1017,"updated":"2019-02-15 17:16:17.000000000","message":"actually we don\u0027t want empty string here either \u0027not self.name\u0027 is good (in this case)","commit_id":"5034d1687d5271f8f786e6d34d2bc64a42d33c84"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3c02547f476460c95543ed1c7dcae39ac4bc6c11","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"        updates \u003d self._updates()"},{"line_number":1029,"context_line":"        # FIXME(cdent): We\u0027ll need to move this up (API) or down (DB) a"},{"line_number":1030,"context_line":"        # layer, perhaps? Because we\u0027re no longer tracking changes via OVO."},{"line_number":1031,"context_line":"        \"\"\""},{"line_number":1032,"context_line":"        if updates and any(k not in self.SETTABLE_FIELDS"},{"line_number":1033,"context_line":"                           for k in updates.keys()):"},{"line_number":1034,"context_line":"            raise exception.ObjectActionError("}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_d32f88f3","line":1031,"updated":"2019-02-15 17:16:17.000000000","message":"make that this is not happening more clear, by restoring tests and allowing them to fail","commit_id":"5034d1687d5271f8f786e6d34d2bc64a42d33c84"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b9298f9428a91962042404345d67318aaf1cdff0","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"    def save(self):"},{"line_number":1028,"context_line":"        updates \u003d self._updates()"},{"line_number":1029,"context_line":"        # FIXME(cdent): We\u0027ll need to move this up (API) or down (DB) a"},{"line_number":1030,"context_line":"        # layer, perhaps? Because we\u0027re no longer tracking changes via OVO."},{"line_number":1031,"context_line":"#         if updates and any(k not in self.SETTABLE_FIELDS"},{"line_number":1032,"context_line":"#                            for k in updates.keys()):"},{"line_number":1033,"context_line":"#             raise exception.ObjectActionError("}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_88de9d0e","line":1030,"updated":"2019-02-17 13:58:45.000000000","message":"The only significant place where rp.save() is called is from PUT rp in handlers/resource_provider, where the \"bad\" fields are protected json schema.\n\nSo I reckon the right thing to do here is make the db api dangerous and keep the http api safe.\n\nBut I\u0027m hoping for additional input on that.","commit_id":"0af8e4724f603fd6246eb4906e295dac255e349f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":1018,"context_line":"            raise exception.ObjectActionError(action\u003d\u0027create\u0027,"},{"line_number":1019,"context_line":"                                              reason\u003d\u0027name is required\u0027)"},{"line_number":1020,"context_line":""},{"line_number":1021,"context_line":"        updates \u003d self._updates()"},{"line_number":1022,"context_line":"        self._create_in_db(self._context, updates)"},{"line_number":1023,"context_line":""},{"line_number":1024,"context_line":"    def destroy(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_c61bdf7d","line":1021,"updated":"2019-02-21 13:54:55.000000000","message":"Get rid of the whole _updates() method entirely... Be explicit and direct:\n\n def create(self):\n     db_fields \u003d {\n         \"name\": self.name,\n         \"uuid\": self.uuid,\n         \"parent_provider_uuid\": self.parent_provider_uuid,\n     }\n     self._create_in_db(self._context, db_fields)","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"    def save(self):"},{"line_number":1028,"context_line":"        updates \u003d self._updates()"},{"line_number":1029,"context_line":"        # FIXME(cdent): We\u0027ll need to move this up (API) or down (DB) a"},{"line_number":1030,"context_line":"        # layer, perhaps? Because we\u0027re no longer tracking changes via OVO."},{"line_number":1031,"context_line":"#         if updates and any(k not in self.SETTABLE_FIELDS"},{"line_number":1032,"context_line":"#                            for k in updates.keys()):"},{"line_number":1033,"context_line":"#             raise exception.ObjectActionError("}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_c62c3f03","line":1030,"updated":"2019-02-21 13:54:55.000000000","message":"I don\u0027t understand why *this* layer isn\u0027t appropriate?\n\nThis whole method implementation should just be this:\n\n def save(self):\n     db_fields \u003d {\n         \"name\": self.name,\n         \"parent_provider_uuid\": self.parent_provider_uuid,\n     }\n     self._update_in_db(self._context, db_fields)\n\nand be done with it. Explicit, simple and direct.\n\nSure, do we lose the ability to not call the DB when some fields haven\u0027t changed from their original value? Yep. Is that a concern for me? Nope. We don\u0027t have long-lived objects in placement like we do in, say, the compute resource tracker (ComputeNode object for example) and this isn\u0027t a problem IMHO.","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a4874b6c1de3f2e8bf220e0912bd1106a979e71d","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"    def save(self):"},{"line_number":1028,"context_line":"        updates \u003d self._updates()"},{"line_number":1029,"context_line":"        # FIXME(cdent): We\u0027ll need to move this up (API) or down (DB) a"},{"line_number":1030,"context_line":"        # layer, perhaps? Because we\u0027re no longer tracking changes via OVO."},{"line_number":1031,"context_line":"#         if updates and any(k not in self.SETTABLE_FIELDS"},{"line_number":1032,"context_line":"#                            for k in updates.keys()):"},{"line_number":1033,"context_line":"#             raise exception.ObjectActionError("}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_e98fd472","line":1030,"in_reply_to":"9fdfeff1_c62c3f03","updated":"2019-02-21 14:04:15.000000000","message":"I meant other layers in terms of raising the error about \"you sent info we don\u0027t want to deal with\".\n\nIf we\u0027re happy to simply \"save the right stuff\" here, and not blow up when some of that stuff is awry, then yes, agree, it\u0027s pretty easy.\n\nThat\u0027s basically what I needed confirmation on.","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"            db_resource_provider[\u0027root_provider_uuid\u0027] \u003d uuid"},{"line_number":1292,"context_line":"            _set_root_provider_id(context, rp_id, rp_id)"},{"line_number":1293,"context_line":"        # FIXME(cdent): These are the sorts of things we made computers for"},{"line_number":1294,"context_line":"        # don\u0027t repeat this all around."},{"line_number":1295,"context_line":"        for field in [\u0027id\u0027, \u0027uuid\u0027, \u0027name\u0027, \u0027generation\u0027,"},{"line_number":1296,"context_line":"                      \u0027root_provider_uuid\u0027, \u0027parent_provider_uuid\u0027,"},{"line_number":1297,"context_line":"                      \u0027updated_at\u0027, \u0027created_at\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_e6e2a3a0","line":1294,"updated":"2019-02-21 13:54:55.000000000","message":"Where else are we repeating this, though? :)\n\nI kind of like the explicitness of just listing the fields like this.\n\nAn alternate style would get rid of passing in a \"blank\" object and just construct the object within this method without looping over a fields collection...\n\nFor example:\n\n @db_api.placement_context_manager.writer  # For online data migration\n def _provider_from_db(ctx, db_record):\n     # Online data migration to populate root_provider_id\n     # TODO(jaypipes): Remove when all root_provider_id values are NOT NULL\n     if db_resource_provider[\u0027root_provider_uuid\u0027] is None:\n         rp_id \u003d db_resource_provider[\u0027id\u0027]\n         uuid \u003d db_resource_provider[\u0027uuid\u0027]\n         db_resource_provider[\u0027root_provider_uuid\u0027] \u003d uuid\n         _set_root_provider_id(context, rp_id, rp_id)\n\n     return ResourceProvider(\n         ctx,\n         id\u003ddb_record[\u0027id\u0027],\n         name\u003ddb_record[\u0027name\u0027],\n         uuid\u003ddb_record[\u0027uuid\u0027],\n         generation\u003ddb_record[\u0027generation\u0027],\n         root_provider_uuid\u003ddb_record[\u0027root_provider_uuid\u0027],\n         parent_provider_uuid\u003ddb_record[\u0027parent_provider_uuid\u0027],\n         create_at\u003ddb_record[\u0027created_at\u0027],\n         updated_at\u003ddb_record[\u0027updated_at\u0027],\n     )","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a4874b6c1de3f2e8bf220e0912bd1106a979e71d","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"            db_resource_provider[\u0027root_provider_uuid\u0027] \u003d uuid"},{"line_number":1292,"context_line":"            _set_root_provider_id(context, rp_id, rp_id)"},{"line_number":1293,"context_line":"        # FIXME(cdent): These are the sorts of things we made computers for"},{"line_number":1294,"context_line":"        # don\u0027t repeat this all around."},{"line_number":1295,"context_line":"        for field in [\u0027id\u0027, \u0027uuid\u0027, \u0027name\u0027, \u0027generation\u0027,"},{"line_number":1296,"context_line":"                      \u0027root_provider_uuid\u0027, \u0027parent_provider_uuid\u0027,"},{"line_number":1297,"context_line":"                      \u0027updated_at\u0027, \u0027created_at\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_e95274de","line":1294,"in_reply_to":"9fdfeff1_e6e2a3a0","updated":"2019-02-21 14:04:15.000000000","message":"I was being too vague. I basically meant that looping over \"the important fields that make up the object\" was a thing that OVO was able to do for us without us needing to enumerate the fields.\n\nI kind of like the explicit too. I think for now I\u0027ll just remove the FIXME.","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":3848,"context_line":"        for arr in areq.resource_requests:"},{"line_number":3849,"context_line":"            key \u003d _rp_rc_key(arr.resource_provider, arr.resource_class)"},{"line_number":3850,"context_line":"            if key not in arrs_by_rp_rc:"},{"line_number":3851,"context_line":"                # TODO(efried): Is this safe to change from deepcopy to copy."},{"line_number":3852,"context_line":"                arrs_by_rp_rc[key] \u003d copy.copy(arr)"},{"line_number":3853,"context_line":"            else:"},{"line_number":3854,"context_line":"                arrs_by_rp_rc[key].amount +\u003d arr.amount"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_46828fa7","line":3851,"updated":"2019-02-21 13:54:55.000000000","message":"yes, it\u0027s safe to do. that\u0027s pretty much what the __deepcopy__ override in OVO does.","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a71378de2cb79ea265871b7f726c0d77732ddddd","unresolved":false,"context_lines":[{"line_number":999,"context_line":"        self.updated_at \u003d updated_at"},{"line_number":1000,"context_line":"        self.created_at \u003d created_at"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"    def _updates(self):"},{"line_number":1003,"context_line":"        updates \u003d {}"},{"line_number":1004,"context_line":"        for field in [\u0027uuid\u0027, \u0027name\u0027, \u0027generation\u0027, \u0027root_provider_uuid\u0027,"},{"line_number":1005,"context_line":"                      \u0027parent_provider_uuid\u0027]:"},{"line_number":1006,"context_line":"            value \u003d getattr(self, field, None)"},{"line_number":1007,"context_line":"            updates[field] \u003d value"},{"line_number":1008,"context_line":"        return updates"},{"line_number":1009,"context_line":""},{"line_number":1010,"context_line":"    def create(self):"},{"line_number":1011,"context_line":"        if self.id is not None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_1a232fa9","line":1008,"range":{"start_line":1002,"start_character":0,"end_line":1008,"end_character":22},"updated":"2019-02-25 23:43:13.000000000","message":"This appears to be unused. Is there magic somewhere?","commit_id":"7af7abd0a3caf1dce564d384f69fc55776343573"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1ae336c272ff8dc87526c129dae188f265b7466c","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"            \u0027name\u0027: self.name,"},{"line_number":1025,"context_line":"            \u0027uuid\u0027: self.uuid,"},{"line_number":1026,"context_line":"            \u0027parent_provider_uuid\u0027: self.parent_provider_uuid,"},{"line_number":1027,"context_line":"        }"},{"line_number":1028,"context_line":"        self._create_in_db(self._context, updates)"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"    def destroy(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_5119a2d4","line":1027,"updated":"2019-02-25 21:51:05.000000000","message":"✔","commit_id":"7af7abd0a3caf1dce564d384f69fc55776343573"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1ae336c272ff8dc87526c129dae188f265b7466c","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"        updates \u003d {"},{"line_number":1037,"context_line":"            \u0027name\u0027: self.name,"},{"line_number":1038,"context_line":"            \u0027parent_provider_uuid\u0027: self.parent_provider_uuid,"},{"line_number":1039,"context_line":"        }"},{"line_number":1040,"context_line":"        self._update_in_db(self._context, self.id, updates)"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_110f9a88","line":1039,"updated":"2019-02-25 21:51:05.000000000","message":"✔","commit_id":"7af7abd0a3caf1dce564d384f69fc55776343573"}],"placement/tests/functional/db/test_resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3c02547f476460c95543ed1c7dcae39ac4bc6c11","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        self.assertEqual(uuidsentinel.parent, rp1.root_provider_uuid)"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    # FIXME(cdent): deal with this failing"},{"line_number":244,"context_line":"    def xtest_save_root_provider_failed(self):"},{"line_number":245,"context_line":"        \"\"\"Test that if we provide a root_provider_uuid value that points to"},{"line_number":246,"context_line":"        a resource provider that doesn\u0027t exist, we get an ObjectActionError if"},{"line_number":247,"context_line":"        we save the object."}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_b315249e","line":244,"updated":"2019-02-15 17:16:17.000000000","message":"allow this to fail so we have the gate blocking for us","commit_id":"5034d1687d5271f8f786e6d34d2bc64a42d33c84"}],"placement/tests/unit/objects/test_resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3c02547f476460c95543ed1c7dcae39ac4bc6c11","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                          obj.create)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    # FIXME(cdent): This is because we don\u0027t currently have the guard"},{"line_number":130,"context_line":"    # against setting root"},{"line_number":131,"context_line":"    def xtest_create_with_root_provider_uuid_fail(self):"},{"line_number":132,"context_line":"        obj \u003d resource_provider.ResourceProvider("},{"line_number":133,"context_line":"            context\u003dself.context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_730b3c7c","line":130,"updated":"2019-02-15 17:16:17.000000000","message":"allow this to fail","commit_id":"5034d1687d5271f8f786e6d34d2bc64a42d33c84"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3c02547f476460c95543ed1c7dcae39ac4bc6c11","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self.assertIn(\u0027root provider UUID cannot be manually set\u0027, str(exc))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    # FIXME(cdent): we need the SETTABLE_FIELDS guard to actually work"},{"line_number":143,"context_line":"    def xtest_save_immutable(self):"},{"line_number":144,"context_line":"        fields \u003d {"},{"line_number":145,"context_line":"            \u0027id\u0027: 1,"},{"line_number":146,"context_line":"            \u0027uuid\u0027: _RESOURCE_PROVIDER_UUID,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_930ee089","line":143,"updated":"2019-02-15 17:16:17.000000000","message":"ditto","commit_id":"5034d1687d5271f8f786e6d34d2bc64a42d33c84"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        )"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        exc \u003d self.assertRaises(exception.ObjectActionError, obj.create)"},{"line_number":140,"context_line":"        self.assertIn(\u0027root provider UUID cannot be manually set\u0027, str(exc))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    # FIXME(cdent): we need the SETTABLE_FIELDS guard to actually work"},{"line_number":143,"context_line":"    def test_save_immutable(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_a64a5b80","line":140,"updated":"2019-02-21 13:54:55.000000000","message":"Delete this test. Just don\u0027t pass the darn root_provider_uuid value in _create(). :) Simple as that.","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"18de092bd07967515b3764f0f846dff6cf51dc63","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        for field in fields:"},{"line_number":151,"context_line":"            rp \u003d resource_provider.ResourceProvider(context\u003dself.context)"},{"line_number":152,"context_line":"            setattr(rp, field, fields[field])"},{"line_number":153,"context_line":"            self.assertRaises(exception.ObjectActionError, rp.save)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"class TestProviderSummaryNoDB(_TestCase):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_86b9577a","line":153,"updated":"2019-02-21 13:54:55.000000000","message":"Just delete this test. It\u0027s silly.","commit_id":"c520f7d1bc976a04c47ca00c9174a9038dc15fa1"}],"placement/util.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a71378de2cb79ea265871b7f726c0d77732ddddd","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    \"\"\""},{"line_number":141,"context_line":"    try:"},{"line_number":142,"context_line":"        current_modified \u003d (obj.updated_at or obj.created_at)"},{"line_number":143,"context_line":"    # TODO(cdent): NotImplementedError catching can go away when all of"},{"line_number":144,"context_line":"    # OVO is gone."},{"line_number":145,"context_line":"    except NotImplementedError:"},{"line_number":146,"context_line":"        # If updated_at is not implemented, we are looking at objects that"},{"line_number":147,"context_line":"        # have not come from the database, so \"now\" is the right modified"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_a8284b32","line":144,"range":{"start_line":143,"start_character":0,"end_line":144,"end_character":18},"updated":"2019-02-25 23:43:13.000000000","message":"that\u0027s now, yah?","commit_id":"0af8e4724f603fd6246eb4906e295dac255e349f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"baca014df52a017f6b67d3cd853a3fbc767aa106","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    If updated_at is not implemented in `obj` use the current time in UTC."},{"line_number":140,"context_line":"    \"\"\""},{"line_number":141,"context_line":"    current_modified \u003d (obj.updated_at or obj.created_at)"},{"line_number":142,"context_line":"    if current_modified is None:"},{"line_number":143,"context_line":"        # The object was not loaded from the DB, it was created in"},{"line_number":144,"context_line":"        # the current context."}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_3ad3933a","line":141,"range":{"start_line":141,"start_character":22,"end_line":141,"end_character":57},"updated":"2019-02-25 23:52:46.000000000","message":"nit: parens redundant (I think?)","commit_id":"bed7808b59da04b43251be920d7754fc2f93a3e5"}],"requirements.txt":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1ae336c272ff8dc87526c129dae188f265b7466c","unresolved":false,"context_lines":[{"line_number":22,"context_line":"oslo.i18n\u003e\u003d3.15.3 # Apache-2.0"},{"line_number":23,"context_line":"oslo.middleware\u003e\u003d3.31.0 # Apache-2.0"},{"line_number":24,"context_line":"oslo.upgradecheck\u003e\u003d0.2.0 # Apache-2.0"},{"line_number":25,"context_line":"oslo.versionedobjects\u003e\u003d1.31.2 # Apache-2.0"},{"line_number":26,"context_line":"os-resource-classes\u003e\u003d0.2.0 # Apache-2.0"},{"line_number":27,"context_line":"os-traits\u003e\u003d0.4.0 # Apache-2.0"},{"line_number":28,"context_line":"microversion-parse\u003e\u003d0.2.1 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":7,"id":"9fdfeff1_d1691225","side":"PARENT","line":25,"updated":"2019-02-25 21:51:05.000000000","message":"\\o/","commit_id":"75555e7e2c6053e9bc6d92dc35f32b0bd5ffaefc"}]}
