)]}'
{"nova/api/openstack/placement/objects/consumer.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"08d4285d8aeee470a4ee627733363291475bba6f","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        self.obj_reset_changes()"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def update(self):"},{"line_number":207,"context_line":"        \"\"\"Used to update the consumer\u0027s project and user information without"},{"line_number":208,"context_line":"        incrementing the consumer\u0027s generation."},{"line_number":209,"context_line":"        \"\"\""},{"line_number":210,"context_line":"        @db_api.placement_context_manager.writer"},{"line_number":211,"context_line":"        def _update_in_db(ctx):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_20b54819","line":208,"range":{"start_line":207,"start_character":70,"end_line":208,"end_character":47},"updated":"2018-07-09 22:31:30.000000000","message":"Why wouldn\u0027t we increment the consumers generation? What if we have two processes trying to update these allocations at the same time and one writes from sentinel to non-sentinel values, and then the other overwrites back to sentinel because we didn\u0027t change the generation? Probably not likely, but that\u0027s the point of generations right?","commit_id":"09e1f1f7088f35971a908b807b35d07d11b695a9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df5e73bdb8ecf7d027aeb9f2b9c13a90eef6998e","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        self.obj_reset_changes()"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def update(self):"},{"line_number":207,"context_line":"        \"\"\"Used to update the consumer\u0027s project and user information without"},{"line_number":208,"context_line":"        incrementing the consumer\u0027s generation."},{"line_number":209,"context_line":"        \"\"\""},{"line_number":210,"context_line":"        @db_api.placement_context_manager.writer"},{"line_number":211,"context_line":"        def _update_in_db(ctx):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_01635bde","line":208,"range":{"start_line":207,"start_character":70,"end_line":208,"end_character":47},"in_reply_to":"5f7c97a3_204f888c","updated":"2018-07-10 16:51:49.000000000","message":"Hmm, OK, should this be _update() then to signal it shouldn\u0027t be used by external callers, like in the REST API handler code?","commit_id":"09e1f1f7088f35971a908b807b35d07d11b695a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1111f6fe5c4ed3a839fe37cfea924c435c2f406b","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        self.obj_reset_changes()"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def update(self):"},{"line_number":207,"context_line":"        \"\"\"Used to update the consumer\u0027s project and user information without"},{"line_number":208,"context_line":"        incrementing the consumer\u0027s generation."},{"line_number":209,"context_line":"        \"\"\""},{"line_number":210,"context_line":"        @db_api.placement_context_manager.writer"},{"line_number":211,"context_line":"        def _update_in_db(ctx):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_204f888c","line":208,"range":{"start_line":207,"start_character":70,"end_line":208,"end_character":47},"in_reply_to":"5f7c97a3_20b54819","updated":"2018-07-09 23:12:35.000000000","message":"See the comment below. Because if two processes concurrently update the same consumer, the AllocationList.create_all() will raise ConcurrentUpdateDetected.\n\nWe will already be incrementing the consumer generation at the end of AllocationList.create_all(), which is the only way that a consumer\u0027s information ever gets changed (since we have no REST API for consumers, only allocations).\n\nAlso see the long comment in the util.ensure_consumer() function.","commit_id":"09e1f1f7088f35971a908b807b35d07d11b695a9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"08d4285d8aeee470a4ee627733363291475bba6f","unresolved":false,"context_lines":[{"line_number":215,"context_line":"            # above just for safety. We don\u0027t need to check that the statement"},{"line_number":216,"context_line":"            # actually updated a single row. If it did not, then the"},{"line_number":217,"context_line":"            # consumer.increment_generation() call that happens in"},{"line_number":218,"context_line":"            # AllocationList.create_all() will end up raise"},{"line_number":219,"context_line":"            # ConcurrentUpdateDetected anyway"},{"line_number":220,"context_line":"            upd_stmt \u003d upd_stmt.where(sa.and_("},{"line_number":221,"context_line":"                CONSUMER_TBL.c.id \u003d\u003d self.id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_e038b09f","line":218,"range":{"start_line":218,"start_character":54,"end_line":218,"end_character":59},"updated":"2018-07-09 22:31:30.000000000","message":"raising","commit_id":"09e1f1f7088f35971a908b807b35d07d11b695a9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b69e59ab6af4fd137427cc82707accdc8e2a6369","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            # above just for safety. We don\u0027t need to check that the statement"},{"line_number":219,"context_line":"            # actually updated a single row. If it did not, then the"},{"line_number":220,"context_line":"            # consumer.increment_generation() call that happens in"},{"line_number":221,"context_line":"            # AllocationList.create_all() will end up raise"},{"line_number":222,"context_line":"            # ConcurrentUpdateDetected anyway"},{"line_number":223,"context_line":"            upd_stmt \u003d upd_stmt.where(sa.and_("},{"line_number":224,"context_line":"                CONSUMER_TBL.c.id \u003d\u003d self.id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_4b6bc51d","line":221,"range":{"start_line":221,"start_character":47,"end_line":221,"end_character":59},"updated":"2018-07-10 00:16:45.000000000","message":"s/end up// or s/raise/raising/","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8cef192f2c379fec9a2bb0a20726fdc09f32bc4a","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            # above just for safety. We don\u0027t need to check that the statement"},{"line_number":219,"context_line":"            # actually updated a single row. If it did not, then the"},{"line_number":220,"context_line":"            # consumer.increment_generation() call that happens in"},{"line_number":221,"context_line":"            # AllocationList.create_all() will end up raise"},{"line_number":222,"context_line":"            # ConcurrentUpdateDetected anyway"},{"line_number":223,"context_line":"            upd_stmt \u003d upd_stmt.where(sa.and_("},{"line_number":224,"context_line":"                CONSUMER_TBL.c.id \u003d\u003d self.id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_eb95de88","line":221,"range":{"start_line":221,"start_character":47,"end_line":221,"end_character":59},"in_reply_to":"5f7c97a3_4b6bc51d","updated":"2018-07-10 15:33:24.000000000","message":"Done","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df5e73bdb8ecf7d027aeb9f2b9c13a90eef6998e","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        _create_in_db(self._context)"},{"line_number":218,"context_line":"        self.obj_reset_changes()"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def update(self):"},{"line_number":221,"context_line":"        \"\"\"Used to update the consumer\u0027s project and user information without"},{"line_number":222,"context_line":"        incrementing the consumer\u0027s generation."},{"line_number":223,"context_line":"        \"\"\""},{"line_number":224,"context_line":"        @db_api.placement_context_manager.writer"},{"line_number":225,"context_line":"        def _update_in_db(ctx):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_a15dc716","line":222,"range":{"start_line":220,"start_character":4,"end_line":222,"end_character":47},"updated":"2018-07-10 16:51:49.000000000","message":"Replaying question from PS1:\n\nShould this be _update() then to signal it shouldn\u0027t be used by external callers, like in the REST API handler code?","commit_id":"4f9a7da5819b4cc2c181506c682a092caff40fb3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"29b25292c0acfde88629f0ea293d338dd6338e60","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        _create_in_db(self._context)"},{"line_number":218,"context_line":"        self.obj_reset_changes()"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def update(self):"},{"line_number":221,"context_line":"        \"\"\"Used to update the consumer\u0027s project and user information without"},{"line_number":222,"context_line":"        incrementing the consumer\u0027s generation."},{"line_number":223,"context_line":"        \"\"\""},{"line_number":224,"context_line":"        @db_api.placement_context_manager.writer"},{"line_number":225,"context_line":"        def _update_in_db(ctx):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_e1e41f10","line":222,"range":{"start_line":220,"start_character":4,"end_line":222,"end_character":47},"in_reply_to":"5f7c97a3_a15dc716","updated":"2018-07-10 16:59:25.000000000","message":"It *is* called by the REST API handler code (in util.ensure_consumer()).","commit_id":"4f9a7da5819b4cc2c181506c682a092caff40fb3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df5e73bdb8ecf7d027aeb9f2b9c13a90eef6998e","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            upd_stmt \u003d CONSUMER_TBL.update().values("},{"line_number":227,"context_line":"                project_id\u003dself.project.id, user_id\u003dself.user.id)"},{"line_number":228,"context_line":"            # NOTE(jaypipes): We add the generation check to the WHERE clause"},{"line_number":229,"context_line":"            # above just for safety. We don\u0027t need to check that the statement"},{"line_number":230,"context_line":"            # actually updated a single row. If it did not, then the"},{"line_number":231,"context_line":"            # consumer.increment_generation() call that happens in"},{"line_number":232,"context_line":"            # AllocationList.create_all() will end up raising"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_41a2b3fc","line":229,"range":{"start_line":229,"start_character":14,"end_line":229,"end_character":19},"updated":"2018-07-10 16:51:49.000000000","message":"below?","commit_id":"4f9a7da5819b4cc2c181506c682a092caff40fb3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"29b25292c0acfde88629f0ea293d338dd6338e60","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            upd_stmt \u003d CONSUMER_TBL.update().values("},{"line_number":227,"context_line":"                project_id\u003dself.project.id, user_id\u003dself.user.id)"},{"line_number":228,"context_line":"            # NOTE(jaypipes): We add the generation check to the WHERE clause"},{"line_number":229,"context_line":"            # above just for safety. We don\u0027t need to check that the statement"},{"line_number":230,"context_line":"            # actually updated a single row. If it did not, then the"},{"line_number":231,"context_line":"            # consumer.increment_generation() call that happens in"},{"line_number":232,"context_line":"            # AllocationList.create_all() will end up raising"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_a1eaa7d5","line":229,"range":{"start_line":229,"start_character":14,"end_line":229,"end_character":19},"in_reply_to":"5f7c97a3_41a2b3fc","updated":"2018-07-10 16:59:25.000000000","message":"yep, sorry, will fix if rev needed","commit_id":"4f9a7da5819b4cc2c181506c682a092caff40fb3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df5e73bdb8ecf7d027aeb9f2b9c13a90eef6998e","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            # above just for safety. We don\u0027t need to check that the statement"},{"line_number":230,"context_line":"            # actually updated a single row. If it did not, then the"},{"line_number":231,"context_line":"            # consumer.increment_generation() call that happens in"},{"line_number":232,"context_line":"            # AllocationList.create_all() will end up raising"},{"line_number":233,"context_line":"            # ConcurrentUpdateDetected anyway"},{"line_number":234,"context_line":"            upd_stmt \u003d upd_stmt.where(sa.and_("},{"line_number":235,"context_line":"                CONSUMER_TBL.c.id \u003d\u003d self.id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_61824f54","line":232,"range":{"start_line":232,"start_character":29,"end_line":232,"end_character":39},"updated":"2018-07-10 16:51:49.000000000","message":"Since this update() method is tightly coupled to generation handling in create_all(), I think that further justifies naming this _update() to indicate it shouldn\u0027t be used outside of the object itself.","commit_id":"4f9a7da5819b4cc2c181506c682a092caff40fb3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"29b25292c0acfde88629f0ea293d338dd6338e60","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            # above just for safety. We don\u0027t need to check that the statement"},{"line_number":230,"context_line":"            # actually updated a single row. If it did not, then the"},{"line_number":231,"context_line":"            # consumer.increment_generation() call that happens in"},{"line_number":232,"context_line":"            # AllocationList.create_all() will end up raising"},{"line_number":233,"context_line":"            # ConcurrentUpdateDetected anyway"},{"line_number":234,"context_line":"            upd_stmt \u003d upd_stmt.where(sa.and_("},{"line_number":235,"context_line":"                CONSUMER_TBL.c.id \u003d\u003d self.id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_018efb30","line":232,"range":{"start_line":232,"start_character":29,"end_line":232,"end_character":39},"in_reply_to":"5f7c97a3_61824f54","updated":"2018-07-10 16:59:25.000000000","message":"We call the method below Consumer.increment_generation(), not Consumer._increment_generation() and that\u0027s called from AllocationList.create_all().\n\nThis Consumer.update() method isn\u0027t actually called from AllocationList.create_all() method. It\u0027s called from the util.ensure_consumer() method (which is part of the handler code)","commit_id":"4f9a7da5819b4cc2c181506c682a092caff40fb3"}],"nova/api/openstack/placement/util.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b69e59ab6af4fd137427cc82707accdc8e2a6369","unresolved":false,"context_lines":[{"line_number":641,"context_line":"        # user external ID than the one that we had for the consumer. If this"},{"line_number":642,"context_line":"        # is the case, go ahead and modify the consumer record with the"},{"line_number":643,"context_line":"        # newly-supplied project/user information, but do not bump the consumer"},{"line_number":644,"context_line":"        # generation (since it will be bumped in the"},{"line_number":645,"context_line":"        # AllocationList.create_all() method."},{"line_number":646,"context_line":"        #"},{"line_number":647,"context_line":"        # NOTE(jaypipes): This means that there may be a partial update."}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_eb63b13f","line":644,"range":{"start_line":644,"start_character":21,"end_line":644,"end_character":22},"updated":"2018-07-10 00:16:45.000000000","message":"close this paren (or whack it)","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8cef192f2c379fec9a2bb0a20726fdc09f32bc4a","unresolved":false,"context_lines":[{"line_number":641,"context_line":"        # user external ID than the one that we had for the consumer. If this"},{"line_number":642,"context_line":"        # is the case, go ahead and modify the consumer record with the"},{"line_number":643,"context_line":"        # newly-supplied project/user information, but do not bump the consumer"},{"line_number":644,"context_line":"        # generation (since it will be bumped in the"},{"line_number":645,"context_line":"        # AllocationList.create_all() method."},{"line_number":646,"context_line":"        #"},{"line_number":647,"context_line":"        # NOTE(jaypipes): This means that there may be a partial update."}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_ab8b6666","line":644,"range":{"start_line":644,"start_character":21,"end_line":644,"end_character":22},"in_reply_to":"5f7c97a3_eb63b13f","updated":"2018-07-10 15:33:24.000000000","message":"Done","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b69e59ab6af4fd137427cc82707accdc8e2a6369","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        # generation (since it will be bumped in the"},{"line_number":645,"context_line":"        # AllocationList.create_all() method."},{"line_number":646,"context_line":"        #"},{"line_number":647,"context_line":"        # NOTE(jaypipes): This means that there may be a partial update."},{"line_number":648,"context_line":"        # Imagine a scenario where a user calls POST /allocations, and the"},{"line_number":649,"context_line":"        # payload references two consumers. The first consumer is a new"},{"line_number":650,"context_line":"        # consumer and is auto-created. The second consumer is an existing"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_0b8dcdd2","line":647,"range":{"start_line":647,"start_character":10,"end_line":647,"end_character":14},"updated":"2018-07-10 00:16:45.000000000","message":"So is this actually a TODO?","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8cef192f2c379fec9a2bb0a20726fdc09f32bc4a","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        # generation (since it will be bumped in the"},{"line_number":645,"context_line":"        # AllocationList.create_all() method."},{"line_number":646,"context_line":"        #"},{"line_number":647,"context_line":"        # NOTE(jaypipes): This means that there may be a partial update."},{"line_number":648,"context_line":"        # Imagine a scenario where a user calls POST /allocations, and the"},{"line_number":649,"context_line":"        # payload references two consumers. The first consumer is a new"},{"line_number":650,"context_line":"        # consumer and is auto-created. The second consumer is an existing"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_cb6262a7","line":647,"range":{"start_line":647,"start_character":10,"end_line":647,"end_character":14},"in_reply_to":"5f7c97a3_0b8dcdd2","updated":"2018-07-10 15:33:24.000000000","message":"Done","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b69e59ab6af4fd137427cc82707accdc8e2a6369","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        # the changes to the second consumer\u0027s project and user ID. I say MAY"},{"line_number":657,"context_line":"        # and not WILL NOT because I\u0027m not sure that the exception that gets"},{"line_number":658,"context_line":"        # raised from AllocationList.create_all() will cause the context"},{"line_number":659,"context_line":"        # manager\u0027s transaction to rollback automatically. I believe that the"},{"line_number":660,"context_line":"        # same transaction context is used for both util.ensure_consumer() and"},{"line_number":661,"context_line":"        # AllocationList.create_all() within the same HTTP request, but need to"},{"line_number":662,"context_line":"        # test this to be 100% certain..."},{"line_number":663,"context_line":"        if (project_id !\u003d consumer.project.external_id or"},{"line_number":664,"context_line":"                user_id !\u003d consumer.user.external_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_ebc89121","line":661,"range":{"start_line":659,"start_character":74,"end_line":661,"end_character":66},"updated":"2018-07-10 00:16:45.000000000","message":"I thought it wasn\u0027t, and that was the whole reason we had that bug where we weren\u0027t auto-deleting the consumer of the failed allocation create. Maybe you fixed that when you fixed the bug?","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8cef192f2c379fec9a2bb0a20726fdc09f32bc4a","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        # the changes to the second consumer\u0027s project and user ID. I say MAY"},{"line_number":657,"context_line":"        # and not WILL NOT because I\u0027m not sure that the exception that gets"},{"line_number":658,"context_line":"        # raised from AllocationList.create_all() will cause the context"},{"line_number":659,"context_line":"        # manager\u0027s transaction to rollback automatically. I believe that the"},{"line_number":660,"context_line":"        # same transaction context is used for both util.ensure_consumer() and"},{"line_number":661,"context_line":"        # AllocationList.create_all() within the same HTTP request, but need to"},{"line_number":662,"context_line":"        # test this to be 100% certain..."},{"line_number":663,"context_line":"        if (project_id !\u003d consumer.project.external_id or"},{"line_number":664,"context_line":"                user_id !\u003d consumer.user.external_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_eb715e78","line":661,"range":{"start_line":659,"start_character":74,"end_line":661,"end_character":66},"in_reply_to":"5f7c97a3_ebc89121","updated":"2018-07-10 15:33:24.000000000","message":"Yeah, I suspect I\u0027m going to need to have one giant-ass ugly method, decorated with the writer transaction context manager. this one big function is going to need to essentially do all the stuff that is being done in utils.ensure_consumer(), AllocationList.create_all(), Consumer.update(), Consumer.increment_generation(), etc... :(","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b69e59ab6af4fd137427cc82707accdc8e2a6369","unresolved":false,"context_lines":[{"line_number":658,"context_line":"        # raised from AllocationList.create_all() will cause the context"},{"line_number":659,"context_line":"        # manager\u0027s transaction to rollback automatically. I believe that the"},{"line_number":660,"context_line":"        # same transaction context is used for both util.ensure_consumer() and"},{"line_number":661,"context_line":"        # AllocationList.create_all() within the same HTTP request, but need to"},{"line_number":662,"context_line":"        # test this to be 100% certain..."},{"line_number":663,"context_line":"        if (project_id !\u003d consumer.project.external_id or"},{"line_number":664,"context_line":"                user_id !\u003d consumer.user.external_id):"},{"line_number":665,"context_line":"            LOG.debug(\"Supplied project or user ID for consumer %s was \""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_8b56bd5d","line":662,"range":{"start_line":661,"start_character":72,"end_line":662,"end_character":19},"updated":"2018-07-10 00:16:45.000000000","message":"eek, where/how?","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8cef192f2c379fec9a2bb0a20726fdc09f32bc4a","unresolved":false,"context_lines":[{"line_number":658,"context_line":"        # raised from AllocationList.create_all() will cause the context"},{"line_number":659,"context_line":"        # manager\u0027s transaction to rollback automatically. I believe that the"},{"line_number":660,"context_line":"        # same transaction context is used for both util.ensure_consumer() and"},{"line_number":661,"context_line":"        # AllocationList.create_all() within the same HTTP request, but need to"},{"line_number":662,"context_line":"        # test this to be 100% certain..."},{"line_number":663,"context_line":"        if (project_id !\u003d consumer.project.external_id or"},{"line_number":664,"context_line":"                user_id !\u003d consumer.user.external_id):"},{"line_number":665,"context_line":"            LOG.debug(\"Supplied project or user ID for consumer %s was \""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_0b44da17","line":662,"range":{"start_line":661,"start_character":72,"end_line":662,"end_character":19},"in_reply_to":"5f7c97a3_8b56bd5d","updated":"2018-07-10 15:33:24.000000000","message":"not sure. need to get with zzzeek on this.","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df5e73bdb8ecf7d027aeb9f2b9c13a90eef6998e","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        # TODO(jaypipes): This means that there may be a partial update."},{"line_number":651,"context_line":"        # Imagine a scenario where a user calls POST /allocations, and the"},{"line_number":652,"context_line":"        # payload references two consumers. The first consumer is a new"},{"line_number":653,"context_line":"        # consumer and is auto-created. The second consumer is an existing"},{"line_number":654,"context_line":"        # consumer, but contains a different project or user ID than the"},{"line_number":655,"context_line":"        # existing consumer\u0027s record. If the eventual call to"},{"line_number":656,"context_line":"        # AllocationList.create_all() fails for whatever reason (say, a"},{"line_number":657,"context_line":"        # resource provider generation conflict or out of resources failure),"},{"line_number":658,"context_line":"        # we will end up deleting the auto-created consumer but we MAY not undo"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_01d6fb53","line":655,"range":{"start_line":653,"start_character":40,"end_line":655,"end_character":37},"updated":"2018-07-10 16:51:49.000000000","message":"I\u0027m not super concerned about rolling this back if it happens and there is a failure creating one of the other allocations from the payload because (a) I\u0027m not sure when this would really happen besides POSTing allocations during a nova server move operation and we\u0027re *correcting* latent sentinel project/user info and (b) if that is the case, then we\u0027ve inadvertently healed the consumer record anyway.","commit_id":"4f9a7da5819b4cc2c181506c682a092caff40fb3"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8b36b2254b74908b00ab66c518d96f7d36c39302","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        # TODO(jaypipes): This means that there may be a partial update."},{"line_number":651,"context_line":"        # Imagine a scenario where a user calls POST /allocations, and the"},{"line_number":652,"context_line":"        # payload references two consumers. The first consumer is a new"},{"line_number":653,"context_line":"        # consumer and is auto-created. The second consumer is an existing"},{"line_number":654,"context_line":"        # consumer, but contains a different project or user ID than the"},{"line_number":655,"context_line":"        # existing consumer\u0027s record. If the eventual call to"},{"line_number":656,"context_line":"        # AllocationList.create_all() fails for whatever reason (say, a"},{"line_number":657,"context_line":"        # resource provider generation conflict or out of resources failure),"},{"line_number":658,"context_line":"        # we will end up deleting the auto-created consumer but we MAY not undo"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_415713ca","line":655,"range":{"start_line":653,"start_character":40,"end_line":655,"end_character":37},"in_reply_to":"5f7c97a3_01d6fb53","updated":"2018-07-10 16:54:50.000000000","message":"Assuming that\u0027s the only reason any placement customer would ever want to modify project and user IDs, that is.","commit_id":"4f9a7da5819b4cc2c181506c682a092caff40fb3"}],"nova/tests/functional/api/openstack/placement/gabbits/allocations-bug-1779717.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"08d4285d8aeee470a4ee627733363291475bba6f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"        x-auth-token: admin"},{"line_number":11,"context_line":"        accept: application/json"},{"line_number":12,"context_line":"        content-type: application/json"},{"line_number":13,"context_line":"        openstack-api-version: placement 1.28"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"tests:"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_a05718c9","line":13,"range":{"start_line":13,"start_character":41,"end_line":13,"end_character":45},"updated":"2018-07-09 22:31:30.000000000","message":"why not latest?","commit_id":"09e1f1f7088f35971a908b807b35d07d11b695a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a366d487c4d4573d328b98736a2040d85f92c4b2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"        x-auth-token: admin"},{"line_number":11,"context_line":"        accept: application/json"},{"line_number":12,"context_line":"        content-type: application/json"},{"line_number":13,"context_line":"        openstack-api-version: placement 1.28"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"tests:"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_2b2be97b","line":13,"range":{"start_line":13,"start_character":41,"end_line":13,"end_character":45},"in_reply_to":"5f7c97a3_a05718c9","updated":"2018-07-09 23:13:22.000000000","message":"We have a policy of not using latest and using a specific microversion that describes the expected behaviour assumed in the gabbit.","commit_id":"09e1f1f7088f35971a908b807b35d07d11b695a9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b69e59ab6af4fd137427cc82707accdc8e2a6369","unresolved":false,"context_lines":[{"line_number":21,"context_line":"  status: 200"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: get cn1"},{"line_number":24,"context_line":"  desc: provide a reference for later reuse"},{"line_number":25,"context_line":"  GET: $LOCATION"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"- name: add inventory"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_6bfd6139","line":24,"range":{"start_line":24,"start_character":8,"end_line":24,"end_character":43},"updated":"2018-07-10 00:16:45.000000000","message":"Why can\u0027t you just use $HISTORY[\u0027create compute node\u0027].$RESPONSE[...] ? Just saving a few chars?","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8cef192f2c379fec9a2bb0a20726fdc09f32bc4a","unresolved":false,"context_lines":[{"line_number":21,"context_line":"  status: 200"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"- name: get cn1"},{"line_number":24,"context_line":"  desc: provide a reference for later reuse"},{"line_number":25,"context_line":"  GET: $LOCATION"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"- name: add inventory"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_2b78b67b","line":24,"range":{"start_line":24,"start_character":8,"end_line":24,"end_character":43},"in_reply_to":"5f7c97a3_6bfd6139","updated":"2018-07-10 15:33:24.000000000","message":"This was copied from allocations-post.yaml, which uses microversion 1.13 before POST /resource_providers returned anything (it used to have a 201 Created response as well). I can change.","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b69e59ab6af4fd137427cc82707accdc8e2a6369","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"5f7c97a3_6b8241a7","line":107,"updated":"2018-07-10 00:16:45.000000000","message":"++","commit_id":"e025019edcfea44501bb4de4391e2a45628fd7ff"}]}
