)]}'
{"nova/objects/aggregate.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9e6c30f27dff5b016eca38157d161fa7e2d753be","unresolved":false,"context_lines":[{"line_number":437,"context_line":"    # Version 1.1: Added key argument to get_by_host()"},{"line_number":438,"context_line":"    #              Aggregate \u003c\u003d version 1.1"},{"line_number":439,"context_line":"    # Version 1.3: Added get_by_metadata_key"},{"line_number":440,"context_line":"    VERSION \u003d \u00271.3\u0027"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    fields \u003d {"},{"line_number":443,"context_line":"        \u0027objects\u0027: fields.ListOfObjectsField(\u0027Aggregate\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff6b8bd7_85b513f1","line":440,"updated":"2018-03-06 11:46:30.000000000","message":"wat? where\u0027s 1.2? Looks like you want to keep 1.2 and add 1.3 as \u0027added get by metadata\u0027?","commit_id":"59f364fccbd20af7fbb9e1ce14e91a801f2f73de"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"071592d7476a40fb43a68f928c719831ebc20611","unresolved":false,"context_lines":[{"line_number":437,"context_line":"    # Version 1.1: Added key argument to get_by_host()"},{"line_number":438,"context_line":"    #              Aggregate \u003c\u003d version 1.1"},{"line_number":439,"context_line":"    # Version 1.3: Added get_by_metadata_key"},{"line_number":440,"context_line":"    VERSION \u003d \u00271.3\u0027"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    fields \u003d {"},{"line_number":443,"context_line":"        \u0027objects\u0027: fields.ListOfObjectsField(\u0027Aggregate\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_b2e96d81","line":440,"in_reply_to":"ff6b8bd7_85b513f1","updated":"2018-03-08 13:53:49.000000000","message":"Yep, I dunno what happened here.","commit_id":"59f364fccbd20af7fbb9e1ce14e91a801f2f73de"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"1af5e784e9315b7236b07ed876ae56235040e85b","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":"@db_api.api_context_manager.reader"},{"line_number":420,"context_line":"def _get_by_metadata_from_db(context, key\u003dNone, value\u003dNone):"},{"line_number":421,"context_line":"    assert(key is not None or value is not None)"},{"line_number":422,"context_line":"    query \u003d context.session.query(api_models.Aggregate)"},{"line_number":423,"context_line":"    query \u003d query.join(\"_metadata\")"},{"line_number":424,"context_line":"    if key is not None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_638b9b6d","line":421,"range":{"start_line":421,"start_character":4,"end_line":421,"end_character":10},"updated":"2018-03-13 16:09:06.000000000","message":"Should this be handled/caught gracefully somewhere if it fails? Or is it expected to be okay if there is an AssertionError from traceback in the middle of execution?","commit_id":"30d41c87259213e6ef8dc488b6a275e0059a3d9d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"77fa09820d979f1fd9fb450bbccd7c3739cf18ee","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":"@db_api.api_context_manager.reader"},{"line_number":420,"context_line":"def _get_by_metadata_from_db(context, key\u003dNone, value\u003dNone):"},{"line_number":421,"context_line":"    assert(key is not None or value is not None)"},{"line_number":422,"context_line":"    query \u003d context.session.query(api_models.Aggregate)"},{"line_number":423,"context_line":"    query \u003d query.join(\"_metadata\")"},{"line_number":424,"context_line":"    if key is not None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_b961e407","line":421,"range":{"start_line":421,"start_character":4,"end_line":421,"end_character":10},"in_reply_to":"df7087c5_638b9b6d","updated":"2018-03-13 17:12:29.000000000","message":"I put this here as a failsafe for \"compile time\". Just so anyone else that comes along and uses this will realize that they need at least one of them, and since I\u0027m now using this in two places to query for different things.\n\nWe could catch it in the callers, but I\u0027m not sure what else we\u0027d do other than raise a similar error. Happy to do more here though if people think it\u0027s important.","commit_id":"30d41c87259213e6ef8dc488b6a275e0059a3d9d"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"65af932e81b75cc752eb60c064f13b5e2d43716c","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":"@db_api.api_context_manager.reader"},{"line_number":420,"context_line":"def _get_by_metadata_from_db(context, key\u003dNone, value\u003dNone):"},{"line_number":421,"context_line":"    assert(key is not None or value is not None)"},{"line_number":422,"context_line":"    query \u003d context.session.query(api_models.Aggregate)"},{"line_number":423,"context_line":"    query \u003d query.join(\"_metadata\")"},{"line_number":424,"context_line":"    if key is not None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_74b6f340","line":421,"range":{"start_line":421,"start_character":4,"end_line":421,"end_character":10},"in_reply_to":"df7087c5_b961e407","updated":"2018-03-13 17:20:07.000000000","message":"Yep, understood, thanks for clarifying. It does not seem that important but just wanted to ask it out anyways.","commit_id":"30d41c87259213e6ef8dc488b6a275e0059a3d9d"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"efdb4a05b08d56c29dd83e8fda00d80b5c7811f3","unresolved":false,"context_lines":[{"line_number":421,"context_line":"    assert(key is not None or value is not None)"},{"line_number":422,"context_line":"    query \u003d context.session.query(api_models.Aggregate)"},{"line_number":423,"context_line":"    query \u003d query.join(\"_metadata\")"},{"line_number":424,"context_line":"    if key is not None:"},{"line_number":425,"context_line":"        query \u003d query.filter(api_models.AggregateMetadata.key \u003d\u003d key)"},{"line_number":426,"context_line":"    if value is not None:"},{"line_number":427,"context_line":"        query \u003d query.filter(api_models.AggregateMetadata.value \u003d\u003d value)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df7087c5_aeec2abb","line":424,"updated":"2018-03-23 15:32:30.000000000","message":"Just thinking about the new conditions you are adding. Is the table have the index that matches the queries?","commit_id":"f589acc0f31c0bcfbeb02dca03db886bc70cdd30"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8d430603f9f6cd87baf5280347cdf63f202d3c0d","unresolved":false,"context_lines":[{"line_number":421,"context_line":"    assert(key is not None or value is not None)"},{"line_number":422,"context_line":"    query \u003d context.session.query(api_models.Aggregate)"},{"line_number":423,"context_line":"    query \u003d query.join(\"_metadata\")"},{"line_number":424,"context_line":"    if key is not None:"},{"line_number":425,"context_line":"        query \u003d query.filter(api_models.AggregateMetadata.key \u003d\u003d key)"},{"line_number":426,"context_line":"    if value is not None:"},{"line_number":427,"context_line":"        query \u003d query.filter(api_models.AggregateMetadata.value \u003d\u003d value)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bf659307_b8ef39af","line":424,"in_reply_to":"df7087c5_aeec2abb","updated":"2018-03-23 16:17:56.000000000","message":"Nope, fair point.","commit_id":"f589acc0f31c0bcfbeb02dca03db886bc70cdd30"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6454300960010044c367be14cbee8f56be75ce5f","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":"@db_api.api_context_manager.reader"},{"line_number":420,"context_line":"def _get_by_metadata_from_db(context, key\u003dNone, value\u003dNone):"},{"line_number":421,"context_line":"    assert(key is not None or value is not None)"},{"line_number":422,"context_line":"    query \u003d context.session.query(api_models.Aggregate)"},{"line_number":423,"context_line":"    query \u003d query.join(\"_metadata\")"},{"line_number":424,"context_line":"    if key is not None:"}],"source_content_type":"text/x-python","patch_set":17,"id":"bf659307_5a8bd86c","line":421,"updated":"2018-03-30 08:14:06.000000000","message":"I saw your explaination on PS7 why the assert for compile time, fine by me. That said, we could just have done an unittest for it which would have enforced that logic without being in the source code itself.","commit_id":"952279436228868bcf25aabc63cc4e62e944004f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dba7f8998d8917e56a3e279afb4c367ec27b6b7f","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":"@db_api.api_context_manager.reader"},{"line_number":420,"context_line":"def _get_by_metadata_from_db(context, key\u003dNone, value\u003dNone):"},{"line_number":421,"context_line":"    assert(key is not None or value is not None)"},{"line_number":422,"context_line":"    query \u003d context.session.query(api_models.Aggregate)"},{"line_number":423,"context_line":"    query \u003d query.join(\"_metadata\")"},{"line_number":424,"context_line":"    if key is not None:"}],"source_content_type":"text/x-python","patch_set":17,"id":"bf659307_50b965c9","line":421,"in_reply_to":"bf659307_5a8bd86c","updated":"2018-03-30 14:18:09.000000000","message":"There is a unit test for it:\n\nhttps://review.openstack.org/#/c/544728/17/nova/tests/functional/db/test_aggregate.py@560\n\nThis is a runtime / usage check.","commit_id":"952279436228868bcf25aabc63cc4e62e944004f"}]}
