)]}'
{"placement/handlers/allocation.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"788640f4f84d6caad23c2f944b1a08ffeb590972","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            result[\u0027consumer_generation\u0027] \u003d consumer.generation"},{"line_number":111,"context_line":"        show_consumer_type \u003d want_version.matches((1, 37))"},{"line_number":112,"context_line":"        if show_consumer_type:"},{"line_number":113,"context_line":"            con_type \u003d consumer_type.ConsumerType.get_by_id("},{"line_number":114,"context_line":"                context, consumer.consumer_type_id)"},{"line_number":115,"context_line":"            result[\u0027consumer_type\u0027] \u003d con_type.name"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_5efd4e38","line":113,"updated":"2019-07-29 12:07:52.000000000","message":"I\u0027d prefer to see this happen in the persistence layer (the stuff in the \u0027objects\u0027 files, rather than here. We generally prefer to minimize calls to that layer from the handlers layer, especially disjoint calls.","commit_id":"bdeb1335dcce2c8a8ef06929b6a3af240081994a"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2f57f6bc6f7d293f04fa97872275ca404f4e5569","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            result[\u0027consumer_generation\u0027] \u003d consumer.generation"},{"line_number":111,"context_line":"        show_consumer_type \u003d want_version.matches((1, 37))"},{"line_number":112,"context_line":"        if show_consumer_type:"},{"line_number":113,"context_line":"            con_type \u003d consumer_type.ConsumerType.get_by_id("},{"line_number":114,"context_line":"                context, consumer.consumer_type_id)"},{"line_number":115,"context_line":"            result[\u0027consumer_type\u0027] \u003d con_type.name"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_c06f18c3","line":113,"in_reply_to":"7faddb67_5efd4e38","updated":"2019-07-29 12:15:35.000000000","message":"hmm you mean I can use the attribute cache and fetch the name for the id similar to what we do for the resource_class cache right ? Like you mentioned in the other comment.","commit_id":"bdeb1335dcce2c8a8ef06929b6a3af240081994a"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a1d299c131b9f211115f2a17ec956d0910cc44f7","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            result[\u0027consumer_generation\u0027] \u003d consumer.generation"},{"line_number":111,"context_line":"        show_consumer_type \u003d want_version.matches((1, 37))"},{"line_number":112,"context_line":"        if show_consumer_type:"},{"line_number":113,"context_line":"            con_type \u003d consumer_type.ConsumerType.get_by_id("},{"line_number":114,"context_line":"                context, consumer.consumer_type_id)"},{"line_number":115,"context_line":"            result[\u0027consumer_type\u0027] \u003d con_type.name"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_c0e638e9","line":113,"in_reply_to":"7faddb67_c06f18c3","updated":"2019-07-29 12:42:25.000000000","message":"You can do that, but that\u0027s not quite what I meant.\n\nWhat I meant was that the object/info being returned to the handlers level from the object level should be in the form that you want it to be here, even if some of fields will not be used at some microversions.\n\nSo where you have the allocations being returned to handlers with a type id, they\u0027d have a type string instead.","commit_id":"bdeb1335dcce2c8a8ef06929b6a3af240081994a"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"d8c63711d0631390535738ff16536d960757965a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            result[\u0027consumer_generation\u0027] \u003d consumer.generation"},{"line_number":111,"context_line":"        show_consumer_type \u003d want_version.matches((1, 37))"},{"line_number":112,"context_line":"        if show_consumer_type:"},{"line_number":113,"context_line":"            con_type \u003d consumer_type.ConsumerType.get_by_id("},{"line_number":114,"context_line":"                context, consumer.consumer_type_id)"},{"line_number":115,"context_line":"            result[\u0027consumer_type\u0027] \u003d con_type.name"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_e959df34","line":113,"in_reply_to":"7faddb67_c0e638e9","updated":"2019-07-29 14:45:11.000000000","message":"ah got it! :)","commit_id":"bdeb1335dcce2c8a8ef06929b6a3af240081994a"}],"placement/objects/consumer_type.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"788640f4f84d6caad23c2f944b1a08ffeb590972","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return target"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @classmethod"},{"line_number":90,"context_line":"    def get_by_id(cls, ctx, id):"},{"line_number":91,"context_line":"        res \u003d _get_consumer_type_by_id(ctx, id)"},{"line_number":92,"context_line":"        return cls._from_db_object(ctx, cls(ctx), res)"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_7ea60a56","line":90,"updated":"2019-07-29 12:07:52.000000000","message":"You _may_ (big may) wish to consider using the AttributeCache introduced in https://review.opendev.org/672298","commit_id":"bdeb1335dcce2c8a8ef06929b6a3af240081994a"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"2f57f6bc6f7d293f04fa97872275ca404f4e5569","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        return target"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @classmethod"},{"line_number":90,"context_line":"    def get_by_id(cls, ctx, id):"},{"line_number":91,"context_line":"        res \u003d _get_consumer_type_by_id(ctx, id)"},{"line_number":92,"context_line":"        return cls._from_db_object(ctx, cls(ctx), res)"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_6030a4e9","line":90,"in_reply_to":"7faddb67_7ea60a56","updated":"2019-07-29 12:15:35.000000000","message":"oh yea, I didn\u0027t know this patch existed. thanks Chris. I\u0027ll do something similar to that then.","commit_id":"bdeb1335dcce2c8a8ef06929b6a3af240081994a"}]}
