)]}'
{"ironic/db/sqlalchemy/alembic/versions/dd67b91a1981_add_allocations_table.py":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        sa.Column(\u0027resource_class\u0027, sa.String(length\u003d80), nullable\u003dTrue),"},{"line_number":43,"context_line":"        sa.Column(\u0027traits\u0027, types.JsonEncodedList(), nullable\u003dTrue),"},{"line_number":44,"context_line":"        sa.Column(\u0027candidate_nodes\u0027, types.JsonEncodedList(), nullable\u003dTrue),"},{"line_number":45,"context_line":"        sa.Column(\u0027extra\u0027, types.JsonEncodedDict(), nullable\u003dTrue),"},{"line_number":46,"context_line":"        sa.Column(\u0027conductor_affinity\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint([\u0027conductor_affinity\u0027], [\u0027conductors.id\u0027], ),"},{"line_number":48,"context_line":"        sa.ForeignKeyConstraint([\u0027node_id\u0027], [\u0027nodes.id\u0027], ),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_f884c9b3","line":45,"range":{"start_line":45,"start_character":19,"end_line":45,"end_character":24},"updated":"2019-01-03 07:05:21.000000000","message":"it seems there is no description of this field in the spec, do we support updating it from api?","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"618129ff9cc30ee5039a6058fa4e8737a10b8a76","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        sa.Column(\u0027resource_class\u0027, sa.String(length\u003d80), nullable\u003dTrue),"},{"line_number":43,"context_line":"        sa.Column(\u0027traits\u0027, types.JsonEncodedList(), nullable\u003dTrue),"},{"line_number":44,"context_line":"        sa.Column(\u0027candidate_nodes\u0027, types.JsonEncodedList(), nullable\u003dTrue),"},{"line_number":45,"context_line":"        sa.Column(\u0027extra\u0027, types.JsonEncodedDict(), nullable\u003dTrue),"},{"line_number":46,"context_line":"        sa.Column(\u0027conductor_affinity\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint([\u0027conductor_affinity\u0027], [\u0027conductors.id\u0027], ),"},{"line_number":48,"context_line":"        sa.ForeignKeyConstraint([\u0027node_id\u0027], [\u0027nodes.id\u0027], ),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_b57dd4e8","line":45,"range":{"start_line":45,"start_character":19,"end_line":45,"end_character":24},"in_reply_to":"ffd0ebdf_327d856e","updated":"2019-01-04 00:54:11.000000000","message":"works for me, raise just because there is no cli support in the spec","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"13c9c96a4fc5aa4b5cd1fe342094fa75d12875a3","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        sa.Column(\u0027resource_class\u0027, sa.String(length\u003d80), nullable\u003dTrue),"},{"line_number":43,"context_line":"        sa.Column(\u0027traits\u0027, types.JsonEncodedList(), nullable\u003dTrue),"},{"line_number":44,"context_line":"        sa.Column(\u0027candidate_nodes\u0027, types.JsonEncodedList(), nullable\u003dTrue),"},{"line_number":45,"context_line":"        sa.Column(\u0027extra\u0027, types.JsonEncodedDict(), nullable\u003dTrue),"},{"line_number":46,"context_line":"        sa.Column(\u0027conductor_affinity\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint([\u0027conductor_affinity\u0027], [\u0027conductors.id\u0027], ),"},{"line_number":48,"context_line":"        sa.ForeignKeyConstraint([\u0027node_id\u0027], [\u0027nodes.id\u0027], ),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_327d856e","line":45,"range":{"start_line":45,"start_character":19,"end_line":45,"end_character":24},"in_reply_to":"ffd0ebdf_6f756698","updated":"2019-01-03 14:16:13.000000000","message":"I think it is fine to leave. People do actually use the extra fields for their own stuff all over our API. :\\","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"082683298844fc7768de3cedf8093edd69c11122","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        sa.Column(\u0027resource_class\u0027, sa.String(length\u003d80), nullable\u003dTrue),"},{"line_number":43,"context_line":"        sa.Column(\u0027traits\u0027, types.JsonEncodedList(), nullable\u003dTrue),"},{"line_number":44,"context_line":"        sa.Column(\u0027candidate_nodes\u0027, types.JsonEncodedList(), nullable\u003dTrue),"},{"line_number":45,"context_line":"        sa.Column(\u0027extra\u0027, types.JsonEncodedDict(), nullable\u003dTrue),"},{"line_number":46,"context_line":"        sa.Column(\u0027conductor_affinity\u0027, sa.Integer(), nullable\u003dTrue),"},{"line_number":47,"context_line":"        sa.ForeignKeyConstraint([\u0027conductor_affinity\u0027], [\u0027conductors.id\u0027], ),"},{"line_number":48,"context_line":"        sa.ForeignKeyConstraint([\u0027node_id\u0027], [\u0027nodes.id\u0027], ),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_6f756698","line":45,"range":{"start_line":45,"start_character":19,"end_line":45,"end_character":24},"in_reply_to":"ffd0ebdf_f884c9b3","updated":"2019-01-03 13:11:53.000000000","message":"All our objects have \"extra\" field, thus I forgot to mention it in the spec. It can be updated.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    )"},{"line_number":53,"context_line":"    op.add_column(\u0027nodes\u0027, sa.Column(\u0027allocation_id\u0027, sa.Integer(),"},{"line_number":54,"context_line":"                                     nullable\u003dTrue))"},{"line_number":55,"context_line":"    op.create_foreign_key(None, \u0027nodes\u0027, \u0027allocations\u0027,"},{"line_number":56,"context_line":"                          [\u0027allocation_id\u0027], [\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_fb3cc3c0","line":55,"range":{"start_line":55,"start_character":26,"end_line":55,"end_character":30},"updated":"2019-01-03 07:05:21.000000000","message":"the alembic docs said: name is required so that an ALTER statement can be emitted. I see some scripts used None but there is a alter_column before.\nAnd it seems it could be set to None if there is a constraint naming conventions set.\nI am not sure if this is right, just thinking loudly.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"13c9c96a4fc5aa4b5cd1fe342094fa75d12875a3","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    )"},{"line_number":53,"context_line":"    op.add_column(\u0027nodes\u0027, sa.Column(\u0027allocation_id\u0027, sa.Integer(),"},{"line_number":54,"context_line":"                                     nullable\u003dTrue))"},{"line_number":55,"context_line":"    op.create_foreign_key(None, \u0027nodes\u0027, \u0027allocations\u0027,"},{"line_number":56,"context_line":"                          [\u0027allocation_id\u0027], [\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_923b119b","line":55,"range":{"start_line":55,"start_character":26,"end_line":55,"end_character":30},"in_reply_to":"ffd0ebdf_6f9a46c6","updated":"2019-01-03 14:16:13.000000000","message":"I suspect it might just be telling the DB to build a foreign key index for the primary key fields for just index references to be faster.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"082683298844fc7768de3cedf8093edd69c11122","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    )"},{"line_number":53,"context_line":"    op.add_column(\u0027nodes\u0027, sa.Column(\u0027allocation_id\u0027, sa.Integer(),"},{"line_number":54,"context_line":"                                     nullable\u003dTrue))"},{"line_number":55,"context_line":"    op.create_foreign_key(None, \u0027nodes\u0027, \u0027allocations\u0027,"},{"line_number":56,"context_line":"                          [\u0027allocation_id\u0027], [\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_6f9a46c6","line":55,"range":{"start_line":55,"start_character":26,"end_line":55,"end_character":30},"in_reply_to":"ffd0ebdf_fb3cc3c0","updated":"2019-01-03 13:11:53.000000000","message":"The thing is, this file is autogenerated, so I\u0027m not entirely sure how it works :) I guess if we have None in other places, we can use it here.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"}],"ironic/db/sqlalchemy/api.py":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            pass"},{"line_number":291,"context_line":"        else:"},{"line_number":292,"context_line":"            node_obj \u003d self.get_node_by_uuid(node_uuid)"},{"line_number":293,"context_line":"            filters[\u0027node_id\u0027] \u003d node_obj.id"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        if filters:"},{"line_number":296,"context_line":"            query \u003d query.filter_by(**filters)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_a6905e97","line":293,"updated":"2019-01-03 07:05:21.000000000","message":"i wonder why not using a join query here, some performance consideration?","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"082683298844fc7768de3cedf8093edd69c11122","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            pass"},{"line_number":291,"context_line":"        else:"},{"line_number":292,"context_line":"            node_obj \u003d self.get_node_by_uuid(node_uuid)"},{"line_number":293,"context_line":"            filters[\u0027node_id\u0027] \u003d node_obj.id"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        if filters:"},{"line_number":296,"context_line":"            query \u003d query.filter_by(**filters)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_6f832658","line":293,"in_reply_to":"ffd0ebdf_a6905e97","updated":"2019-01-03 13:11:53.000000000","message":"We could probably use it. I think I cargo-culted this bit from somewhere. I can try something more efficient in a follow-up.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                        name\u003dvalues[\u0027name\u0027])"},{"line_number":1658,"context_line":"                elif \u0027instance_uuid\u0027 in exc.columns:"},{"line_number":1659,"context_line":"                    # Case when the referenced node is associated with an"},{"line_number":1660,"context_line":"                    # instance already."},{"line_number":1661,"context_line":"                    raise exception.InstanceAssociated("},{"line_number":1662,"context_line":"                        instance_uuid\u003dinstance_uuid, node\u003dnode_uuid)"},{"line_number":1663,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_4612d2b3","line":1660,"updated":"2019-01-03 07:05:21.000000000","message":"not quite following on this case, it seems could only happen if the allocation uuid is set explicitly.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"082683298844fc7768de3cedf8093edd69c11122","unresolved":false,"context_lines":[{"line_number":1657,"context_line":"                        name\u003dvalues[\u0027name\u0027])"},{"line_number":1658,"context_line":"                elif \u0027instance_uuid\u0027 in exc.columns:"},{"line_number":1659,"context_line":"                    # Case when the referenced node is associated with an"},{"line_number":1660,"context_line":"                    # instance already."},{"line_number":1661,"context_line":"                    raise exception.InstanceAssociated("},{"line_number":1662,"context_line":"                        instance_uuid\u003dinstance_uuid, node\u003dnode_uuid)"},{"line_number":1663,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_ef963695","line":1660,"in_reply_to":"ffd0ebdf_4612d2b3","updated":"2019-01-03 13:11:53.000000000","message":"Yeah, it\u0027s where an allocation UUID is set to something that is already used as instance_uuid on another node. A rare case, but has to be covered for completeness.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":1685,"context_line":"            node_query \u003d model_query(models.Node, session\u003dsession).filter_by("},{"line_number":1686,"context_line":"                allocation_id\u003dallocation_id)"},{"line_number":1687,"context_line":"            node_query.update({\u0027allocation_id\u0027: None, \u0027instance_uuid\u0027: None})"},{"line_number":1688,"context_line":""},{"line_number":1689,"context_line":"            query.delete()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_2640ee07","line":1688,"updated":"2019-01-03 07:05:21.000000000","message":"should we care about the change in the instance_info during allocation? if a node is allocated with traits and deallocated, the traits will be left there.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"082683298844fc7768de3cedf8093edd69c11122","unresolved":false,"context_lines":[{"line_number":1685,"context_line":"            node_query \u003d model_query(models.Node, session\u003dsession).filter_by("},{"line_number":1686,"context_line":"                allocation_id\u003dallocation_id)"},{"line_number":1687,"context_line":"            node_query.update({\u0027allocation_id\u0027: None, \u0027instance_uuid\u0027: None})"},{"line_number":1688,"context_line":""},{"line_number":1689,"context_line":"            query.delete()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_8fed2a27","line":1688,"in_reply_to":"ffd0ebdf_2640ee07","updated":"2019-01-03 13:11:53.000000000","message":"This is a good question, and I don\u0027t have an immediate answer for it. My good feeling was to keep the current behavior with unsetting instance_uuid (that does not cause instance_info to be purged).","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"}],"ironic/objects/allocation.py":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    # @object_base.remotable_classmethod"},{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def get(cls, context, allocation_ident):"},{"line_number":67,"context_line":"        \"\"\"Find a allocation based on its id, uuid, name or address."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        :param allocation_ident: The id, uuid, name or address of a allocation."},{"line_number":70,"context_line":"        :param context: Security context"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_c669e28b","line":67,"range":{"start_line":67,"start_character":60,"end_line":67,"end_character":67},"updated":"2019-01-03 07:05:21.000000000","message":"nit: there is no address here :)","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"082683298844fc7768de3cedf8093edd69c11122","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    # @object_base.remotable_classmethod"},{"line_number":65,"context_line":"    @classmethod"},{"line_number":66,"context_line":"    def get(cls, context, allocation_ident):"},{"line_number":67,"context_line":"        \"\"\"Find a allocation based on its id, uuid, name or address."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        :param allocation_ident: The id, uuid, name or address of a allocation."},{"line_number":70,"context_line":"        :param context: Security context"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_4ff742f7","line":67,"range":{"start_line":67,"start_character":60,"end_line":67,"end_character":67},"in_reply_to":"ffd0ebdf_c669e28b","updated":"2019-01-03 13:11:53.000000000","message":"right :)","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def get(cls, context, allocation_ident):"},{"line_number":67,"context_line":"        \"\"\"Find a allocation based on its id, uuid, name or address."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        :param allocation_ident: The id, uuid, name or address of a allocation."},{"line_number":70,"context_line":"        :param context: Security context"},{"line_number":71,"context_line":"        :returns: A :class:`Allocation` object."},{"line_number":72,"context_line":"        :raises: InvalidIdentity"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_6604b6c7","line":69,"range":{"start_line":69,"start_character":55,"end_line":69,"end_character":62},"updated":"2019-01-03 07:05:21.000000000","message":"ditto","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def get(cls, context, allocation_ident):"},{"line_number":67,"context_line":"        \"\"\"Find a allocation based on its id, uuid, name or address."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        :param allocation_ident: The id, uuid, name or address of a allocation."},{"line_number":70,"context_line":"        :param context: Security context"},{"line_number":71,"context_line":"        :returns: A :class:`Allocation` object."},{"line_number":72,"context_line":"        :raises: InvalidIdentity"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_06f5aacb","line":69,"range":{"start_line":69,"start_character":66,"end_line":69,"end_character":67},"updated":"2019-01-03 07:05:21.000000000","message":"nit: an\n\nditto below","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    SCHEMA \u003d {"},{"line_number":272,"context_line":"        \u0027candidate_nodes\u0027: (\u0027allocation\u0027, \u0027candidate_nodes\u0027),"},{"line_number":273,"context_line":"        \u0027created_at\u0027: (\u0027allocation\u0027, \u0027created_at\u0027),"},{"line_number":274,"context_line":"        \u0027extra\u0027: (\u0027allocation\u0027, \u0027extra\u0027),"},{"line_number":275,"context_line":"        \u0027last_error\u0027: (\u0027allocation\u0027, \u0027last_error\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_061e0a0c","line":272,"range":{"start_line":272,"start_character":9,"end_line":272,"end_character":24},"updated":"2019-01-03 07:05:21.000000000","message":"this feels like a cached field to me, probably there is no need to expose.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"082683298844fc7768de3cedf8093edd69c11122","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    SCHEMA \u003d {"},{"line_number":272,"context_line":"        \u0027candidate_nodes\u0027: (\u0027allocation\u0027, \u0027candidate_nodes\u0027),"},{"line_number":273,"context_line":"        \u0027created_at\u0027: (\u0027allocation\u0027, \u0027created_at\u0027),"},{"line_number":274,"context_line":"        \u0027extra\u0027: (\u0027allocation\u0027, \u0027extra\u0027),"},{"line_number":275,"context_line":"        \u0027last_error\u0027: (\u0027allocation\u0027, \u0027last_error\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_0fd93a82","line":272,"range":{"start_line":272,"start_character":9,"end_line":272,"end_character":24},"in_reply_to":"ffd0ebdf_061e0a0c","updated":"2019-01-03 13:11:53.000000000","message":"Well, if something is listening to allocation creation events, why won\u0027t it know about candidate_nodes?","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"}],"ironic/tests/unit/db/test_allocations.py":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3d9285efca9937094a323edc64de2415df6ad9d6","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        self.assertRaises(exception.InstanceAssociated,"},{"line_number":208,"context_line":"                          self.dbapi.update_allocation, self.allocation.id,"},{"line_number":209,"context_line":"                          {\u0027node_id\u0027: self.node.id, \u0027traits\u0027: [\u0027foo\u0027]})"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        # Make sure we do not see partial updates"},{"line_number":212,"context_line":"        allocation \u003d self.dbapi.get_allocation_by_id(self.allocation.id)"},{"line_number":213,"context_line":"        self.assertEqual([], allocation.traits)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_e6542657","line":210,"updated":"2019-01-03 07:05:21.000000000","message":"Hmmm, so if I understand it right, this is used to prevent conductors from operating the same allocation object right?","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"082683298844fc7768de3cedf8093edd69c11122","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        self.assertRaises(exception.InstanceAssociated,"},{"line_number":208,"context_line":"                          self.dbapi.update_allocation, self.allocation.id,"},{"line_number":209,"context_line":"                          {\u0027node_id\u0027: self.node.id, \u0027traits\u0027: [\u0027foo\u0027]})"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        # Make sure we do not see partial updates"},{"line_number":212,"context_line":"        allocation \u003d self.dbapi.get_allocation_by_id(self.allocation.id)"},{"line_number":213,"context_line":"        self.assertEqual([], allocation.traits)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffd0ebdf_8fd68a4f","line":210,"in_reply_to":"ffd0ebdf_e6542657","updated":"2019-01-03 13:11:53.000000000","message":"I think this code path is not reachable via API, but I had to include it for completeness of the DB API. It may be only my thing, but I prefer all layers to be complete and consistent.","commit_id":"36b047ff5e1b0c1cf64d4b58bf8a9ce3bcc87e85"}]}
