)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a69cfdca99e66619ebeaa1e79d433ab81d6227ec","unresolved":false,"context_lines":[{"line_number":13,"context_line":"stored in separate tables in the DB and represent actual things in the"},{"line_number":14,"context_line":"placement data modeling. Giving them actual objects makes that"},{"line_number":15,"context_line":"consistent with the other objects in the data model, including resource"},{"line_number":16,"context_line":"providers, allocations, inventories, resource classes and traits."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The patch modifies the allocation handler to always ensure that a"},{"line_number":19,"context_line":"consumer record exists for the supplied consumer UUID and an associated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5f7c97a3_4e9ae561","line":16,"updated":"2018-05-16 10:09:39.000000000","message":"I think this is backwards and, surprisingly, not good database management. We should have objects for the things that matter at the API level, and tables for anything that makes sense and objects are composed from whatever tables are required to make that so.\n\nSo unless there is an exposed thing at the API level that is a Project or User (other than a uuid) then I don\u0027t think we should have objects for them, beyond the ones that sqlalchemy wants in api_models.\n\nAll of resource providers, allocations, inventories, resource classes and trait are API resources, so your reasoning here is tautological.","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"848401332021b2a2b57f55dc91b9c4b791698412","unresolved":false,"context_lines":[{"line_number":13,"context_line":"stored in separate tables in the DB and represent actual things in the"},{"line_number":14,"context_line":"placement data modeling. Giving them actual objects makes that"},{"line_number":15,"context_line":"consistent with the other objects in the data model, including resource"},{"line_number":16,"context_line":"providers, allocations, inventories, resource classes and traits."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The patch modifies the allocation handler to always ensure that a"},{"line_number":19,"context_line":"consumer record exists for the supplied consumer UUID and an associated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5f7c97a3_c7030173","line":16,"in_reply_to":"5f7c97a3_4e9ae561","updated":"2018-05-18 15:51:46.000000000","message":"I don\u0027t understand this at all. Typically your have ORM objects that match to your data model, regardless of what the API exposes. You use those objects to manipulate your data model and provide whatever view of those you want the consumer to have. The job of the API, IMHO, is to insulate the user from the way the data is actually stored and provide an abstract interface. Otherwise you\u0027d just lay down the schema and point them at the mysql interface.","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"}],"nova/api/openstack/placement/handlers/allocation.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"025a441a9b00eb91fcea1b73aaad04f7a0e07134","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from nova.api.openstack.placement import wsgi_wrapper"},{"line_number":28,"context_line":"from nova.i18n import _"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_d611145f","side":"PARENT","line":30,"updated":"2018-05-10 19:28:07.000000000","message":"goof. will re-add.","commit_id":"25fa2470e220a83ce632fed70ad41e55aabda0da"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"27b403368469836300880fbad240bd0dfed31a1b","unresolved":false,"context_lines":[{"line_number":215,"context_line":"            _(\"Allocation for resource provider \u0027%(rp_uuid)s\u0027 \""},{"line_number":216,"context_line":"              \"that does not exist.\") %"},{"line_number":217,"context_line":"            {\u0027rp_uuid\u0027: resource_provider_uuid})"},{"line_number":218,"context_line":"    util.ensure_consumer(context, consumer_uuid, project_id, user_id)"},{"line_number":219,"context_line":"    for resource_class in resources:"},{"line_number":220,"context_line":"        allocation \u003d rp_obj.Allocation("},{"line_number":221,"context_line":"            resource_provider\u003dresource_provider,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_01b696fb","line":218,"updated":"2018-05-22 18:57:07.000000000","message":"We should probably assert that this gets called in a unit test for this handler, right?","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"}],"nova/api/openstack/placement/objects/consumer.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1235493e7fc25c6653f063bc752239c3da334e9f","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"@db_api.api_context_manager.writer"},{"line_number":29,"context_line":"def create_incomplete_consumers(ctx):"},{"line_number":30,"context_line":"    \"\"\"Finds all the consumer records that are missing for allocations and"},{"line_number":31,"context_line":"    creates consumer records for them, using the \"incomplete consumer\" project"},{"line_number":32,"context_line":"    and user CONF options."}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_d84e0d37","line":29,"updated":"2018-05-11 16:26:40.000000000","message":"These methods take a batch size count. Looks like you\u0027re just always doing the full set and returning that you\u0027re done. I\u0027m guessing you think it\u0027s always going to be massively more efficient to do that? I know it\u0027s just one insert statement, but it could take a long time potentially no?\n\nEither way, this is going to fail because it gets passed a batch count. See this from the logs:\n\nhttp://logs.openstack.org/78/567678/3/check/neutron-grenade/407509f/logs/grenade.sh.txt.gz#_2018-05-10_21_37_22_871","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"775437def26efa228dd352690f06831189eeffe3","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"@db_api.api_context_manager.writer"},{"line_number":29,"context_line":"def create_incomplete_consumers(ctx):"},{"line_number":30,"context_line":"    \"\"\"Finds all the consumer records that are missing for allocations and"},{"line_number":31,"context_line":"    creates consumer records for them, using the \"incomplete consumer\" project"},{"line_number":32,"context_line":"    and user CONF options."}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_bea9b97c","line":29,"in_reply_to":"5f7c97a3_d84e0d37","updated":"2018-05-11 18:50:13.000000000","message":"Done","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1235493e7fc25c6653f063bc752239c3da334e9f","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                user_id\u003dself.user.id)"},{"line_number":144,"context_line":"            try:"},{"line_number":145,"context_line":"                db_obj.save(ctx.session)"},{"line_number":146,"context_line":"                self.id \u003d db_obj.id"},{"line_number":147,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":148,"context_line":"                raise exception.ConsumerExists(uuid\u003dself.uuid)"},{"line_number":149,"context_line":"        _create_in_db(self._context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_1d20f747","line":146,"updated":"2018-05-11 16:26:40.000000000","message":"Why not just do _from_db_obj() like we normally do so that we get consistent behavior? You wouldn\u0027t have to do things like L150 either.","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"775437def26efa228dd352690f06831189eeffe3","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                user_id\u003dself.user.id)"},{"line_number":144,"context_line":"            try:"},{"line_number":145,"context_line":"                db_obj.save(ctx.session)"},{"line_number":146,"context_line":"                self.id \u003d db_obj.id"},{"line_number":147,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":148,"context_line":"                raise exception.ConsumerExists(uuid\u003dself.uuid)"},{"line_number":149,"context_line":"        _create_in_db(self._context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_be1e99b8","line":146,"in_reply_to":"5f7c97a3_1d20f747","updated":"2018-05-11 18:50:13.000000000","message":"Because models.Consumer doesn\u0027t have a project_external_id or user_external_id attribute and would blow up on lines 123 and 126.","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1235493e7fc25c6653f063bc752239c3da334e9f","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                self.id \u003d db_obj.id"},{"line_number":147,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":148,"context_line":"                raise exception.ConsumerExists(uuid\u003dself.uuid)"},{"line_number":149,"context_line":"        _create_in_db(self._context)"},{"line_number":150,"context_line":"        self.obj_reset_changes()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_3d25b35c","line":149,"updated":"2018-05-11 16:26:40.000000000","message":"couldn\u0027t this raise something we need to turn into a ConsumerExists?","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"775437def26efa228dd352690f06831189eeffe3","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                self.id \u003d db_obj.id"},{"line_number":147,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":148,"context_line":"                raise exception.ConsumerExists(uuid\u003dself.uuid)"},{"line_number":149,"context_line":"        _create_in_db(self._context)"},{"line_number":150,"context_line":"        self.obj_reset_changes()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_5ee985b4","line":149,"in_reply_to":"5f7c97a3_3d25b35c","updated":"2018-05-11 18:50:13.000000000","message":"you mean what is happening on line 148?","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a69cfdca99e66619ebeaa1e79d433ab81d6227ec","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    fields \u003d {"},{"line_number":109,"context_line":"        \u0027id\u0027: fields.IntegerField(read_only\u003dTrue),"},{"line_number":110,"context_line":"        \u0027uuid\u0027: fields.UUIDField(nullable\u003dFalse),"},{"line_number":111,"context_line":"        \u0027project\u0027: fields.ObjectField(\u0027Project\u0027, nullable\u003dFalse),"},{"line_number":112,"context_line":"        \u0027user\u0027: fields.ObjectField(\u0027User\u0027, nullable\u003dFalse),"},{"line_number":113,"context_line":"    }"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_0ef70d8d","line":112,"range":{"start_line":111,"start_character":7,"end_line":112,"end_character":59},"updated":"2018-05-16 10:09:39.000000000","message":"This seems overkill to me and also complicates create below.\n\nI continue to think that this should be project and user uuids (or even just string) for a couple reasons:\n\n* we don\u0027t (yet) care about project and user at the api level beyond their identifiers\n* for the sake of keeping placement limited in scope we shouldn\u0027t care about project and user as anything more than identifiers\n\nIn other words, let\u0027s not open this hole for all kinds of trouble to fall into. Let\u0027s stay limited in scope.","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"848401332021b2a2b57f55dc91b9c4b791698412","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    fields \u003d {"},{"line_number":109,"context_line":"        \u0027id\u0027: fields.IntegerField(read_only\u003dTrue),"},{"line_number":110,"context_line":"        \u0027uuid\u0027: fields.UUIDField(nullable\u003dFalse),"},{"line_number":111,"context_line":"        \u0027project\u0027: fields.ObjectField(\u0027Project\u0027, nullable\u003dFalse),"},{"line_number":112,"context_line":"        \u0027user\u0027: fields.ObjectField(\u0027User\u0027, nullable\u003dFalse),"},{"line_number":113,"context_line":"    }"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_47a85176","line":112,"range":{"start_line":111,"start_character":7,"end_line":112,"end_character":59},"in_reply_to":"5f7c97a3_0ef70d8d","updated":"2018-05-18 15:51:46.000000000","message":"The way I view this is that this makes it consistent with the rest of the code, and adding it correctly to begin with makes it more complete.\n\nI agree that OVO is the wrong tool to use for a setup with no RPC and no cross-version compatibility needs. However, that\u0027s how all the rest of the code here is done. Blocking on this at this point seems a little random.","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"4b6cf9660faa8447208bc532a58ef4e663737821","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    fields \u003d {"},{"line_number":109,"context_line":"        \u0027id\u0027: fields.IntegerField(read_only\u003dTrue),"},{"line_number":110,"context_line":"        \u0027uuid\u0027: fields.UUIDField(nullable\u003dFalse),"},{"line_number":111,"context_line":"        \u0027project\u0027: fields.ObjectField(\u0027Project\u0027, nullable\u003dFalse),"},{"line_number":112,"context_line":"        \u0027user\u0027: fields.ObjectField(\u0027User\u0027, nullable\u003dFalse),"},{"line_number":113,"context_line":"    }"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_5591cdf0","line":112,"range":{"start_line":111,"start_character":7,"end_line":112,"end_character":59},"in_reply_to":"5f7c97a3_1aef0288","updated":"2018-05-20 07:45:34.000000000","message":"Just a quick response because I\u0027m on my way to the airport. Earlier in the discussion (this same patchset 4) when I asked about the use of Project and User information in placement, Jay said placement needed to be aware of them  \"including potentially the hierarchical nature of projects\".\n\nIt\u0027s the relationships between projects being _represented_ in placement that started the concern. We can be _aware_ of those relationships in a variety of ways, one of which is querying keystone as required, using the project uuid information which we do (and should) store in placement. That makes sense to me. But if we intend to somehow duplicate (or even cache) those relationships in placement, I\u0027m concerned.\n\nSince I don\u0027t know what the plan is, I expressed my concerns.","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7cbda7fca443c92b64d0cdacad3477d8c232a435","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    fields \u003d {"},{"line_number":109,"context_line":"        \u0027id\u0027: fields.IntegerField(read_only\u003dTrue),"},{"line_number":110,"context_line":"        \u0027uuid\u0027: fields.UUIDField(nullable\u003dFalse),"},{"line_number":111,"context_line":"        \u0027project\u0027: fields.ObjectField(\u0027Project\u0027, nullable\u003dFalse),"},{"line_number":112,"context_line":"        \u0027user\u0027: fields.ObjectField(\u0027User\u0027, nullable\u003dFalse),"},{"line_number":113,"context_line":"    }"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_7f462852","line":112,"range":{"start_line":111,"start_character":7,"end_line":112,"end_character":59},"in_reply_to":"5f7c97a3_47a85176","updated":"2018-05-19 18:52:00.000000000","message":"I\u0027m not blocking, I\u0027m expressing a preference, if it goes the other way, that\u0027s fine and no big deal.\n\nTo be clear about my (technical) preferences:\n\n* I\u0027d prefer that the management of project_uuid and user_uuid be subsumed within the Consumer object, not new objects of their own, so that we are not (yet) reifying Project and User in the system.\n* If we are going to have new objects, I have no issue with them being OVO for exactly the reasons already stated: it\u0027s what we\u0027ve been using.\n* Without further discussion, I\u0027m concerned that reifying Project and User (implying they are going to become something more than simple identifiers) is an expansion of scope to include functionality which I think placement should satisfy in concert with other systems (most likely Keystone) and not duplicate in itself. This is a concern because I find it problematic when we have state being duplicated between different OpenStack subsystems, rather than be used by reference (to a single authoritative system). Project and User information, at least to me, naturally live in Keystone. We\u0027re currently exploring ways of having aggregates live more in Placement and the duplication of state between Nova and Placement is problematic but I think we have at least some measure of agreement that aggregates are probably more natural solely in Placement. It may very well be that fuller representation of User and Project in placement makes perfect sense, but without more information, it is very hard to make that judgement thus I\u0027m inclined (for now) to prefer the simplest thing that could possibly work.\n\nI hope that clarifies things somewhat. If it does not, please ask me questions.","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3d69210c0d778d5983394a276164b22261f03ec6","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    fields \u003d {"},{"line_number":109,"context_line":"        \u0027id\u0027: fields.IntegerField(read_only\u003dTrue),"},{"line_number":110,"context_line":"        \u0027uuid\u0027: fields.UUIDField(nullable\u003dFalse),"},{"line_number":111,"context_line":"        \u0027project\u0027: fields.ObjectField(\u0027Project\u0027, nullable\u003dFalse),"},{"line_number":112,"context_line":"        \u0027user\u0027: fields.ObjectField(\u0027User\u0027, nullable\u003dFalse),"},{"line_number":113,"context_line":"    }"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_1aef0288","line":112,"range":{"start_line":111,"start_character":7,"end_line":112,"end_character":59},"in_reply_to":"5f7c97a3_7f462852","updated":"2018-05-20 01:40:40.000000000","message":"\u003e I\u0027m not blocking, I\u0027m expressing a preference, if it goes the other\n \u003e way, that\u0027s fine and no big deal.\n \u003e \n \u003e To be clear about my (technical) preferences:\n \u003e \n \u003e * I\u0027d prefer that the management of project_uuid and user_uuid be\n \u003e subsumed within the Consumer object, not new objects of their own,\n \u003e so that we are not (yet) reifying Project and User in the system.\n\nOkay, I\u0027m not sure I get this concern. The User, Project, and Consumer data records are all in separate tables. It\u0027s extremely common to have your ORM objects mirror your tables. If you were doing this with the SQLA ORM you\u0027d be pretty much forced to.\n\n \u003e * Without further discussion, I\u0027m concerned that reifying Project\n \u003e and User (implying they are going to become something more than\n \u003e simple identifiers) is an expansion of scope to include\n \u003e functionality which I think placement should satisfy in concert\n \u003e with other systems (most likely Keystone) and not duplicate in\n \u003e itself. This is a concern because I find it problematic when we\n \u003e have state being duplicated between different OpenStack subsystems,\n \u003e rather than be used by reference (to a single authoritative\n \u003e system). Project and User information, at least to me, naturally\n \u003e live in Keystone. We\u0027re currently exploring ways of having\n \u003e aggregates live more in Placement and the duplication of state\n \u003e between Nova and Placement is problematic but I think we have at\n \u003e least some measure of agreement that aggregates are probably more\n \u003e natural solely in Placement. It may very well be that fuller\n \u003e representation of User and Project in placement makes perfect\n \u003e sense, but without more information, it is very hard to make that\n \u003e judgement thus I\u0027m inclined (for now) to prefer the simplest thing\n \u003e that could possibly work.\n\nOkay, the crossover with keystone is completely lost on me. This has nothing to do with placement stepping on keystone\u0027s toes or replicating data from keystone that should be kept there. We\u0027re not talking about replicating \"user information\" here, we\u0027re talking about recording identifiers that reference user information in other systems so that placement can do the job we need of it, which is tracking resource allocations made by a system, on behalf of a user. If placement had to ask keystone about the user/project information for a given consumer uuid, it would be completely incapable of performing at the scale necessary to do anything useful. \"Replicating\" user/project identifiers from keystone in placement is no different from \"replicating\" the consumer (instance) uuids from nova.\n\nAssuming you don\u0027t disagree with the last point, I\u0027m not sure what else is contentious. The act of having separate tables for user, project, and consumer is good database hygiene, and having ORM objects that mirror that structure is an exceedingly common data modeling pattern.","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"2cb177b0b4bebf7cd4e0f1de90be5da3ff32a776","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # Create a record in the projects table for our sentinel project"},{"line_number":39,"context_line":"    incomplete_proj_id \u003d project_obj.ensure_incomplete_project(ctx)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # Create a record in the users table for our sentinel project"},{"line_number":42,"context_line":"    incomplete_user_id \u003d user_obj.ensure_incomplete_user(ctx)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Create a consumer table record for all consumers where"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_88fa9172","line":41,"range":{"start_line":41,"start_character":58,"end_line":41,"end_character":65},"updated":"2018-05-28 07:55:00.000000000","message":"user?","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"faa04fd6e7284a81f7609ba5069021cc1220dd0c","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # Create a record in the projects table for our sentinel project"},{"line_number":39,"context_line":"    incomplete_proj_id \u003d project_obj.ensure_incomplete_project(ctx)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # Create a record in the users table for our sentinel project"},{"line_number":42,"context_line":"    incomplete_user_id \u003d user_obj.ensure_incomplete_user(ctx)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Create a consumer table record for all consumers where"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_f9e40ae2","line":41,"range":{"start_line":41,"start_character":58,"end_line":41,"end_character":65},"in_reply_to":"5f7c97a3_88fa9172","updated":"2018-05-31 04:14:44.000000000","message":"Done","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"2cb177b0b4bebf7cd4e0f1de90be5da3ff32a776","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    incomplete_user_id \u003d user_obj.ensure_incomplete_user(ctx)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Create a consumer table record for all consumers where"},{"line_number":45,"context_line":"    # allocations.consumer_uuid doesn\u0027t exist in the consumers table. Use the"},{"line_number":46,"context_line":"    # incomplete consumer project and user ID."},{"line_number":47,"context_line":"    alloc_to_consumer \u003d sa.outerjoin("},{"line_number":48,"context_line":"        rp_obj._ALLOC_TBL, CONSUMER_TBL,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_a86aed16","line":45,"range":{"start_line":45,"start_character":6,"end_line":45,"end_character":68},"updated":"2018-05-28 07:55:00.000000000","message":"I don\u0027t see \"allocations.consumer_uuid\" here.\n\nSomething like \"allocations.consumer_id doesn\u0027t exist in the consumers table, consumers.uuid\" would be more accurate?","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"faa04fd6e7284a81f7609ba5069021cc1220dd0c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    incomplete_user_id \u003d user_obj.ensure_incomplete_user(ctx)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Create a consumer table record for all consumers where"},{"line_number":45,"context_line":"    # allocations.consumer_uuid doesn\u0027t exist in the consumers table. Use the"},{"line_number":46,"context_line":"    # incomplete consumer project and user ID."},{"line_number":47,"context_line":"    alloc_to_consumer \u003d sa.outerjoin("},{"line_number":48,"context_line":"        rp_obj._ALLOC_TBL, CONSUMER_TBL,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_79d8fa1c","line":45,"range":{"start_line":45,"start_character":6,"end_line":45,"end_character":68},"in_reply_to":"5f7c97a3_a86aed16","updated":"2018-05-31 04:14:44.000000000","message":"Done","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"@db_api.api_context_manager.writer"},{"line_number":29,"context_line":"def create_incomplete_consumers(ctx, batch_size):"},{"line_number":30,"context_line":"    \"\"\"Finds all the consumer records that are missing for allocations and"},{"line_number":31,"context_line":"    creates consumer records for them, using the \"incomplete consumer\" project"},{"line_number":32,"context_line":"    and user CONF options."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_b2e044fa","line":29,"range":{"start_line":29,"start_character":37,"end_line":29,"end_character":47},"updated":"2018-06-07 21:58:06.000000000","message":"whazzat?","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"35d067edda751c10c4380c6565f59c4a2daad3a8","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"@db_api.api_context_manager.writer"},{"line_number":29,"context_line":"def create_incomplete_consumers(ctx, batch_size):"},{"line_number":30,"context_line":"    \"\"\"Finds all the consumer records that are missing for allocations and"},{"line_number":31,"context_line":"    creates consumer records for them, using the \"incomplete consumer\" project"},{"line_number":32,"context_line":"    and user CONF options."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_087c57b4","line":29,"range":{"start_line":29,"start_character":37,"end_line":29,"end_character":47},"in_reply_to":"5f7c97a3_88e2a7d3","updated":"2018-06-08 14:44:01.000000000","message":"yuppers, that\u0027s precisely what is done.\n\nhttps://github.com/openstack/nova/blob/f9a419e40ff6440d1b85ff175ab862090a970460/nova/cmd/manage.py#L678-L701","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e5b98ea377216a8b2b4eeb09c5338ae840553459","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"@db_api.api_context_manager.writer"},{"line_number":29,"context_line":"def create_incomplete_consumers(ctx, batch_size):"},{"line_number":30,"context_line":"    \"\"\"Finds all the consumer records that are missing for allocations and"},{"line_number":31,"context_line":"    creates consumer records for them, using the \"incomplete consumer\" project"},{"line_number":32,"context_line":"    and user CONF options."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_bdb9e879","line":29,"range":{"start_line":29,"start_character":37,"end_line":29,"end_character":47},"in_reply_to":"5f7c97a3_b2e044fa","updated":"2018-06-08 14:00:29.000000000","message":"It is a required parameter from the nova-manage online_data_migration CLI command.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"584c33ecdc89cbfa688619876c06ad0ffaa10641","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"@db_api.api_context_manager.writer"},{"line_number":29,"context_line":"def create_incomplete_consumers(ctx, batch_size):"},{"line_number":30,"context_line":"    \"\"\"Finds all the consumer records that are missing for allocations and"},{"line_number":31,"context_line":"    creates consumer records for them, using the \"incomplete consumer\" project"},{"line_number":32,"context_line":"    and user CONF options."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_88e2a7d3","line":29,"range":{"start_line":29,"start_character":37,"end_line":29,"end_character":47},"in_reply_to":"5f7c97a3_bdb9e879","updated":"2018-06-08 14:36:21.000000000","message":"The way it\u0027s used on L58 makes it seem like we\u0027re only going to fix `batch_size` records.  Does the migration command run this in a loop until the return is (0, 0)?","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    migration routines."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    # Create a record in the projects table for our incomplete project"},{"line_number":39,"context_line":"    incomplete_proj_id \u003d project_obj.ensure_incomplete_project(ctx)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # Create a record in the users table for our incomplete user"},{"line_number":42,"context_line":"    incomplete_user_id \u003d user_obj.ensure_incomplete_user(ctx)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_0fe8ef13","line":39,"range":{"start_line":39,"start_character":37,"end_line":39,"end_character":62},"updated":"2018-06-07 21:58:06.000000000","message":"(2) ...and then this could be\n\n project_obj.ensure_project(CONF.incomplete_consumer_project_id)","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    creates consumer records for them, using the \"incomplete consumer\" project"},{"line_number":32,"context_line":"    and user CONF options."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    Returns a tuple containing two identical elements with the number of"},{"line_number":35,"context_line":"    consumer records created, since this is the expected return format for data"},{"line_number":36,"context_line":"    migration routines."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    # Create a record in the projects table for our incomplete project"},{"line_number":39,"context_line":"    incomplete_proj_id \u003d project_obj.ensure_incomplete_project(ctx)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_1894858a","line":36,"range":{"start_line":34,"start_character":31,"end_line":36,"end_character":23},"updated":"2018-06-11 13:44:14.000000000","message":"I believe the expected response is actually (found, done) so found is the total number of records found that need to be migrated, and done are the number that we actually did migrate (because of batch_size). So if found \u003c\u003d batch_size, then yeah the return values are going to be the same, but if we found 100 and batch_size is 50, we should return (100, 50). This gives an indication to the operator that they have more to do in the CLI output.","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"57ee52a25e3bff6000c4971b93f9d5ed46f2355d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    creates consumer records for them, using the \"incomplete consumer\" project"},{"line_number":32,"context_line":"    and user CONF options."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    Returns a tuple containing two identical elements with the number of"},{"line_number":35,"context_line":"    consumer records created, since this is the expected return format for data"},{"line_number":36,"context_line":"    migration routines."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    # Create a record in the projects table for our incomplete project"},{"line_number":39,"context_line":"    incomplete_proj_id \u003d project_obj.ensure_incomplete_project(ctx)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_784b3986","line":36,"range":{"start_line":34,"start_character":31,"end_line":36,"end_character":23},"in_reply_to":"5f7c97a3_1894858a","updated":"2018-06-11 13:47:38.000000000","message":"This is how the result is used:\n\nhttps://github.com/openstack/nova/blob/ef6b4f43f467dfad2fd0fe99d9dec3fc93a9ffed/nova/cmd/manage.py#L655","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"411c0bf099cbb19b584215c47b44d119114f943c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    creates consumer records for them, using the \"incomplete consumer\" project"},{"line_number":32,"context_line":"    and user CONF options."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    Returns a tuple containing two identical elements with the number of"},{"line_number":35,"context_line":"    consumer records created, since this is the expected return format for data"},{"line_number":36,"context_line":"    migration routines."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    # Create a record in the projects table for our incomplete project"},{"line_number":39,"context_line":"    incomplete_proj_id \u003d project_obj.ensure_incomplete_project(ctx)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_436beeb7","line":36,"range":{"start_line":34,"start_character":31,"end_line":36,"end_character":23},"in_reply_to":"5f7c97a3_784b3986","updated":"2018-06-11 13:55:30.000000000","message":"Apparently we are inconsistent in how we handle (found, done) for online data migrations, and users are expected to continue running them until there are 0 found, regardless of how we limit the \u0027found\u0027 value. For example, migrate_instances_add_request_spec calculates the limit in the \u0027found\u0027 result (like this migration), but migrate_keypairs_to_api_db finds the total and then later calculates the limit to process \u0027done\u0027. We just need better code documentation here:\n\nhttps://github.com/openstack/nova/blob/ef6b4f43f467dfad2fd0fe99d9dec3fc93a9ffed/nova/cmd/manage.py#L655\n\nOn how these methods are expected to behave, but that\u0027s not something to hold this change up for.","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    target_cols \u003d [\u0027uuid\u0027, \u0027project_id\u0027, \u0027user_id\u0027]"},{"line_number":60,"context_line":"    ins_stmt \u003d CONSUMER_TBL.insert().from_select(target_cols, sel)"},{"line_number":61,"context_line":"    res \u003d ctx.session.execute(ins_stmt)"},{"line_number":62,"context_line":"    return res.rowcount, res.rowcount"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"@db_api.api_context_manager.reader"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_58f3dd09","line":62,"range":{"start_line":62,"start_character":11,"end_line":62,"end_character":23},"updated":"2018-06-11 13:44:14.000000000","message":"This should be the result of sel before the limit is applied (I\u0027m pretty sure anyway).","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"}],"nova/api/openstack/placement/objects/project.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1235493e7fc25c6653f063bc752239c3da334e9f","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            db_obj \u003d models.Project(external_id\u003dself.external_id)"},{"line_number":87,"context_line":"            try:"},{"line_number":88,"context_line":"                db_obj.save(ctx.session)"},{"line_number":89,"context_line":"                self.id \u003d db_obj.id"},{"line_number":90,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":91,"context_line":"                raise exception.ProjectExists(external_id\u003dself.external_id)"},{"line_number":92,"context_line":"        _create_in_db(self._context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_9dd96758","line":89,"updated":"2018-05-11 16:26:40.000000000","message":"Same as the previous.","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"775437def26efa228dd352690f06831189eeffe3","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            db_obj \u003d models.Project(external_id\u003dself.external_id)"},{"line_number":87,"context_line":"            try:"},{"line_number":88,"context_line":"                db_obj.save(ctx.session)"},{"line_number":89,"context_line":"                self.id \u003d db_obj.id"},{"line_number":90,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":91,"context_line":"                raise exception.ProjectExists(external_id\u003dself.external_id)"},{"line_number":92,"context_line":"        _create_in_db(self._context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_7ef1e16a","line":89,"in_reply_to":"5f7c97a3_9dd96758","updated":"2018-05-11 18:50:13.000000000","message":"Done","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"PROJECT_TBL \u003d models.Project.__table__"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"@db_api.api_context_manager.writer"},{"line_number":28,"context_line":"def ensure_incomplete_project(ctx):"},{"line_number":29,"context_line":"    \"\"\"Ensures that a project record is created for the \"incomplete consumer"},{"line_number":30,"context_line":"    project\". Returns the internal ID of that record."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_2f2dabfc","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":34},"updated":"2018-06-07 21:58:06.000000000","message":"redundant.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e5b98ea377216a8b2b4eeb09c5338ae840553459","unresolved":false,"context_lines":[{"line_number":24,"context_line":"PROJECT_TBL \u003d models.Project.__table__"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"@db_api.api_context_manager.writer"},{"line_number":28,"context_line":"def ensure_incomplete_project(ctx):"},{"line_number":29,"context_line":"    \"\"\"Ensures that a project record is created for the \"incomplete consumer"},{"line_number":30,"context_line":"    project\". Returns the internal ID of that record."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_bd6ec8fd","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":34},"in_reply_to":"5f7c97a3_2f2dabfc","updated":"2018-06-08 14:00:29.000000000","message":"Why is this redundant? It\u0027s necessary at the very least to functionally test project_obj.ensure_incomplete_project().","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"584c33ecdc89cbfa688619876c06ad0ffaa10641","unresolved":false,"context_lines":[{"line_number":24,"context_line":"PROJECT_TBL \u003d models.Project.__table__"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"@db_api.api_context_manager.writer"},{"line_number":28,"context_line":"def ensure_incomplete_project(ctx):"},{"line_number":29,"context_line":"    \"\"\"Ensures that a project record is created for the \"incomplete consumer"},{"line_number":30,"context_line":"    project\". Returns the internal ID of that record."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_88d86752","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":34},"in_reply_to":"5f7c97a3_bd6ec8fd","updated":"2018-06-08 14:36:21.000000000","message":"Oh, I just looked at where it was called in the code and that was already in a writer context.  No harm, if it\u0027s needed for testing.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"@db_api.api_context_manager.writer"},{"line_number":28,"context_line":"def ensure_incomplete_project(ctx):"},{"line_number":29,"context_line":"    \"\"\"Ensures that a project record is created for the \"incomplete consumer"},{"line_number":30,"context_line":"    project\". Returns the internal ID of that record."},{"line_number":31,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_efac93a0","line":28,"range":{"start_line":28,"start_character":4,"end_line":28,"end_character":29},"updated":"2018-06-07 21:58:06.000000000","message":"(3) ...and then you wouldn\u0027t need this method.\n\nSimilar DRY with incomplete user stuff.\n\n(Maybe this is setting up something prettier in a future patch in the series.  But in any case the guts of this are effectively identical to the guts of _ensure_project, so this could call that at the very least.)","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"}],"nova/api/openstack/placement/objects/resource_provider.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1235493e7fc25c6653f063bc752239c3da334e9f","unresolved":false,"context_lines":[{"line_number":1887,"context_line":"        if \u0027project_id\u0027 not in self or self.project_id is None:"},{"line_number":1888,"context_line":"            self.project_id \u003d CONF.placement.incomplete_consumer_project_id"},{"line_number":1889,"context_line":"        if \u0027user_id\u0027 not in self or self.user_id is None:"},{"line_number":1890,"context_line":"            self.user_id \u003d CONF.placement.incomplete_consumer_user_id"},{"line_number":1891,"context_line":""},{"line_number":1892,"context_line":"        # Grab the project internal ID if it exists in the projects table"},{"line_number":1893,"context_line":"        pid \u003d _ensure_project(ctx, self.project_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_3dda934a","line":1890,"updated":"2018-05-11 16:26:40.000000000","message":"++","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":1890,"context_line":"        :param ctx: `nova.context.RequestContext` object that has the oslo.db"},{"line_number":1891,"context_line":"                    Session object in it"},{"line_number":1892,"context_line":"        \"\"\""},{"line_number":1893,"context_line":"        # If project_id and user_id are not set then create a consumer record"},{"line_number":1894,"context_line":"        # pointing to the incomplete consumer project and user ID."},{"line_number":1895,"context_line":"        # This allows microversion \u003c1.8 to continue to work. Since then the"},{"line_number":1896,"context_line":"        # fields are required and the enforcement is at the HTTP API layer."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_6f1ba3c9","line":1893,"range":{"start_line":1893,"start_character":24,"end_line":1893,"end_character":27},"updated":"2018-06-07 21:58:06.000000000","message":"and/or","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":1891,"context_line":"                    Session object in it"},{"line_number":1892,"context_line":"        \"\"\""},{"line_number":1893,"context_line":"        # If project_id and user_id are not set then create a consumer record"},{"line_number":1894,"context_line":"        # pointing to the incomplete consumer project and user ID."},{"line_number":1895,"context_line":"        # This allows microversion \u003c1.8 to continue to work. Since then the"},{"line_number":1896,"context_line":"        # fields are required and the enforcement is at the HTTP API layer."},{"line_number":1897,"context_line":"        if \u0027project_id\u0027 not in self or self.project_id is None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_0f78eff5","line":1894,"range":{"start_line":1894,"start_character":54,"end_line":1894,"end_character":57},"updated":"2018-06-07 21:58:06.000000000","message":"and/or","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":2119,"context_line":"    return res[0][0]"},{"line_number":2120,"context_line":""},{"line_number":2121,"context_line":""},{"line_number":2122,"context_line":"def _ensure_project(ctx, external_id):"},{"line_number":2123,"context_line":"    \"\"\"Ensures the supplied external project ID exists in the projects lookup"},{"line_number":2124,"context_line":"    table and if not, adds it. Returns the internal project ID."},{"line_number":2125,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_6fe08327","line":2122,"range":{"start_line":2122,"start_character":4,"end_line":2122,"end_character":19},"updated":"2018-06-07 21:58:06.000000000","message":"(1) Why not make this public, move it to project.py, ...","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e5b98ea377216a8b2b4eeb09c5338ae840553459","unresolved":false,"context_lines":[{"line_number":2119,"context_line":"    return res[0][0]"},{"line_number":2120,"context_line":""},{"line_number":2121,"context_line":""},{"line_number":2122,"context_line":"def _ensure_project(ctx, external_id):"},{"line_number":2123,"context_line":"    \"\"\"Ensures the supplied external project ID exists in the projects lookup"},{"line_number":2124,"context_line":"    table and if not, adds it. Returns the internal project ID."},{"line_number":2125,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_8504d215","line":2122,"range":{"start_line":2122,"start_character":4,"end_line":2122,"end_character":19},"in_reply_to":"5f7c97a3_6fe08327","updated":"2018-06-08 14:00:29.000000000","message":"Because both of these are removed in a later patch in the series (because they are no longer used):\n\nhttps://review.openstack.org/#/c/565405/19/nova/api/openstack/placement/objects/resource_provider.py","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"584c33ecdc89cbfa688619876c06ad0ffaa10641","unresolved":false,"context_lines":[{"line_number":2119,"context_line":"    return res[0][0]"},{"line_number":2120,"context_line":""},{"line_number":2121,"context_line":""},{"line_number":2122,"context_line":"def _ensure_project(ctx, external_id):"},{"line_number":2123,"context_line":"    \"\"\"Ensures the supplied external project ID exists in the projects lookup"},{"line_number":2124,"context_line":"    table and if not, adds it. Returns the internal project ID."},{"line_number":2125,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_68cdcb5b","line":2122,"range":{"start_line":2122,"start_character":4,"end_line":2122,"end_character":19},"in_reply_to":"5f7c97a3_8504d215","updated":"2018-06-08 14:36:21.000000000","message":"Okay, I\u0027ll keep an eye out for that, thanks.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"}],"nova/api/openstack/placement/objects/user.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1235493e7fc25c6653f063bc752239c3da334e9f","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            db_obj \u003d models.User(external_id\u003dself.external_id)"},{"line_number":87,"context_line":"            try:"},{"line_number":88,"context_line":"                db_obj.save(ctx.session)"},{"line_number":89,"context_line":"                self.id \u003d db_obj.id"},{"line_number":90,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":91,"context_line":"                raise exception.UserExists(external_id\u003dself.external_id)"},{"line_number":92,"context_line":"        _create_in_db(self._context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_bded43f1","line":89,"updated":"2018-05-11 16:26:40.000000000","message":"Same thing here.","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"775437def26efa228dd352690f06831189eeffe3","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            db_obj \u003d models.User(external_id\u003dself.external_id)"},{"line_number":87,"context_line":"            try:"},{"line_number":88,"context_line":"                db_obj.save(ctx.session)"},{"line_number":89,"context_line":"                self.id \u003d db_obj.id"},{"line_number":90,"context_line":"            except db_exc.DBDuplicateEntry:"},{"line_number":91,"context_line":"                raise exception.UserExists(external_id\u003dself.external_id)"},{"line_number":92,"context_line":"        _create_in_db(self._context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_9e9b9d16","line":89,"in_reply_to":"5f7c97a3_bded43f1","updated":"2018-05-11 18:50:13.000000000","message":"Done","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"@db_api.api_context_manager.writer"},{"line_number":28,"context_line":"def ensure_incomplete_user(ctx):"},{"line_number":29,"context_line":"    \"\"\"Ensures that a user record is created for the \"incomplete consumer"},{"line_number":30,"context_line":"    user\". Returns the internal ID of that record."},{"line_number":31,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_cf443777","line":28,"range":{"start_line":28,"start_character":4,"end_line":28,"end_character":26},"updated":"2018-06-07 21:58:06.000000000","message":"https://youtu.be/qM7iLbFXQF8?t\u003d46","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"}],"nova/api/openstack/placement/util.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"27b403368469836300880fbad240bd0dfed31a1b","unresolved":false,"context_lines":[{"line_number":577,"context_line":"    return by_suffix"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"def ensure_consumer(ctx, consumer_uuid, project_id, user_id):"},{"line_number":581,"context_line":"    \"\"\"Ensures there are records in the consumers, projects and users table for"},{"line_number":582,"context_line":"    the supplied external identifiers."},{"line_number":583,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_61bf4ad0","line":580,"updated":"2018-05-22 18:57:07.000000000","message":"Are there tests for this that I\u0027m missing?","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"faa04fd6e7284a81f7609ba5069021cc1220dd0c","unresolved":false,"context_lines":[{"line_number":577,"context_line":"    return by_suffix"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"def ensure_consumer(ctx, consumer_uuid, project_id, user_id):"},{"line_number":581,"context_line":"    \"\"\"Ensures there are records in the consumers, projects and users table for"},{"line_number":582,"context_line":"    the supplied external identifiers."},{"line_number":583,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_7bc30a39","line":580,"in_reply_to":"5f7c97a3_61bf4ad0","updated":"2018-05-31 04:14:44.000000000","message":"Done","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":577,"context_line":"    return by_suffix"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"def ensure_consumer(ctx, consumer_uuid, project_id, user_id):"},{"line_number":581,"context_line":"    \"\"\"Ensures there are records in the consumers, projects and users table for"},{"line_number":582,"context_line":"    the supplied external identifiers."},{"line_number":583,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_af59bb5b","line":580,"range":{"start_line":580,"start_character":4,"end_line":580,"end_character":19},"updated":"2018-06-07 21:58:06.000000000","message":"How come this isn\u0027t in consumer.py?","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e5b98ea377216a8b2b4eeb09c5338ae840553459","unresolved":false,"context_lines":[{"line_number":577,"context_line":"    return by_suffix"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"def ensure_consumer(ctx, consumer_uuid, project_id, user_id):"},{"line_number":581,"context_line":"    \"\"\"Ensures there are records in the consumers, projects and users table for"},{"line_number":582,"context_line":"    the supplied external identifiers."},{"line_number":583,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_651e560d","line":580,"range":{"start_line":580,"start_character":4,"end_line":580,"end_character":19},"in_reply_to":"5f7c97a3_af59bb5b","updated":"2018-06-08 14:00:29.000000000","message":"Because in following patches, we add handler/microversion-specific conditionals/switches in here and Chris wanted to isolate all that jazz into the util module (and I agreed since I don\u0027t want microversion mess impacting the object definitions).","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":588,"context_line":"    :param project_id: The external ID of the project consuming the resources."},{"line_number":589,"context_line":"    :param user_id: The external ID of the user consuming the resources."},{"line_number":590,"context_line":"    \"\"\""},{"line_number":591,"context_line":"    if project_id is None:"},{"line_number":592,"context_line":"        project_id \u003d CONF.placement.incomplete_consumer_project_id"},{"line_number":593,"context_line":"        user_id \u003d CONF.placement.incomplete_consumer_user_id"},{"line_number":594,"context_line":"    try:"},{"line_number":595,"context_line":"        proj \u003d project_obj.Project.get_by_external_id(ctx, project_id)"},{"line_number":596,"context_line":"    except exception.NotFound:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_f2a6bc0f","line":593,"range":{"start_line":591,"start_character":0,"end_line":593,"end_character":60},"updated":"2018-06-07 21:58:06.000000000","message":"Split out the user_id into its own condition.\n\n(I know it should always be both or neither, but this looks funny; and you did both conditions at https://review.openstack.org/#/c/567678/10/nova/api/openstack/placement/objects/resource_provider.py@1897)","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":622,"context_line":"                ctx, uuid\u003dconsumer_uuid, project\u003dproj, user\u003duser)"},{"line_number":623,"context_line":"            consumer.create()"},{"line_number":624,"context_line":"        except exception.ConsumerExists:"},{"line_number":625,"context_line":"            # No worries, another thread created this user already"},{"line_number":626,"context_line":"            consumer \u003d consumer_obj.Consumer.get_by_uuid(ctx, consumer_uuid)"},{"line_number":627,"context_line":"    return consumer"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_728b8c67","line":625,"range":{"start_line":625,"start_character":54,"end_line":625,"end_character":58},"updated":"2018-06-07 21:58:06.000000000","message":"consumer pasta","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e5b98ea377216a8b2b4eeb09c5338ae840553459","unresolved":false,"context_lines":[{"line_number":622,"context_line":"                ctx, uuid\u003dconsumer_uuid, project\u003dproj, user\u003duser)"},{"line_number":623,"context_line":"            consumer.create()"},{"line_number":624,"context_line":"        except exception.ConsumerExists:"},{"line_number":625,"context_line":"            # No worries, another thread created this user already"},{"line_number":626,"context_line":"            consumer \u003d consumer_obj.Consumer.get_by_uuid(ctx, consumer_uuid)"},{"line_number":627,"context_line":"    return consumer"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_a55a2eef","line":625,"range":{"start_line":625,"start_character":54,"end_line":625,"end_character":58},"in_reply_to":"5f7c97a3_728b8c67","updated":"2018-06-08 14:00:29.000000000","message":"heh :)","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":591,"context_line":"    if project_id is None:"},{"line_number":592,"context_line":"        project_id \u003d CONF.placement.incomplete_consumer_project_id"},{"line_number":593,"context_line":"        user_id \u003d CONF.placement.incomplete_consumer_user_id"},{"line_number":594,"context_line":"    try:"},{"line_number":595,"context_line":"        proj \u003d project_obj.Project.get_by_external_id(ctx, project_id)"},{"line_number":596,"context_line":"    except exception.NotFound:"},{"line_number":597,"context_line":"        # Auto-create the project if we found no record of it..."},{"line_number":598,"context_line":"        try:"},{"line_number":599,"context_line":"            proj \u003d project_obj.Project(ctx, external_id\u003dproject_id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_7d4b2b86","line":596,"range":{"start_line":594,"start_character":4,"end_line":596,"end_character":30},"updated":"2018-06-11 13:44:14.000000000","message":"nit: We don\u0027t really need this if we\u0027re handling ProjectExists below.","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":601,"context_line":"        except exception.ProjectExists:"},{"line_number":602,"context_line":"            # No worries, another thread created this project already"},{"line_number":603,"context_line":"            proj \u003d project_obj.Project.get_by_external_id(ctx, project_id)"},{"line_number":604,"context_line":"    try:"},{"line_number":605,"context_line":"        user \u003d user_obj.User.get_by_external_id(ctx, user_id)"},{"line_number":606,"context_line":"    except exception.NotFound:"},{"line_number":607,"context_line":"        # Auto-create the user if we found no record of it..."},{"line_number":608,"context_line":"        try:"},{"line_number":609,"context_line":"            user \u003d user_obj.User(ctx, external_id\u003duser_id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_3d413364","line":606,"range":{"start_line":604,"start_character":4,"end_line":606,"end_character":30},"updated":"2018-06-11 13:44:14.000000000","message":"same","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    try:"},{"line_number":616,"context_line":"        consumer \u003d consumer_obj.Consumer.get_by_uuid(ctx, consumer_uuid)"},{"line_number":617,"context_line":"    except exception.NotFound:"},{"line_number":618,"context_line":"        # No such consumer. This is common for new allocations. Create the"},{"line_number":619,"context_line":"        # consumer record"},{"line_number":620,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_dd511f32","line":617,"updated":"2018-06-11 13:44:14.000000000","message":"same","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"}],"nova/cmd/manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":402,"context_line":"        # need to be populated if it was not specified during boot time."},{"line_number":403,"context_line":"        instance_obj.populate_missing_availability_zones,"},{"line_number":404,"context_line":"        # Added in Rocky"},{"line_number":405,"context_line":"        consumer_obj.create_incomplete_consumers,"},{"line_number":406,"context_line":"    )"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_b816b1f1","line":405,"updated":"2018-06-11 13:44:14.000000000","message":"I\u0027m not totally sure what is going to happen when placement is split out and we still have to keep these online data migrations around. I think the answer lies within cdent\u0027s direct to placement wsgi request intercept tool.\n\nhttps://review.openstack.org/#/c/572576/","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"}],"nova/conf/placement.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1235493e7fc25c6653f063bc752239c3da334e9f","unresolved":false,"context_lines":[{"line_number":54,"context_line":"a project or user identifier for the consumer. In cleaning up the data"},{"line_number":55,"context_line":"modeling, we no longer allow missing project and user information. This CONF"},{"line_number":56,"context_line":"value is the user identifier to use when we find missing information for an"},{"line_number":57,"context_line":"allocation consumer."},{"line_number":58,"context_line":"\"\"\"),"},{"line_number":59,"context_line":"]"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_5872fdae","line":57,"updated":"2018-05-11 16:26:40.000000000","message":"This implies \"if we find missing information in an API request\" but it\u0027s not very explicit. Might be worth saying something like \"if an older client makes an allocation, we\u0027ll use this information in place of the stuff it doesn\u0027t provide.\"","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"775437def26efa228dd352690f06831189eeffe3","unresolved":false,"context_lines":[{"line_number":54,"context_line":"a project or user identifier for the consumer. In cleaning up the data"},{"line_number":55,"context_line":"modeling, we no longer allow missing project and user information. This CONF"},{"line_number":56,"context_line":"value is the user identifier to use when we find missing information for an"},{"line_number":57,"context_line":"allocation consumer."},{"line_number":58,"context_line":"\"\"\"),"},{"line_number":59,"context_line":"]"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_5ea18545","line":57,"in_reply_to":"5f7c97a3_5872fdae","updated":"2018-05-11 18:50:13.000000000","message":"Done","commit_id":"933b35d85201df59c173f7258e67004b70c80c71"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"848401332021b2a2b57f55dc91b9c4b791698412","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"DEFAULT_SERVICE_TYPE \u003d \u0027placement\u0027"},{"line_number":20,"context_line":"DEFAULT_CONSUMER_MISSING_SENTINEL \u003d \u002700000000-0000-0000-0000-0000000000000\u0027"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"placement_group \u003d cfg.OptGroup("},{"line_number":23,"context_line":"    \u0027placement\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_bd65feb6","line":20,"range":{"start_line":20,"start_character":25,"end_line":20,"end_character":33},"updated":"2018-05-18 15:51:46.000000000","message":"I still don\u0027t like calling this a sentinel, because it\u0027s not. It\u0027s the project/user id that we use if none is supplied. This is a reasonable default uuid for that if unspecified in the config, but it\u0027s not a sentinel, IMHO. But, that\u0027s just my problem.","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"152d75f213e0109a77c78b857af0cf2982a7f8cf","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"DEFAULT_SERVICE_TYPE \u003d \u0027placement\u0027"},{"line_number":20,"context_line":"DEFAULT_CONSUMER_MISSING_SENTINEL \u003d \u002700000000-0000-0000-0000-0000000000000\u0027"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"placement_group \u003d cfg.OptGroup("},{"line_number":23,"context_line":"    \u0027placement\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_ab431013","line":20,"range":{"start_line":20,"start_character":25,"end_line":20,"end_character":33},"in_reply_to":"5f7c97a3_4775b097","updated":"2018-05-21 17:33:05.000000000","message":"Done","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d5ccc5647615d8dfb1aa43d912271810cd45604d","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"DEFAULT_SERVICE_TYPE \u003d \u0027placement\u0027"},{"line_number":20,"context_line":"DEFAULT_CONSUMER_MISSING_SENTINEL \u003d \u002700000000-0000-0000-0000-0000000000000\u0027"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"placement_group \u003d cfg.OptGroup("},{"line_number":23,"context_line":"    \u0027placement\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_4775b097","line":20,"range":{"start_line":20,"start_character":25,"end_line":20,"end_character":33},"in_reply_to":"5f7c97a3_875bc952","updated":"2018-05-18 16:04:58.000000000","message":"That would make me SO HAPPY. :)","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"be9420e12cfe20eb30135242894bc6b81702d2a8","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"DEFAULT_SERVICE_TYPE \u003d \u0027placement\u0027"},{"line_number":20,"context_line":"DEFAULT_CONSUMER_MISSING_SENTINEL \u003d \u002700000000-0000-0000-0000-0000000000000\u0027"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"placement_group \u003d cfg.OptGroup("},{"line_number":23,"context_line":"    \u0027placement\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_875bc952","line":20,"range":{"start_line":20,"start_character":25,"end_line":20,"end_character":33},"in_reply_to":"5f7c97a3_bd65feb6","updated":"2018-05-18 16:00:04.000000000","message":"ah, ack, this was just leftover from the original revision. I will rename the variable to DEFAULT_CONSUMER_MISSING_ID.","commit_id":"1aaba0f32c42345d095c70fabe7a03bd84c5d13e"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"e901c865e07a33edc791f9a7b82c816be0051fb6","unresolved":false,"context_lines":[{"line_number":36,"context_line":"results in the same order; but no guarantees are made as to how that order"},{"line_number":37,"context_line":"is determined."},{"line_number":38,"context_line":"\"\"\"),"},{"line_number":39,"context_line":"    cfg.StrOpt("},{"line_number":40,"context_line":"        \u0027incomplete_consumer_project_id\u0027,"},{"line_number":41,"context_line":"        default\u003dDEFAULT_CONSUMER_MISSING_ID,"},{"line_number":42,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_d2d34e00","line":39,"updated":"2018-05-29 07:31:21.000000000","message":"Why making them configurable?","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"6930eea840573540f4d96b6b2d698d6e14aa93ac","unresolved":false,"context_lines":[{"line_number":36,"context_line":"results in the same order; but no guarantees are made as to how that order"},{"line_number":37,"context_line":"is determined."},{"line_number":38,"context_line":"\"\"\"),"},{"line_number":39,"context_line":"    cfg.StrOpt("},{"line_number":40,"context_line":"        \u0027incomplete_consumer_project_id\u0027,"},{"line_number":41,"context_line":"        default\u003dDEFAULT_CONSUMER_MISSING_ID,"},{"line_number":42,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_d58b061c","line":39,"in_reply_to":"5f7c97a3_57dac277","updated":"2018-05-31 12:29:19.000000000","message":"Oh yes, looks to have some comments about that. Thanks Dan. perhaps it would have been good to put what you said in a comment.\n\n\u003e These allocations will have to count against something, and the operator may want to create a special tenant/user to \"own\" all the allocations for which we don\u0027t have better data. That may help with quota calculations (since we want to use placement for quota soon) as well as tracking down which allocations need to be updated.","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3de4871e925a728e98d6fc5cccece6cb3799336a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"results in the same order; but no guarantees are made as to how that order"},{"line_number":37,"context_line":"is determined."},{"line_number":38,"context_line":"\"\"\"),"},{"line_number":39,"context_line":"    cfg.StrOpt("},{"line_number":40,"context_line":"        \u0027incomplete_consumer_project_id\u0027,"},{"line_number":41,"context_line":"        default\u003dDEFAULT_CONSUMER_MISSING_ID,"},{"line_number":42,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_57dac277","line":39,"in_reply_to":"5f7c97a3_d2d34e00","updated":"2018-05-29 18:56:53.000000000","message":"Please see the earlier discussion on this: \n\nhttps://review.openstack.org/#/c/557958/21\n\nand various IRC logs.\n\nThese allocations will have to count against something, and the operator may want to create a special tenant/user to \"own\" all the allocations for which we don\u0027t have better data. That may help with quota calculations (since we want to use placement for quota soon) as well as tracking down which allocations need to be updated.","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        help\u003d\"\"\""},{"line_number":52,"context_line":"Early API microversions (\u003c1.8) allowed creating allocations and not specifying"},{"line_number":53,"context_line":"a project or user identifier for the consumer. In cleaning up the data"},{"line_number":54,"context_line":"modeling, we no longer allow missing project and user information. if an older"},{"line_number":55,"context_line":"client makes an allocation, we\u0027ll use this in place of the information it"},{"line_number":56,"context_line":"doesn\u0027t provide."},{"line_number":57,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_f2cd5cb7","line":54,"range":{"start_line":54,"start_character":67,"end_line":54,"end_character":68},"updated":"2018-06-07 21:58:06.000000000","message":"_","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"doesn\u0027t provide."},{"line_number":57,"context_line":"\"\"\"),"},{"line_number":58,"context_line":"cfg.StrOpt("},{"line_number":59,"context_line":"        \u0027incomplete_consumer_user_id\u0027,"},{"line_number":60,"context_line":"        default\u003dDEFAULT_CONSUMER_MISSING_ID,"},{"line_number":61,"context_line":"        help\u003d\"\"\""},{"line_number":62,"context_line":"Early API microversions (\u003c1.8) allowed creating allocations and not specifying"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_724e2c39","line":59,"range":{"start_line":59,"start_character":9,"end_line":59,"end_character":36},"updated":"2018-06-07 21:58:06.000000000","message":"A \u0027Related Options\u0027 section is probably excessive, but ftr I thought about it.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":63,"context_line":"a project or user identifier for the consumer. In cleaning up the data"},{"line_number":64,"context_line":"modeling, we no longer allow missing project and user information. if an older"},{"line_number":65,"context_line":"client makes an allocation, we\u0027ll use this in place of the information it"},{"line_number":66,"context_line":"doesn\u0027t provide."},{"line_number":67,"context_line":"\"\"\"),"},{"line_number":68,"context_line":"]"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_f2423c0f","line":66,"updated":"2018-06-07 21:58:06.000000000","message":"Note to self: These docstrings are identical; we\u0027re relying on the reader being smart enough to know that the \u0027user_id\u0027 one is for user and the \u0027project_id\u0027 one is for project_id.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        help\u003d\"\"\""},{"line_number":52,"context_line":"Early API microversions (\u003c1.8) allowed creating allocations and not specifying"},{"line_number":53,"context_line":"a project or user identifier for the consumer. In cleaning up the data"},{"line_number":54,"context_line":"modeling, we no longer allow missing project and user information. if an older"},{"line_number":55,"context_line":"client makes an allocation, we\u0027ll use this in place of the information it"},{"line_number":56,"context_line":"doesn\u0027t provide."},{"line_number":57,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_18e32507","line":54,"range":{"start_line":54,"start_character":67,"end_line":54,"end_character":69},"updated":"2018-06-11 13:44:14.000000000","message":"If","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d20358e92f16b1af38499cb22c7c280ff35354b9","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        help\u003d\"\"\""},{"line_number":52,"context_line":"Early API microversions (\u003c1.8) allowed creating allocations and not specifying"},{"line_number":53,"context_line":"a project or user identifier for the consumer. In cleaning up the data"},{"line_number":54,"context_line":"modeling, we no longer allow missing project and user information. if an older"},{"line_number":55,"context_line":"client makes an allocation, we\u0027ll use this in place of the information it"},{"line_number":56,"context_line":"doesn\u0027t provide."},{"line_number":57,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_c83dd62c","line":54,"range":{"start_line":54,"start_character":67,"end_line":54,"end_character":69},"in_reply_to":"5f7c97a3_18e32507","updated":"2018-06-11 16:19:13.000000000","message":"Here and below addressed in:\n\nhttps://review.openstack.org/#/c/574324/","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":55,"context_line":"client makes an allocation, we\u0027ll use this in place of the information it"},{"line_number":56,"context_line":"doesn\u0027t provide."},{"line_number":57,"context_line":"\"\"\"),"},{"line_number":58,"context_line":"cfg.StrOpt("},{"line_number":59,"context_line":"        \u0027incomplete_consumer_user_id\u0027,"},{"line_number":60,"context_line":"        default\u003dDEFAULT_CONSUMER_MISSING_ID,"},{"line_number":61,"context_line":"        help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_38b14102","line":58,"updated":"2018-06-11 13:44:14.000000000","message":"indent","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        help\u003d\"\"\""},{"line_number":62,"context_line":"Early API microversions (\u003c1.8) allowed creating allocations and not specifying"},{"line_number":63,"context_line":"a project or user identifier for the consumer. In cleaning up the data"},{"line_number":64,"context_line":"modeling, we no longer allow missing project and user information. if an older"},{"line_number":65,"context_line":"client makes an allocation, we\u0027ll use this in place of the information it"},{"line_number":66,"context_line":"doesn\u0027t provide."},{"line_number":67,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_78bb39e4","line":64,"range":{"start_line":64,"start_character":67,"end_line":64,"end_character":69},"updated":"2018-06-11 13:44:14.000000000","message":"If","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"}],"nova/tests/functional/api/openstack/placement/db/test_consumer.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"27b403368469836300880fbad240bd0dfed31a1b","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        records along with the incomplete consumer project/user records."},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        self._create_incomplete_allocations(self.ctx)"},{"line_number":129,"context_line":"        consumer_obj.create_incomplete_consumers(self.ctx, 10)"},{"line_number":130,"context_line":"        self._check_incomplete_consumers(self.ctx)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_a116c2f0","line":129,"updated":"2018-05-22 18:57:07.000000000","message":"Since this has to return a tuple of counts maybe you should check that it does that here...","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"faa04fd6e7284a81f7609ba5069021cc1220dd0c","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        records along with the incomplete consumer project/user records."},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        self._create_incomplete_allocations(self.ctx)"},{"line_number":129,"context_line":"        consumer_obj.create_incomplete_consumers(self.ctx, 10)"},{"line_number":130,"context_line":"        self._check_incomplete_consumers(self.ctx)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_9bbe26ac","line":129,"in_reply_to":"5f7c97a3_a116c2f0","updated":"2018-05-31 04:14:44.000000000","message":"Done","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"27b403368469836300880fbad240bd0dfed31a1b","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        self._create_incomplete_allocations(self.ctx)"},{"line_number":129,"context_line":"        consumer_obj.create_incomplete_consumers(self.ctx, 10)"},{"line_number":130,"context_line":"        self._check_incomplete_consumers(self.ctx)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_01dd3641","line":130,"updated":"2018-05-22 18:57:07.000000000","message":"After this, run it again to make sure it doesn\u0027t choke and returns 0,0?","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"2cb177b0b4bebf7cd4e0f1de90be5da3ff32a776","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        self._create_incomplete_allocations(self.ctx)"},{"line_number":129,"context_line":"        consumer_obj.create_incomplete_consumers(self.ctx, 10)"},{"line_number":130,"context_line":"        self._check_incomplete_consumers(self.ctx)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_7c049a18","line":130,"in_reply_to":"5f7c97a3_01dd3641","updated":"2018-05-28 07:55:00.000000000","message":"+1","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"faa04fd6e7284a81f7609ba5069021cc1220dd0c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        self._create_incomplete_allocations(self.ctx)"},{"line_number":129,"context_line":"        consumer_obj.create_incomplete_consumers(self.ctx, 10)"},{"line_number":130,"context_line":"        self._check_incomplete_consumers(self.ctx)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_5be2ced6","line":130,"in_reply_to":"5f7c97a3_01dd3641","updated":"2018-05-31 04:14:44.000000000","message":"Done","commit_id":"f37d478353d242f891355fbe17a1ee31ade8e74a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @db_api.api_context_manager.reader"},{"line_number":84,"context_line":"    def _check_incomplete_consumers(self, ctx):"},{"line_number":85,"context_line":"        incomplete_external_id \u003d CONF.placement.incomplete_consumer_project_id"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # Verify we have a record in projects for the missing sentinel"},{"line_number":88,"context_line":"        sel \u003d PROJECT_TBL.select("}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_529d3064","line":85,"range":{"start_line":85,"start_character":33,"end_line":85,"end_character":78},"updated":"2018-06-07 21:58:06.000000000","message":"Somewhere there should be a test that sets these conf vars.  You know, to make sure you didn\u0027t misspell them in the code.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"584c33ecdc89cbfa688619876c06ad0ffaa10641","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @db_api.api_context_manager.reader"},{"line_number":84,"context_line":"    def _check_incomplete_consumers(self, ctx):"},{"line_number":85,"context_line":"        incomplete_external_id \u003d CONF.placement.incomplete_consumer_project_id"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # Verify we have a record in projects for the missing sentinel"},{"line_number":88,"context_line":"        sel \u003d PROJECT_TBL.select("}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_a884430c","line":85,"range":{"start_line":85,"start_character":33,"end_line":85,"end_character":78},"in_reply_to":"5f7c97a3_05c5225c","updated":"2018-06-08 14:36:21.000000000","message":"I didn\u0027t see any tests that do\n\n self.flags(incomplete_consumer_project_id\u003duuids.not_the_default, group\u003dplacement)\n\nand then assert that incomplete records get uuids.not_the_default instead of DEFAULT_CONSUMER_MISSING_ID.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e5b98ea377216a8b2b4eeb09c5338ae840553459","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @db_api.api_context_manager.reader"},{"line_number":84,"context_line":"    def _check_incomplete_consumers(self, ctx):"},{"line_number":85,"context_line":"        incomplete_external_id \u003d CONF.placement.incomplete_consumer_project_id"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # Verify we have a record in projects for the missing sentinel"},{"line_number":88,"context_line":"        sel \u003d PROJECT_TBL.select("}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_05c5225c","line":85,"range":{"start_line":85,"start_character":33,"end_line":85,"end_character":78},"in_reply_to":"5f7c97a3_529d3064","updated":"2018-06-08 14:00:29.000000000","message":"Not quite sure what you mean... could you elaborate?","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d20358e92f16b1af38499cb22c7c280ff35354b9","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        sel \u003d PROJECT_TBL.select("},{"line_number":89,"context_line":"            PROJECT_TBL.c.external_id \u003d\u003d incomplete_external_id)"},{"line_number":90,"context_line":"        rec \u003d ctx.session.execute(sel).first()"},{"line_number":91,"context_line":"        self.assertEqual(incomplete_external_id, rec[\u0027external_id\u0027])"},{"line_number":92,"context_line":"        incomplete_proj_id \u003d rec[\u0027id\u0027]"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        # Verify we have a record in users for the missing sentinel"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_c8a15697","line":91,"range":{"start_line":91,"start_character":49,"end_line":91,"end_character":52},"updated":"2018-06-11 16:19:13.000000000","message":"Would this be a NoneType error if first() didn\u0027t find a match for the query?","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        sel \u003d user_obj.USER_TBL.select("},{"line_number":96,"context_line":"            USER_TBL.c.external_id \u003d\u003d incomplete_external_id)"},{"line_number":97,"context_line":"        rec \u003d ctx.session.execute(sel).first()"},{"line_number":98,"context_line":"        self.assertEqual(incomplete_external_id, rec[\u0027external_id\u0027])"},{"line_number":99,"context_line":"        incomplete_user_id \u003d rec[\u0027id\u0027]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        # Verify there are records in the consumers table for our old"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_58e75de4","line":98,"range":{"start_line":98,"start_character":25,"end_line":98,"end_character":47},"updated":"2018-06-11 13:44:14.000000000","message":"nit: I know that by default the incomplete project and user values are the same, but this should technically be CONF.placement.incomplete_consumer_user_id.","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d20358e92f16b1af38499cb22c7c280ff35354b9","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        sel \u003d user_obj.USER_TBL.select("},{"line_number":96,"context_line":"            USER_TBL.c.external_id \u003d\u003d incomplete_external_id)"},{"line_number":97,"context_line":"        rec \u003d ctx.session.execute(sel).first()"},{"line_number":98,"context_line":"        self.assertEqual(incomplete_external_id, rec[\u0027external_id\u0027])"},{"line_number":99,"context_line":"        incomplete_user_id \u003d rec[\u0027id\u0027]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        # Verify there are records in the consumers table for our old"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_88435eb0","line":98,"range":{"start_line":98,"start_character":25,"end_line":98,"end_character":47},"in_reply_to":"5f7c97a3_58e75de4","updated":"2018-06-11 16:19:13.000000000","message":"Addressed in https://review.openstack.org/#/c/574324/","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        records along with the incomplete consumer project/user records."},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        self._create_incomplete_allocations(self.ctx)"},{"line_number":129,"context_line":"        res \u003d consumer_obj.create_incomplete_consumers(self.ctx, 10)"},{"line_number":130,"context_line":"        self.assertEqual((2, 2), res)"},{"line_number":131,"context_line":"        self._check_incomplete_consumers(self.ctx)"},{"line_number":132,"context_line":"        res \u003d consumer_obj.create_incomplete_consumers(self.ctx, 10)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_187a4523","line":129,"range":{"start_line":129,"start_character":65,"end_line":129,"end_character":67},"updated":"2018-06-11 13:44:14.000000000","message":"If this were one, we should get back (2, 1) per my other comments. The user controls the batch_size and the total returned is supposed to be an indication of what\u0027s left.","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"}],"nova/tests/functional/api/openstack/placement/gabbits/ensure-consumer.yaml":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Tests of the ensure consumer behaviour for versions of the API from \u003c1.7 to"},{"line_number":2,"context_line":"# 1.8-1.26 and finally 1.27+"},{"line_number":3,"context_line":"fixtures:"},{"line_number":4,"context_line":"    - AllocationFixture"},{"line_number":5,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"5f7c97a3_72c38c58","line":2,"range":{"start_line":2,"start_character":9,"end_line":2,"end_character":28},"updated":"2018-06-07 21:58:06.000000000","message":"bump these, cause you lost the race.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e5b98ea377216a8b2b4eeb09c5338ae840553459","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Tests of the ensure consumer behaviour for versions of the API from \u003c1.7 to"},{"line_number":2,"context_line":"# 1.8-1.26 and finally 1.27+"},{"line_number":3,"context_line":"fixtures:"},{"line_number":4,"context_line":"    - AllocationFixture"},{"line_number":5,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"5f7c97a3_a5ab0e86","line":2,"range":{"start_line":2,"start_character":9,"end_line":2,"end_character":28},"in_reply_to":"5f7c97a3_72c38c58","updated":"2018-06-08 14:00:29.000000000","message":"well, fizzleshits...","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"14601edddd6244a2a96b6126ea61beb02d9f911a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"      openstack-api-version: placement 1.12"},{"line_number":39,"context_line":"  response_json_paths:"},{"line_number":40,"context_line":"      $.project_id: *default_incomplete_id"},{"line_number":41,"context_line":"      $.user_id: *default_incomplete_id"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"5f7c97a3_f2855c08","line":41,"updated":"2018-06-07 21:58:06.000000000","message":"Do a GET with 1.7 to prove that the proj/user ID fields are still absent from the response payload.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e5b98ea377216a8b2b4eeb09c5338ae840553459","unresolved":false,"context_lines":[{"line_number":38,"context_line":"      openstack-api-version: placement 1.12"},{"line_number":39,"context_line":"  response_json_paths:"},{"line_number":40,"context_line":"      $.project_id: *default_incomplete_id"},{"line_number":41,"context_line":"      $.user_id: *default_incomplete_id"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"5f7c97a3_25705e40","line":41,"in_reply_to":"5f7c97a3_f2855c08","updated":"2018-06-08 14:00:29.000000000","message":"ack, can do.","commit_id":"19c1dafe7f3caae4b41657cf967771bb46774f78"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64e0e58c0bec830d2713e7876a5122da5ef599af","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Tests of the ensure consumer behaviour for versions of the API from \u003c1.7 to"},{"line_number":2,"context_line":"# 1.8-1.26 and finally 1.27+"},{"line_number":3,"context_line":"fixtures:"},{"line_number":4,"context_line":"    - AllocationFixture"},{"line_number":5,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_f83d092c","line":2,"range":{"start_line":1,"start_character":74,"end_line":2,"end_character":28},"updated":"2018-06-11 13:44:14.000000000","message":"nit: this seems stale.","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d20358e92f16b1af38499cb22c7c280ff35354b9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Tests of the ensure consumer behaviour for versions of the API from \u003c1.7 to"},{"line_number":2,"context_line":"# 1.8-1.26 and finally 1.27+"},{"line_number":3,"context_line":"fixtures:"},{"line_number":4,"context_line":"    - AllocationFixture"},{"line_number":5,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":11,"id":"5f7c97a3_a8409aa3","line":2,"range":{"start_line":1,"start_character":74,"end_line":2,"end_character":28},"in_reply_to":"5f7c97a3_f83d092c","updated":"2018-06-11 16:19:13.000000000","message":"Updated in https://review.openstack.org/#/c/574324/","commit_id":"7d6d4d01b9c14ff4a0d39815661b26280581b47d"}],"nova/tests/unit/api/openstack/placement/test_util.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"e93ae2e95c98220044fe60455f0bb7cbcf241643","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from nova.api.openstack.placement import exception"},{"line_number":29,"context_line":"from nova.api.openstack.placement import lib as pl"},{"line_number":30,"context_line":"from nova.api.openstack.placement import microversion"},{"line_number":31,"context_line":"from nova.api.openstack.placement.objects import consumer as consumer_obj"},{"line_number":32,"context_line":"from nova.api.openstack.placement.objects import project as project_obj"},{"line_number":33,"context_line":"from nova.api.openstack.placement.objects import resource_provider as rp_obj"},{"line_number":34,"context_line":"from nova.api.openstack.placement.objects import user as user_obj"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_3eb81f0f","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":73},"updated":"2018-05-31 06:50:26.000000000","message":"pep8 says this isn\u0027t needed. Other than that this looks good to me.","commit_id":"cbf674e57ed430c00c65303706efe8f3ec502237"}]}
