)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7f59e2c007d9768a6f39c67f5ddaf0554cbf4ad3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Haim Daniel \u003chdaniel@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-04 12:12:02 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix: rbac-list return wrong object_type"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This will happen when a new rbac table shall be introduced. The cause"},{"line_number":10,"context_line":"is the usage of the CommonDbMixin._union_model_query(). The flow joins"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_069a586e","line":7,"updated":"2016-02-07 02:08:04.000000000","message":"please see https://wiki.openstack.org/wiki/GitCommitMessages\n\nYou do not need \"fix:\"\n\nIf you do want a prefix then RBAC would be coold","commit_id":"112fb137e01fb71b0fbec9634d3192b78d6094e9"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"6ef9de647c6c008d624a2a1b5a01c16689207364","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Haim Daniel \u003chdaniel@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-04 12:12:02 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix: rbac-list return wrong object_type"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This will happen when a new rbac table shall be introduced. The cause"},{"line_number":10,"context_line":"is the usage of the CommonDbMixin._union_model_query(). The flow joins"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_cc0bffd4","line":7,"in_reply_to":"5a5ae5dd_069a586e","updated":"2016-02-07 07:37:03.000000000","message":"Done","commit_id":"112fb137e01fb71b0fbec9634d3192b78d6094e9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7f59e2c007d9768a6f39c67f5ddaf0554cbf4ad3","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"will result in REST response:"},{"line_number":22,"context_line":"{\"target_tenant\": ID2, \"object_type\": \"qos_policy\", \"object_id\": ID3}"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ic02838bdd48d34d962fcac47318afafe14b6e750"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_a68b441e","line":23,"updated":"2016-02-07 02:08:04.000000000","message":"Do we have a bug for this?","commit_id":"112fb137e01fb71b0fbec9634d3192b78d6094e9"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"6ef9de647c6c008d624a2a1b5a01c16689207364","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"will result in REST response:"},{"line_number":22,"context_line":"{\"target_tenant\": ID2, \"object_type\": \"qos_policy\", \"object_id\": ID3}"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ic02838bdd48d34d962fcac47318afafe14b6e750"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_8cf507ee","line":23,"in_reply_to":"5a5ae5dd_a68b441e","updated":"2016-02-07 07:37:03.000000000","message":"Negative, since this bug will only be revealed when a new rbac type will be added (hint: qos-policy) - hence it actually doesn\u0027t affect anyone at this moment. I hit it as a part of my rbac-qos patch and linked the bugfix with the feature patch. Correct me here, should we have a bug for this ?","commit_id":"112fb137e01fb71b0fbec9634d3192b78d6094e9"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"09dd338d6679c63ec884f24083c42a8954c8292d","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"will result in REST response:"},{"line_number":22,"context_line":"{\"target_tenant\": ID2, \"object_type\": \"qos_policy\", \"object_id\": ID3}"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ic02838bdd48d34d962fcac47318afafe14b6e750"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a5ae5dd_0c44b7b4","line":23,"updated":"2016-02-07 08:19:07.000000000","message":"Please report this issue as a bug and put details there. You can then link to the bug report here.\n\nPlease make commit message to reflect the scope of the changes you apply while bug report will contain the problem details.","commit_id":"dc56b16388e690f13902b2944e36db4384a6d388"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"8cda15e4796679d7ad0912e692cac134d436dbb8","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"will result in REST response:"},{"line_number":22,"context_line":"{\"target_tenant\": ID2, \"object_type\": \"qos_policy\", \"object_id\": ID3}"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ic02838bdd48d34d962fcac47318afafe14b6e750"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a5ae5dd_f78fa872","line":23,"in_reply_to":"5a5ae5dd_0c44b7b4","updated":"2016-02-07 09:12:05.000000000","message":"Done","commit_id":"dc56b16388e690f13902b2944e36db4384a6d388"}],"neutron/db/common_db_mixin.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"416cd2521546781008dfa7a9b01b8c2f03caf543","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def _model_query(self, context, model):"},{"line_number":141,"context_line":"        if isinstance(model, UnionModel):"},{"line_number":142,"context_line":"            return self._union_model_query(context, model)"},{"line_number":143,"context_line":"        else:"},{"line_number":144,"context_line":"            return self._single_model_query(context, model)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_253ad8e7","line":142,"range":{"start_line":142,"start_character":24,"end_line":142,"end_character":42},"updated":"2016-02-08 10:05:01.000000000","message":"Since only the RBAC behaviour was fixed and not this code here, future users of the UnionModel will also encounter this bug. This is less optimal since it fixes symptoms to the problem and not the problem itself... :(\n\nI think the solution should be in a bigger scope: _get_collection_query should be made aware of whether or not the underlying model is a UnionModel or not. This hints that UnionModel should also proxy calls to \u0027filter()\u0027, \u0027all()\u0027, \u0027first()\u0027, etc, which I\u0027m not sure is a good idea at all.\n\nIf UnionModel is only used in RBAC, do we even need it?","commit_id":"ba33a89a9792e099d4fe45bd43e4eca07ec08e2b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3f5d0608b69d691841d6aa705ebeb66102958eb5","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            query \u003d self._single_model_query(context, component_model)"},{"line_number":150,"context_line":"            if model.column_type_name:"},{"line_number":151,"context_line":"                query.add_columns("},{"line_number":152,"context_line":"                    sql.expression.column(\u0027\"%s\"\u0027 % name, is_literal\u003dTrue)."},{"line_number":153,"context_line":"                    label(model.column_type_name)"},{"line_number":154,"context_line":"                )"},{"line_number":155,"context_line":"            queries.append(query)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_a77b22bd","line":152,"updated":"2016-02-08 13:36:09.000000000","message":"This column is supposed to add the type to the results. Each row coming back should have a column named \u0027object_type\u0027 that specifies the type of the rbac policy. It seems that the fix should be to make sure we are referencing this column when forming the response, right?","commit_id":"ba33a89a9792e099d4fe45bd43e4eca07ec08e2b"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"a54ff4a406798469cc1dce9fa8b2d69e2bfab6aa","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            query \u003d self._single_model_query(context, component_model)"},{"line_number":150,"context_line":"            if model.column_type_name:"},{"line_number":151,"context_line":"                query.add_columns("},{"line_number":152,"context_line":"                    sql.expression.column(\u0027\"%s\"\u0027 % name, is_literal\u003dTrue)."},{"line_number":153,"context_line":"                    label(model.column_type_name)"},{"line_number":154,"context_line":"                )"},{"line_number":155,"context_line":"            queries.append(query)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_ef63b818","line":152,"in_reply_to":"5a5ae5dd_0afd5b6d","updated":"2016-02-11 06:50:49.000000000","message":"So after looking at it again, the issue is in L152.\nSince the column doesn\u0027t actually exist in the db, that line does nothing.","commit_id":"ba33a89a9792e099d4fe45bd43e4eca07ec08e2b"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"7a4fab6aced25b079db82c2521acabc8dfcfdd78","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            query \u003d self._single_model_query(context, component_model)"},{"line_number":150,"context_line":"            if model.column_type_name:"},{"line_number":151,"context_line":"                query.add_columns("},{"line_number":152,"context_line":"                    sql.expression.column(\u0027\"%s\"\u0027 % name, is_literal\u003dTrue)."},{"line_number":153,"context_line":"                    label(model.column_type_name)"},{"line_number":154,"context_line":"                )"},{"line_number":155,"context_line":"            queries.append(query)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_0afd5b6d","line":152,"in_reply_to":"5a5ae5dd_a77b22bd","updated":"2016-02-08 13:46:47.000000000","message":"Precisely - I missed the additional column here. \nSo I guess the fix should be at the _make_rbac_policy_dict logic.\n\nThanks!","commit_id":"ba33a89a9792e099d4fe45bd43e4eca07ec08e2b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"416cd2521546781008dfa7a9b01b8c2f03caf543","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            queries.append(query)"},{"line_number":156,"context_line":"        return queries"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def _union_model_query(self, context, model):"},{"line_number":159,"context_line":"        # A union query is a query that combines multiple sets of data"},{"line_number":160,"context_line":"        # together and represents them as one. So if a UnionModel was"},{"line_number":161,"context_line":"        # passed in, we generate the query for each model with the"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_458594cc","line":158,"range":{"start_line":158,"start_character":8,"end_line":158,"end_character":26},"updated":"2016-02-08 10:05:01.000000000","message":"Please add, to the rather large comment below, a NOTE(hdaniel) which specifies the behaviour you\u0027re trying to fix (that all objects are of type type(first_query)).","commit_id":"ba33a89a9792e099d4fe45bd43e4eca07ec08e2b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"416cd2521546781008dfa7a9b01b8c2f03caf543","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        # appropriate filters and then combine them together with the"},{"line_number":163,"context_line":"        # .union operator. This allows any subsequent users of the query"},{"line_number":164,"context_line":"        # to handle it like a normal query (e.g. add pagination/sorting/etc)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        queries \u003d self._get_model_map_queries(context, model)"},{"line_number":167,"context_line":"        first_query \u003d queries.pop(0)"},{"line_number":168,"context_line":"        return first_query.union(*queries)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_25e658e8","line":165,"updated":"2016-02-08 10:05:01.000000000","message":"(super) nit: extra whitespace line here should be removed.","commit_id":"ba33a89a9792e099d4fe45bd43e4eca07ec08e2b"}],"neutron/db/rbac_db_mixin.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7f59e2c007d9768a6f39c67f5ddaf0554cbf4ad3","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                                                         limit)"},{"line_number":113,"context_line":"            items \u003d [self._make_rbac_policy_dict(c, fields) for c in res_query]"},{"line_number":114,"context_line":"            ret.extend(items)"},{"line_number":115,"context_line":"        if limit and page_reverse:"},{"line_number":116,"context_line":"            ret.reverse()"},{"line_number":117,"context_line":"        return ret"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_e675bc31","line":115,"updated":"2016-02-07 02:08:04.000000000","message":"what if page_revers is set and limit not?","commit_id":"112fb137e01fb71b0fbec9634d3192b78d6094e9"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"6ef9de647c6c008d624a2a1b5a01c16689207364","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                                                         limit)"},{"line_number":113,"context_line":"            items \u003d [self._make_rbac_policy_dict(c, fields) for c in res_query]"},{"line_number":114,"context_line":"            ret.extend(items)"},{"line_number":115,"context_line":"        if limit and page_reverse:"},{"line_number":116,"context_line":"            ret.reverse()"},{"line_number":117,"context_line":"        return ret"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_0c67d7b7","line":115,"in_reply_to":"5a5ae5dd_e675bc31","updated":"2016-02-07 07:37:03.000000000","message":"That\u0027s the same original logic as common_db_mixin.CommonDbMixin._get_collection_query_paged() did.","commit_id":"112fb137e01fb71b0fbec9634d3192b78d6094e9"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3f5d0608b69d691841d6aa705ebeb66102958eb5","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                                      filters, context)"},{"line_number":110,"context_line":"            res_query \u003d self._get_collection_query_paged(component_model,"},{"line_number":111,"context_line":"                                                         collection, sorts,"},{"line_number":112,"context_line":"                                                         limit)"},{"line_number":113,"context_line":"            items \u003d [self._make_rbac_policy_dict(c, fields) for c in res_query]"},{"line_number":114,"context_line":"            ret.extend(items)"},{"line_number":115,"context_line":"        if limit and page_reverse:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_a799e27a","line":112,"range":{"start_line":112,"start_character":0,"end_line":112,"end_character":57},"updated":"2016-02-08 13:36:09.000000000","message":"this won\u0027t work correctly for limits because you are passing the limit to each component query. So if I ask for limit\u003d5, you will return 5 of each.","commit_id":"ba33a89a9792e099d4fe45bd43e4eca07ec08e2b"}]}
