)]}'
{"placement/objects/resource_provider.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"b0593cbee3caa4f7d89301a1a19d5c9a65fd3664","unresolved":false,"context_lines":[{"line_number":2465,"context_line":"            raise exception.ObjectActionError(action\u003d\u0027destroy\u0027,"},{"line_number":2466,"context_line":"                                              reason\u003d\u0027ID attribute not found\u0027)"},{"line_number":2467,"context_line":"        # Never delete any standard resource class."},{"line_number":2468,"context_line":"        if self.id \u003c ResourceClass.MIN_CUSTOM_RESOURCE_CLASS_ID:"},{"line_number":2469,"context_line":"            raise exception.ResourceClassCannotDeleteStandard("},{"line_number":2470,"context_line":"                    resource_class\u003dself.name)"},{"line_number":2471,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_95fe5a05","line":2468,"updated":"2018-12-17 15:19:14.000000000","message":"While I understand that this will work, would it be clearer to use:\n\n  if not self.name.startswith(orc.CUSTOM_NAMESPACE):","commit_id":"ad18f042097ea690aec46d5245f89f35a5b8df45"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d00d846ed2d80ad218c25dbaa7d867d529a61c2a","unresolved":false,"context_lines":[{"line_number":2465,"context_line":"            raise exception.ObjectActionError(action\u003d\u0027destroy\u0027,"},{"line_number":2466,"context_line":"                                              reason\u003d\u0027ID attribute not found\u0027)"},{"line_number":2467,"context_line":"        # Never delete any standard resource class."},{"line_number":2468,"context_line":"        if self.id \u003c ResourceClass.MIN_CUSTOM_RESOURCE_CLASS_ID:"},{"line_number":2469,"context_line":"            raise exception.ResourceClassCannotDeleteStandard("},{"line_number":2470,"context_line":"                    resource_class\u003dself.name)"},{"line_number":2471,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_e73cc5eb","line":2468,"in_reply_to":"3f79a3b5_95fe5a05","updated":"2018-12-17 15:46:34.000000000","message":"That would open up problems if we ever had another namespace. Using the id creates a bound above which can be deleted (whatever shape its name), below which cannot.","commit_id":"ad18f042097ea690aec46d5245f89f35a5b8df45"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"6a427e548f3b4c982827cd2a2bc4b1ae8c69be15","unresolved":false,"context_lines":[{"line_number":2465,"context_line":"            raise exception.ObjectActionError(action\u003d\u0027destroy\u0027,"},{"line_number":2466,"context_line":"                                              reason\u003d\u0027ID attribute not found\u0027)"},{"line_number":2467,"context_line":"        # Never delete any standard resource class."},{"line_number":2468,"context_line":"        if self.id \u003c ResourceClass.MIN_CUSTOM_RESOURCE_CLASS_ID:"},{"line_number":2469,"context_line":"            raise exception.ResourceClassCannotDeleteStandard("},{"line_number":2470,"context_line":"                    resource_class\u003dself.name)"},{"line_number":2471,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_eaaecc2f","line":2468,"in_reply_to":"3f79a3b5_e73cc5eb","updated":"2018-12-17 16:02:46.000000000","message":"Sure, no worries. But if we ever do add another namespace, I sure hope it will be in the format of \u0027CUSTOM_FOO_xxx`; iow, an extension rather than a whole new prefix, as that will screw up things like orc.is_custom().","commit_id":"ad18f042097ea690aec46d5245f89f35a5b8df45"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"b0593cbee3caa4f7d89301a1a19d5c9a65fd3664","unresolved":false,"context_lines":[{"line_number":2493,"context_line":"                                              reason\u003d\u0027ID attribute not found\u0027)"},{"line_number":2494,"context_line":"        updates \u003d self.obj_get_changes()"},{"line_number":2495,"context_line":"        # Never update any standard resource class."},{"line_number":2496,"context_line":"        if self.id \u003c ResourceClass.MIN_CUSTOM_RESOURCE_CLASS_ID:"},{"line_number":2497,"context_line":"            raise exception.ResourceClassCannotUpdateStandard("},{"line_number":2498,"context_line":"                    resource_class\u003dself.name)"},{"line_number":2499,"context_line":"        self._save(self._context, self.id, self.name, updates)"}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_271f1d5e","line":2496,"updated":"2018-12-17 15:19:14.000000000","message":"same here","commit_id":"ad18f042097ea690aec46d5245f89f35a5b8df45"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9f58640b63c8784aed0821921d9c5a09f708e883","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Create a set of all resource class in the os_resource_classes library."},{"line_number":154,"context_line":"    sel \u003d sa.select([_RC_TBL.c.name])"},{"line_number":155,"context_line":"    res \u003d ctx.session.execute(sel).fetchall()"},{"line_number":156,"context_line":"    db_classes \u003d [r[0] for r in res if not orc.is_custom(r[0])]"},{"line_number":157,"context_line":"    LOG.debug(\"Found existing resource classes in db: %s\", db_classes)"},{"line_number":158,"context_line":"    # Determine those resource clases which are in os_resource_classes but not"},{"line_number":159,"context_line":"    # currently in the database, and insert them."}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_8b384fcc","line":156,"range":{"start_line":156,"start_character":36,"end_line":156,"end_character":62},"updated":"2018-12-19 09:50:53.000000000","message":"nit: unnecessary as below the code matches orc.STANDARDS against this list so it will never match with CUSTOM","commit_id":"1ae0f336a10cf4c5a0d39737bc109ae76618513b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ef274eee4f977c1d1289b5312a32691bdd60fad5","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Create a set of all resource class in the os_resource_classes library."},{"line_number":154,"context_line":"    sel \u003d sa.select([_RC_TBL.c.name])"},{"line_number":155,"context_line":"    res \u003d ctx.session.execute(sel).fetchall()"},{"line_number":156,"context_line":"    db_classes \u003d [r[0] for r in res if not orc.is_custom(r[0])]"},{"line_number":157,"context_line":"    LOG.debug(\"Found existing resource classes in db: %s\", db_classes)"},{"line_number":158,"context_line":"    # Determine those resource clases which are in os_resource_classes but not"},{"line_number":159,"context_line":"    # currently in the database, and insert them."}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_202ef5f7","line":156,"range":{"start_line":156,"start_character":36,"end_line":156,"end_character":62},"in_reply_to":"3f79a3b5_3db61e8e","updated":"2018-12-19 11:19:24.000000000","message":"I see","commit_id":"1ae0f336a10cf4c5a0d39737bc109ae76618513b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"bfa66d230038dcd93e228b440f080bd0b6441546","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    # Create a set of all resource class in the os_resource_classes library."},{"line_number":154,"context_line":"    sel \u003d sa.select([_RC_TBL.c.name])"},{"line_number":155,"context_line":"    res \u003d ctx.session.execute(sel).fetchall()"},{"line_number":156,"context_line":"    db_classes \u003d [r[0] for r in res if not orc.is_custom(r[0])]"},{"line_number":157,"context_line":"    LOG.debug(\"Found existing resource classes in db: %s\", db_classes)"},{"line_number":158,"context_line":"    # Determine those resource clases which are in os_resource_classes but not"},{"line_number":159,"context_line":"    # currently in the database, and insert them."}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_3db61e8e","line":156,"range":{"start_line":156,"start_character":36,"end_line":156,"end_character":62},"in_reply_to":"3f79a3b5_8b384fcc","updated":"2018-12-19 11:00:47.000000000","message":"The goal here is to make sure that db_classes is a short list. If there are several thousand custom classes already in the db we don\u0027t want to iterate that long list when creating batch args below.","commit_id":"1ae0f336a10cf4c5a0d39737bc109ae76618513b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0361e2f1a4daf99201d72d6c7064090977caef21","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            ctx.session.execute(ins, batch_args)"},{"line_number":174,"context_line":"            LOG.info(\"Synced resource_classes from os_resource_classes: %s\","},{"line_number":175,"context_line":"                     batch_args)"},{"line_number":176,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":177,"context_line":"            pass  # some other process sync\u0027d, just ignore"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"def ensure_resource_classes_sync(ctx):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ffd0ebdf_00190478","line":177,"range":{"start_line":176,"start_character":0,"end_line":177,"end_character":58},"updated":"2019-01-03 18:21:33.000000000","message":"This is slightly worrisome. Won\u0027t we get this conflict if *any* (not necessarily *all*) of the insertions conflict? So we\u0027re trying to insert A,B,C; \"some other process\" inserted C,D,E; we get a conflict here and silently succeed; and we\u0027re missing A,B.","commit_id":"a241fcee4ca65436458cc757fe81a19369451897"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"6954b4aff9af1186af5955066701a7f8bb1a9ead","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            ctx.session.execute(ins, batch_args)"},{"line_number":174,"context_line":"            LOG.info(\"Synced resource_classes from os_resource_classes: %s\","},{"line_number":175,"context_line":"                     batch_args)"},{"line_number":176,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":177,"context_line":"            pass  # some other process sync\u0027d, just ignore"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"def ensure_resource_classes_sync(ctx):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ffd0ebdf_008fc4cc","line":177,"range":{"start_line":176,"start_character":0,"end_line":177,"end_character":58},"in_reply_to":"ffd0ebdf_00190478","updated":"2019-01-03 18:30:18.000000000","message":"The only way that could happen is if there are different versions of the os_resource_classes library associated with the different processes running this command (the lock prevents other threads [1]). If that\u0027s the case then you\u0027ve got bigger problems. If you get a duplicate on the same version os_resource_classes, no big deal: one of them worked.\n\nAlso this is the same code (conceptually) as used for traits and it works well enough.\n\n[1] the way the db sync code is now called (from deploy), it is before the wsgi application is initialized. In many wsgi servers, this will mean before the process goes multi-thread and in all of them will be before it starts listening for web requests.","commit_id":"a241fcee4ca65436458cc757fe81a19369451897"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2c44b3c48f8cd333166ed09de9a3d7819658ada6","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            ctx.session.execute(ins, batch_args)"},{"line_number":174,"context_line":"            LOG.info(\"Synced resource_classes from os_resource_classes: %s\","},{"line_number":175,"context_line":"                     batch_args)"},{"line_number":176,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":177,"context_line":"            pass  # some other process sync\u0027d, just ignore"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"def ensure_resource_classes_sync(ctx):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ffd0ebdf_f43122ee","line":177,"range":{"start_line":176,"start_character":0,"end_line":177,"end_character":58},"in_reply_to":"ffd0ebdf_008fc4cc","updated":"2019-01-03 21:08:11.000000000","message":"\u003e The only way that could happen is if there are different versions\n \u003e of the os_resource_classes library associated with the different\n \u003e processes running this command (the lock prevents other threads\n \u003e [1]). If that\u0027s the case then you\u0027ve got bigger problems.\n\nBecause we\u0027re talking about them running on the same system? I\u0027m no expert on the various ways you can have the db and/or server process replicated across systems; but if that\u0027s possible, couldn\u0027t you have such a situation, like during an upgrade?\n\n \u003e Also this is the same code (conceptually) as used for traits and it\n \u003e works well enough.\n\n\"It hasn\u0027t broken yet\"? Oh, then I\u0027m sure it\u0027s fine.\n\nSeriously, how much have we exercised scenarios (like the multi-deployed upgrade spitballed above) in which it would be a possibility?\n\nI\u0027ll agree it seems unlikely, and this is probably good enough for now, but it would be nice to improve on it. I would think letting this hit a retry would be a very simple way to close the gap. If the conflict was a full overlap like we\u0027re contending it should be ~100% of the time, the retry will no-op and we\u0027re done.","commit_id":"a241fcee4ca65436458cc757fe81a19369451897"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a261325250238767fd3b8e64f0c555d9ce51eb59","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            ctx.session.execute(ins, batch_args)"},{"line_number":174,"context_line":"            LOG.info(\"Synced resource_classes from os_resource_classes: %s\","},{"line_number":175,"context_line":"                     batch_args)"},{"line_number":176,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":177,"context_line":"            pass  # some other process sync\u0027d, just ignore"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"def ensure_resource_classes_sync(ctx):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ffd0ebdf_140dc63d","line":177,"range":{"start_line":176,"start_character":0,"end_line":177,"end_character":58},"in_reply_to":"ffd0ebdf_549eee07","updated":"2019-01-03 21:46:00.000000000","message":"\u003e Why do we know during the retry that _this_ version of the\n \u003e os-resource-classes lib (on this machine) (or os-traits for that\n \u003e matter) is the one we want to win? Maybe the one on the other\n \u003e machine was the right one.\n\nIIUC, this is making sure that os-resource-classes contains *at least* the resource classes we know about. So if the other one adds C,D,E, our retry will just add A,B. We\u0027ll end up with A-E, which is dandy.\n\n \u003e The fix is to make sure you have the right copies of\n \u003e os-resource-classes and os-traits in the right places and just let\n \u003e it happen.\n\nNot quite (unless I\u0027m misunderstanding) - see above.\n\n \u003e We don\u0027t need to retry if the other one worked and it had the right\n \u003e data. We\u0027re already done.\n\nCorrect. But my original point was that we don\u0027t know if it had the right data.","commit_id":"a241fcee4ca65436458cc757fe81a19369451897"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"1c22a5dba4792e30c9ffb2fffdaeafeac7cdb168","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            ctx.session.execute(ins, batch_args)"},{"line_number":174,"context_line":"            LOG.info(\"Synced resource_classes from os_resource_classes: %s\","},{"line_number":175,"context_line":"                     batch_args)"},{"line_number":176,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":177,"context_line":"            pass  # some other process sync\u0027d, just ignore"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"def ensure_resource_classes_sync(ctx):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ffd0ebdf_549eee07","line":177,"range":{"start_line":176,"start_character":0,"end_line":177,"end_character":58},"in_reply_to":"ffd0ebdf_f43122ee","updated":"2019-01-03 21:37:20.000000000","message":"\u003e \u003e The only way that could happen is if there are different versions\n \u003e \u003e of the os_resource_classes library associated with the different\n \u003e \u003e processes running this command (the lock prevents other threads\n \u003e \u003e [1]). If that\u0027s the case then you\u0027ve got bigger problems.\n\n[snip]\n\n \u003e I\u0027ll agree it seems unlikely, and this is probably good enough for\n \u003e now, but it would be nice to improve on it. I would think letting\n \u003e this hit a retry would be a very simple way to close the gap. If\n \u003e the conflict was a full overlap like we\u0027re contending it should be\n \u003e ~100% of the time, the retry will no-op and we\u0027re done.\n\nWhy do we know during the retry that _this_ version of the os-resource-classes lib (on this machine) (or os-traits for that matter) is the one we want to win? Maybe the one on the other machine was the right one.\n\nThe fix is to make sure you have the right copies of os-resource-classes and os-traits in the right places and just let it happen.\n\nWe don\u0027t need to retry if the other one worked and it had the right data. We\u0027re already done.\n\nI agree that it would be good to test the multiple-run situations to get more data, but I don\u0027t know that there is good fix for it other than \"use the right lib\".","commit_id":"a241fcee4ca65436458cc757fe81a19369451897"}],"placement/resource_class_cache.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"b0593cbee3caa4f7d89301a1a19d5c9a65fd3664","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def id_from_string(self, rc_str):"},{"line_number":60,"context_line":"        \"\"\"Given a string representation of a resource class -- e.g. \"DISK_GB\""},{"line_number":61,"context_line":"        or \"IRON_SILVER\" -- return the integer code for the resource class by"},{"line_number":62,"context_line":"        doign a DB lookup into the resource_classes table, however the results"},{"line_number":63,"context_line":"        of these DB lookups are cached since the lookups are so frequent."},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"3f79a3b5_2744fd4d","line":61,"range":{"start_line":61,"start_character":12,"end_line":61,"end_character":23},"updated":"2018-12-17 15:19:14.000000000","message":"While you\u0027re changing this line, you should correct this to `CUSTOM_IRON_SILVER` as on L84.","commit_id":"ad18f042097ea690aec46d5245f89f35a5b8df45"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9f58640b63c8784aed0821921d9c5a09f708e883","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"@db_api.placement_context_manager.reader"},{"line_number":25,"context_line":"def _refresh_from_db(ctx, cache):"},{"line_number":26,"context_line":"    \"\"\"Grabs all custom resource classes from the DB table and populates the"},{"line_number":27,"context_line":"    supplied cache object\u0027s internal integer and string identifier dicts."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    :param cache: ResourceClassCache object to refresh."}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_ab166bf2","line":26,"range":{"start_line":26,"start_character":13,"end_line":26,"end_character":40},"updated":"2018-12-19 09:50:53.000000000","message":"all resource classes","commit_id":"1ae0f336a10cf4c5a0d39737bc109ae76618513b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"bfa66d230038dcd93e228b440f080bd0b6441546","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"@db_api.placement_context_manager.reader"},{"line_number":25,"context_line":"def _refresh_from_db(ctx, cache):"},{"line_number":26,"context_line":"    \"\"\"Grabs all custom resource classes from the DB table and populates the"},{"line_number":27,"context_line":"    supplied cache object\u0027s internal integer and string identifier dicts."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    :param cache: ResourceClassCache object to refresh."}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_5dbbda72","line":26,"range":{"start_line":26,"start_character":13,"end_line":26,"end_character":40},"in_reply_to":"3f79a3b5_ab166bf2","updated":"2018-12-19 11:00:47.000000000","message":"Done","commit_id":"1ae0f336a10cf4c5a0d39737bc109ae76618513b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9f58640b63c8784aed0821921d9c5a09f708e883","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        :raises `exception.ResourceClassNotFound` if rc_str cannot be found in"},{"line_number":70,"context_line":"                the DB."},{"line_number":71,"context_line":"        \"\"\""},{"line_number":72,"context_line":"        rc_id \u003d self.id_cache.get(rc_str)"},{"line_number":73,"context_line":"        if rc_id is not None:"},{"line_number":74,"context_line":"            return rc_id"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # Otherwise, check the database table"},{"line_number":77,"context_line":"        with lockutils.lock(_LOCKNAME):"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f79a3b5_6be4d3d3","line":74,"range":{"start_line":72,"start_character":0,"end_line":74,"end_character":24},"updated":"2018-12-19 09:50:53.000000000","message":"Not having the lock here seems OK to me.\n\nI only see one possible race if we read without holding the lock:\n\nWhen a custom rc is deleted the code calls a cache.clear() to drop the cache. If this happen while this code runs id_cache.get() then we might get inconsistent result. I\u0027m not really afraid of this as the rc delete API only returns _after_ the cache.clear() was run. So from the API perspective the behavior will be consistent.","commit_id":"1ae0f336a10cf4c5a0d39737bc109ae76618513b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0361e2f1a4daf99201d72d6c7064090977caef21","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    :param cache: ResourceClassCache object to refresh."},{"line_number":31,"context_line":"    \"\"\""},{"line_number":32,"context_line":"    with db_api.placement_context_manager.reader.connection.using(ctx) as conn:"},{"line_number":33,"context_line":"        sel \u003d sa.select([_RC_TBL.c.id, _RC_TBL.c.name, _RC_TBL.c.updated_at,"},{"line_number":34,"context_line":"                         _RC_TBL.c.created_at])"},{"line_number":35,"context_line":"        res \u003d conn.execute(sel).fetchall()"}],"source_content_type":"text/x-python","patch_set":23,"id":"ffd0ebdf_403dccb9","side":"PARENT","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":79},"updated":"2019-01-03 18:21:33.000000000","message":"This looks like it was removed because redundant, so just cleanup (which could have been done in a separate change, but meh) - is there anything else going on here?","commit_id":"3d33ed668c1612d6409ce3f7035b15e60cdbeac3"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"6954b4aff9af1186af5955066701a7f8bb1a9ead","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    :param cache: ResourceClassCache object to refresh."},{"line_number":31,"context_line":"    \"\"\""},{"line_number":32,"context_line":"    with db_api.placement_context_manager.reader.connection.using(ctx) as conn:"},{"line_number":33,"context_line":"        sel \u003d sa.select([_RC_TBL.c.id, _RC_TBL.c.name, _RC_TBL.c.updated_at,"},{"line_number":34,"context_line":"                         _RC_TBL.c.created_at])"},{"line_number":35,"context_line":"        res \u003d conn.execute(sel).fetchall()"}],"source_content_type":"text/x-python","patch_set":23,"id":"ffd0ebdf_606c9008","side":"PARENT","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":79},"in_reply_to":"ffd0ebdf_403dccb9","updated":"2019-01-03 18:30:18.000000000","message":"Yes, because redundant. That\u0027s mentioned in the commit message.","commit_id":"3d33ed668c1612d6409ce3f7035b15e60cdbeac3"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0361e2f1a4daf99201d72d6c7064090977caef21","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class ResourceClassCache(object):"},{"line_number":40,"context_line":"    \"\"\"A  cache of integer and string lookup values for resource classes.\"\"\""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def __init__(self, ctx):"},{"line_number":43,"context_line":"        \"\"\"Initialize the cache of resource class identifiers."}],"source_content_type":"text/x-python","patch_set":23,"id":"ffd0ebdf_c07a1c87","line":40,"range":{"start_line":40,"start_character":9,"end_line":40,"end_character":10},"updated":"2019-01-03 18:21:33.000000000","message":"x","commit_id":"a241fcee4ca65436458cc757fe81a19369451897"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"6954b4aff9af1186af5955066701a7f8bb1a9ead","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class ResourceClassCache(object):"},{"line_number":40,"context_line":"    \"\"\"A  cache of integer and string lookup values for resource classes.\"\"\""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def __init__(self, ctx):"},{"line_number":43,"context_line":"        \"\"\"Initialize the cache of resource class identifiers."}],"source_content_type":"text/x-python","patch_set":23,"id":"ffd0ebdf_40738ce8","line":40,"range":{"start_line":40,"start_character":9,"end_line":40,"end_character":10},"in_reply_to":"ffd0ebdf_c07a1c87","updated":"2019-01-03 18:30:18.000000000","message":"will fup if desired","commit_id":"a241fcee4ca65436458cc757fe81a19369451897"}],"placement/tests/functional/db/test_allocation_candidates.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"c817b18d045c926980bed5c0ebaf2b450df468a7","unresolved":false,"context_lines":[{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":"import os_resource_classes"},{"line_number":13,"context_line":"import os_traits"},{"line_number":14,"context_line":"from oslo_utils.fixture import uuidsentinel as uuids"},{"line_number":15,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_50aabb8c","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":26},"updated":"2018-12-07 19:26:30.000000000","message":"Perhaps we could have a standard abbreviation for this across all tests, like we do for uuidsentinel and sqlalchemy. Something like:\n\n  import os_resource_classes as orc\n\nThis would make the test code a bit more compact, and, IMO, easier to read.","commit_id":"efafb6ebbbc40b82766992553489a28d5235259d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"08ffa36453f283825250bf2ef83821c07c4af7bb","unresolved":false,"context_lines":[{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":"import os_resource_classes"},{"line_number":13,"context_line":"import os_traits"},{"line_number":14,"context_line":"from oslo_utils.fixture import uuidsentinel as uuids"},{"line_number":15,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_109be364","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":26},"in_reply_to":"3f79a3b5_50aabb8c","updated":"2018-12-07 19:28:43.000000000","message":"If that\u0027s what people prefer, sure. I tend to be abbreviation averse in code, but am happy to go with whatever the preference is on this.","commit_id":"efafb6ebbbc40b82766992553489a28d5235259d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"cdaec9abd7281233fdcb5e80dca16f9adef993ac","unresolved":false,"context_lines":[{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":"import os_resource_classes as osc"},{"line_number":13,"context_line":"import os_traits"},{"line_number":14,"context_line":"from oslo_utils.fixture import uuidsentinel as uuids"},{"line_number":15,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_0dbff4cb","line":12,"updated":"2018-12-12 16:33:05.000000000","message":"based on discussion in os-resource-classes changes, I\u0027ll make this orc, not osc","commit_id":"4f0543e71e06170961bed35a53644731df402ca8"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9f58640b63c8784aed0821921d9c5a09f708e883","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"3f79a3b5_4b6a3719","updated":"2018-12-19 09:50:53.000000000","message":"assume all this is automatic replace as I failed to read this through.","commit_id":"1ae0f336a10cf4c5a0d39737bc109ae76618513b"}]}
