)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b96ec023beb6052817732bff12435d23f164d058","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"177d4818_044b430f","updated":"2022-02-21 09:28:10.000000000","message":"recheck timeout","commit_id":"cc8fc73351945dad366663b645fc65680cfc6019"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"fb26494471dbad5d35b0786897746483a891e024","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"8e8a9b43_cd3b9cb5","updated":"2022-04-09 16:09:04.000000000","message":"Took me a while to understand that the changes to test_quota_reserve_create_usages_race didn\u0027t fundamentally change what was being tested.  LGTM.","commit_id":"58f23045962fcbbc033f6d61c34781e2fc3798da"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a1a5582a9eb67c5a0435f30271da19c10ef9d05","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3c6db0d3_da6115a5","updated":"2022-05-02 03:48:06.000000000","message":"Few questions inline","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"0ff4491b3170ed03c2e679b8a0bd5cfbc46c61cf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"4f7f75c9_2d0b932a","updated":"2022-05-09 09:08:05.000000000","message":"Thanks for answering my queries. LGTM.","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"},{"author":{"_account_id":32238,"name":"wdd","email":"wangzihao@yovole.com","username":"wangzihao"},"change_message_id":"221116c123ad5661f75ed1a4cb936ad25cb3b55b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3f0bf567_efb26857","updated":"2022-05-10 01:36:47.000000000","message":"recheck","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"e4831dc2e49d34bf3668c9604e6caff9f765c200","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"077bd1c4_9a6d4752","updated":"2022-05-09 22:25:07.000000000","message":"recheck\n\nbenign failures in cinder-plugin-ceph-tempest","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"5789819e5c36526073e4b7f6e5f6e41beb7df1fd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"41483d63_e2940c57","updated":"2022-05-09 12:17:39.000000000","message":"recheck cinder-plugin-ceph-tempest - 70 failures - saw a lot of these \"tempest.lib.exceptions.IdentityError: Got identity error: Details: Unexpected status code 500\" and a compute API 503 before I stopped looking","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"fb26494471dbad5d35b0786897746483a891e024","unresolved":true,"context_lines":[{"line_number":1571,"context_line":"            elif ("},{"line_number":1572,"context_line":"                max_age"},{"line_number":1573,"context_line":"                and usages[resource].updated_at is not None"},{"line_number":1574,"context_line":"                and ("},{"line_number":1575,"context_line":"                    ("},{"line_number":1576,"context_line":"                        timeutils.utcnow() - usages[resource].updated_at"},{"line_number":1577,"context_line":"                    ).total_seconds()"},{"line_number":1578,"context_line":"                    \u003e\u003d max_age"},{"line_number":1579,"context_line":"                )"},{"line_number":1580,"context_line":"            ):"},{"line_number":1581,"context_line":"                refresh \u003d True"},{"line_number":1582,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"46a46ffc_3daa0fb6","line":1579,"range":{"start_line":1574,"start_character":20,"end_line":1579,"end_character":17},"updated":"2022-04-09 16:09:04.000000000","message":"I\u0027m not crazy about the formatting, but OK.","commit_id":"58f23045962fcbbc033f6d61c34781e2fc3798da"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6cf603a7af90052e2f6541ba158502c08b1acca2","unresolved":false,"context_lines":[{"line_number":1571,"context_line":"            elif ("},{"line_number":1572,"context_line":"                max_age"},{"line_number":1573,"context_line":"                and usages[resource].updated_at is not None"},{"line_number":1574,"context_line":"                and ("},{"line_number":1575,"context_line":"                    ("},{"line_number":1576,"context_line":"                        timeutils.utcnow() - usages[resource].updated_at"},{"line_number":1577,"context_line":"                    ).total_seconds()"},{"line_number":1578,"context_line":"                    \u003e\u003d max_age"},{"line_number":1579,"context_line":"                )"},{"line_number":1580,"context_line":"            ):"},{"line_number":1581,"context_line":"                refresh \u003d True"},{"line_number":1582,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9244098c_c2a61949","line":1579,"range":{"start_line":1574,"start_character":20,"end_line":1579,"end_character":17},"in_reply_to":"46a46ffc_3daa0fb6","updated":"2022-05-09 09:00:00.000000000","message":"Automatic formatting 🤷 I swear, it made this tedious work somewhat more bearable 😅","commit_id":"58f23045962fcbbc033f6d61c34781e2fc3798da"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"fb26494471dbad5d35b0786897746483a891e024","unresolved":true,"context_lines":[{"line_number":1600,"context_line":"                res_until \u003d usages[resource].until_refresh"},{"line_number":1601,"context_line":"                if (res_until is None and until_refresh) or ("},{"line_number":1602,"context_line":"                    (res_until or 0) \u003e (until_refresh or 0)"},{"line_number":1603,"context_line":"                ):"},{"line_number":1604,"context_line":"                    usages[resource].until_refresh \u003d until_refresh or None"},{"line_number":1605,"context_line":""},{"line_number":1606,"context_line":"        # Check for deltas that would go negative"}],"source_content_type":"text/x-python","patch_set":3,"id":"3221ef4e_050801c0","line":1603,"range":{"start_line":1603,"start_character":16,"end_line":1603,"end_character":18},"updated":"2022-04-09 16:09:04.000000000","message":"The formatting is a little misleading here ... usually this final \u0027):\u0027 by itself would match up with the opening \u0027if (\u0027, but that\u0027s not the case here.","commit_id":"58f23045962fcbbc033f6d61c34781e2fc3798da"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6cf603a7af90052e2f6541ba158502c08b1acca2","unresolved":false,"context_lines":[{"line_number":1600,"context_line":"                res_until \u003d usages[resource].until_refresh"},{"line_number":1601,"context_line":"                if (res_until is None and until_refresh) or ("},{"line_number":1602,"context_line":"                    (res_until or 0) \u003e (until_refresh or 0)"},{"line_number":1603,"context_line":"                ):"},{"line_number":1604,"context_line":"                    usages[resource].until_refresh \u003d until_refresh or None"},{"line_number":1605,"context_line":""},{"line_number":1606,"context_line":"        # Check for deltas that would go negative"}],"source_content_type":"text/x-python","patch_set":3,"id":"36485c62_0ac82cc0","line":1603,"range":{"start_line":1603,"start_character":16,"end_line":1603,"end_character":18},"in_reply_to":"3221ef4e_050801c0","updated":"2022-05-09 09:00:00.000000000","message":"As above","commit_id":"58f23045962fcbbc033f6d61c34781e2fc3798da"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a1a5582a9eb67c5a0435f30271da19c10ef9d05","unresolved":true,"context_lines":[{"line_number":1452,"context_line":""},{"line_number":1453,"context_line":"    # We don\u0027t use begin as a context manager because there are cases where we"},{"line_number":1454,"context_line":"    # want to finish a transaction and begin a new one."},{"line_number":1455,"context_line":"    session.begin()"},{"line_number":1456,"context_line":"    try:"},{"line_number":1457,"context_line":"        if project_id is None:"},{"line_number":1458,"context_line":"            project_id \u003d context.project_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"31dcfded_b095474e","side":"PARENT","line":1455,"range":{"start_line":1455,"start_character":4,"end_line":1455,"end_character":19},"updated":"2022-05-02 03:48:06.000000000","message":"When does a session begin transaction with the new context.session reference? and should we keep this session.begin to mark that a new transaction has begun here as we do at L#1499 for every new session transaction?","commit_id":"7c3f9b0b1970edf9a93ebaeae1aaece68401563d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6cf603a7af90052e2f6541ba158502c08b1acca2","unresolved":false,"context_lines":[{"line_number":1452,"context_line":""},{"line_number":1453,"context_line":"    # We don\u0027t use begin as a context manager because there are cases where we"},{"line_number":1454,"context_line":"    # want to finish a transaction and begin a new one."},{"line_number":1455,"context_line":"    session.begin()"},{"line_number":1456,"context_line":"    try:"},{"line_number":1457,"context_line":"        if project_id is None:"},{"line_number":1458,"context_line":"            project_id \u003d context.project_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"9b9e689a_8598c666","side":"PARENT","line":1455,"range":{"start_line":1455,"start_character":4,"end_line":1455,"end_character":19},"in_reply_to":"31dcfded_b095474e","updated":"2022-05-09 09:00:00.000000000","message":"It starts on entering the context manager [1][2][3][4]. We don\u0027t need to manually do it. Effectively we\u0027re saying that the initial \u0027begin()\u0027 call and final \u0027commit()\u0027 call are unnecessary, but we must keep everything in between.\n\n[1] https://github.com/openstack/oslo.db/blob/a10eee97a/oslo_db/sqlalchemy/enginefacade.py#L994-L1012\n[2] https://github.com/openstack/oslo.db/blob/a10eee97a/oslo_db/sqlalchemy/enginefacade.py#L1023-L1067\n[3] https://github.com/openstack/oslo.db/blob/a10eee97a/oslo_db/sqlalchemy/enginefacade.py#L702-L713\n[4] https://github.com/openstack/oslo.db/blob/a10eee97a963470f68fce21285efe92eac28791b/oslo_db/sqlalchemy/enginefacade.py#L656-L659","commit_id":"7c3f9b0b1970edf9a93ebaeae1aaece68401563d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"0ff4491b3170ed03c2e679b8a0bd5cfbc46c61cf","unresolved":false,"context_lines":[{"line_number":1452,"context_line":""},{"line_number":1453,"context_line":"    # We don\u0027t use begin as a context manager because there are cases where we"},{"line_number":1454,"context_line":"    # want to finish a transaction and begin a new one."},{"line_number":1455,"context_line":"    session.begin()"},{"line_number":1456,"context_line":"    try:"},{"line_number":1457,"context_line":"        if project_id is None:"},{"line_number":1458,"context_line":"            project_id \u003d context.project_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"72704f1e_e345e909","side":"PARENT","line":1455,"range":{"start_line":1455,"start_character":4,"end_line":1455,"end_character":19},"in_reply_to":"9b9e689a_8598c666","updated":"2022-05-09 09:08:05.000000000","message":"Ack","commit_id":"7c3f9b0b1970edf9a93ebaeae1aaece68401563d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a1a5582a9eb67c5a0435f30271da19c10ef9d05","unresolved":true,"context_lines":[{"line_number":1591,"context_line":"                      for k, v in usages.items()}"},{"line_number":1592,"context_line":"            raise exception.OverQuota(overs\u003dsorted(overs), quotas\u003dquotas,"},{"line_number":1593,"context_line":"                                      usages\u003dusages)"},{"line_number":1594,"context_line":"        session.commit()"},{"line_number":1595,"context_line":"    except Exception:"},{"line_number":1596,"context_line":"        session.rollback()"},{"line_number":1597,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa5fe755_67581549","side":"PARENT","line":1594,"range":{"start_line":1594,"start_character":8,"end_line":1594,"end_character":24},"updated":"2022-05-02 03:48:06.000000000","message":"why are we removing this commit call?","commit_id":"7c3f9b0b1970edf9a93ebaeae1aaece68401563d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6cf603a7af90052e2f6541ba158502c08b1acca2","unresolved":false,"context_lines":[{"line_number":1591,"context_line":"                      for k, v in usages.items()}"},{"line_number":1592,"context_line":"            raise exception.OverQuota(overs\u003dsorted(overs), quotas\u003dquotas,"},{"line_number":1593,"context_line":"                                      usages\u003dusages)"},{"line_number":1594,"context_line":"        session.commit()"},{"line_number":1595,"context_line":"    except Exception:"},{"line_number":1596,"context_line":"        session.rollback()"},{"line_number":1597,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"0d1237bd_8481cbbd","side":"PARENT","line":1594,"range":{"start_line":1594,"start_character":8,"end_line":1594,"end_character":24},"in_reply_to":"fa5fe755_67581549","updated":"2022-05-09 09:00:00.000000000","message":"This is handled by the context manager like \u0027begin()\u0027, as noted above","commit_id":"7c3f9b0b1970edf9a93ebaeae1aaece68401563d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a1a5582a9eb67c5a0435f30271da19c10ef9d05","unresolved":true,"context_lines":[{"line_number":1684,"context_line":"            reservation.delete(session\u003dsession)"},{"line_number":1685,"context_line":""},{"line_number":1686,"context_line":""},{"line_number":1687,"context_line":"def quota_destroy_by_project(*args, **kwargs):"},{"line_number":1688,"context_line":"    \"\"\"Destroy all limit quotas associated with a project."},{"line_number":1689,"context_line":""},{"line_number":1690,"context_line":"    Leaves usage and reservation quotas intact."}],"source_content_type":"text/x-python","patch_set":4,"id":"b188435b_e6077bc3","side":"PARENT","line":1687,"range":{"start_line":1687,"start_character":29,"end_line":1687,"end_character":44},"updated":"2022-05-02 03:48:06.000000000","message":"strange to use these parameters here given it\u0027s only called from db.api","commit_id":"7c3f9b0b1970edf9a93ebaeae1aaece68401563d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6cf603a7af90052e2f6541ba158502c08b1acca2","unresolved":false,"context_lines":[{"line_number":1684,"context_line":"            reservation.delete(session\u003dsession)"},{"line_number":1685,"context_line":""},{"line_number":1686,"context_line":""},{"line_number":1687,"context_line":"def quota_destroy_by_project(*args, **kwargs):"},{"line_number":1688,"context_line":"    \"\"\"Destroy all limit quotas associated with a project."},{"line_number":1689,"context_line":""},{"line_number":1690,"context_line":"    Leaves usage and reservation quotas intact."}],"source_content_type":"text/x-python","patch_set":4,"id":"52eb5add_0d9b8d42","side":"PARENT","line":1687,"range":{"start_line":1687,"start_character":29,"end_line":1687,"end_character":44},"in_reply_to":"b188435b_e6077bc3","updated":"2022-05-09 09:00:00.000000000","message":"Ack","commit_id":"7c3f9b0b1970edf9a93ebaeae1aaece68401563d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6cf603a7af90052e2f6541ba158502c08b1acca2","unresolved":false,"context_lines":[{"line_number":1551,"context_line":"            # be rolled back and the wrap_db_retry decorator will retry."},{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"            # Commit new rows to the DB."},{"line_number":1554,"context_line":"            context.session.commit()"},{"line_number":1555,"context_line":""},{"line_number":1556,"context_line":"            # Start a new session before trying to lock all the rows again.  By"},{"line_number":1557,"context_line":"            # trying to get all the locks in a loop we can protect us against"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf1e5418_c34f0ee9","line":1554,"updated":"2022-05-09 09:00:00.000000000","message":"We keep this. We\u0027ve already called \u0027begin()\u0027 on the session by way of the context manager...","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6cf603a7af90052e2f6541ba158502c08b1acca2","unresolved":false,"context_lines":[{"line_number":1556,"context_line":"            # Start a new session before trying to lock all the rows again.  By"},{"line_number":1557,"context_line":"            # trying to get all the locks in a loop we can protect us against"},{"line_number":1558,"context_line":"            # admins directly deleting DB rows."},{"line_number":1559,"context_line":"            context.session.begin()"},{"line_number":1560,"context_line":""},{"line_number":1561,"context_line":"        # Handle usage refresh"},{"line_number":1562,"context_line":"        for resource in deltas.keys():"}],"source_content_type":"text/x-python","patch_set":4,"id":"9d72bfe3_ae63b24d","line":1559,"updated":"2022-05-09 09:00:00.000000000","message":"but now because we called commit(), we must \"reopen\" a session here...","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6cf603a7af90052e2f6541ba158502c08b1acca2","unresolved":true,"context_lines":[{"line_number":1683,"context_line":"                overs\u003dsorted(overs), quotas\u003dquotas, usages\u003dusages"},{"line_number":1684,"context_line":"            )"},{"line_number":1685,"context_line":"    except Exception:"},{"line_number":1686,"context_line":"        context.session.rollback()"},{"line_number":1687,"context_line":"        raise"},{"line_number":1688,"context_line":""},{"line_number":1689,"context_line":"    return reservations"}],"source_content_type":"text/x-python","patch_set":4,"id":"ce7b5d7a_cd7de2d8","line":1686,"updated":"2022-05-09 09:00:00.000000000","message":"Oh, I don\u0027t actually need this [1]. Will remove.\n\n[1] https://github.com/openstack/oslo.db/blob/a10eee97a/oslo_db/sqlalchemy/enginefacade.py#L662","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"73afb5ffcdc01f5583bf5a6b9a7a8c1928bac86a","unresolved":false,"context_lines":[{"line_number":1683,"context_line":"                overs\u003dsorted(overs), quotas\u003dquotas, usages\u003dusages"},{"line_number":1684,"context_line":"            )"},{"line_number":1685,"context_line":"    except Exception:"},{"line_number":1686,"context_line":"        context.session.rollback()"},{"line_number":1687,"context_line":"        raise"},{"line_number":1688,"context_line":""},{"line_number":1689,"context_line":"    return reservations"}],"source_content_type":"text/x-python","patch_set":4,"id":"37c12692_4e14ef81","line":1686,"in_reply_to":"ce7b5d7a_cd7de2d8","updated":"2022-05-09 09:03:38.000000000","message":"At least I think not. Change proposed at [1] to test this out.\n\n[1] https://review.opendev.org/c/openstack/cinder/+/841083","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a1a5582a9eb67c5a0435f30271da19c10ef9d05","unresolved":true,"context_lines":[{"line_number":1746,"context_line":""},{"line_number":1747,"context_line":"        usage.in_use +\u003d delta"},{"line_number":1748,"context_line":""},{"line_number":1749,"context_line":"        reservation.delete(context.session)"},{"line_number":1750,"context_line":""},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"@require_context"}],"source_content_type":"text/x-python","patch_set":4,"id":"41d11d19_f9a84472","line":1749,"range":{"start_line":1749,"start_character":27,"end_line":1749,"end_character":42},"updated":"2022-05-02 03:48:06.000000000","message":"better to not remove the key argument,\n        reservation.delete(context\u003dcontext.session)","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"37b6af79c70e15da535da4d1db7c07a38ae6d4b1","unresolved":false,"context_lines":[{"line_number":1746,"context_line":""},{"line_number":1747,"context_line":"        usage.in_use +\u003d delta"},{"line_number":1748,"context_line":""},{"line_number":1749,"context_line":"        reservation.delete(context.session)"},{"line_number":1750,"context_line":""},{"line_number":1751,"context_line":""},{"line_number":1752,"context_line":"@require_context"}],"source_content_type":"text/x-python","patch_set":4,"id":"bd602df7_7f7f04c4","line":1749,"range":{"start_line":1749,"start_character":27,"end_line":1749,"end_character":42},"in_reply_to":"41d11d19_f9a84472","updated":"2022-05-02 07:12:35.000000000","message":"you can ignore this, but my idea is to have minimal code changes in the unrelated parts.","commit_id":"bc9397073e3568af6111e137511a736d7b2fedf7"}],"cinder/tests/unit/test_db_api.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"fb26494471dbad5d35b0786897746483a891e024","unresolved":true,"context_lines":[{"line_number":2719,"context_line":"        counter \u003d 0"},{"line_number":2720,"context_line":""},{"line_number":2721,"context_line":"        # we want to simulate a duplicate request, so we fake out the first two"},{"line_number":2722,"context_line":"        # attempts to get usages from the database"},{"line_number":2723,"context_line":"        def fake_get_usages(*args, **kwargs):"},{"line_number":2724,"context_line":"            nonlocal counter"},{"line_number":2725,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"6d6253f3_e6d4e0a6","line":2722,"updated":"2022-04-09 16:09:04.000000000","message":"Took me a while, but what you\u0027re doing is instead of mocking the create, your fake_get_usages will force the function to call _quota_usage_create twice with the same exact values, and the second time will provoke an actual DBDuplicateEntry exception, and then the retry will use the original _get_quota_usages, which will get us out of the \u0027while True\u0027 loop and continue executing the function.","commit_id":"58f23045962fcbbc033f6d61c34781e2fc3798da"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6cf603a7af90052e2f6541ba158502c08b1acca2","unresolved":false,"context_lines":[{"line_number":2719,"context_line":"        counter \u003d 0"},{"line_number":2720,"context_line":""},{"line_number":2721,"context_line":"        # we want to simulate a duplicate request, so we fake out the first two"},{"line_number":2722,"context_line":"        # attempts to get usages from the database"},{"line_number":2723,"context_line":"        def fake_get_usages(*args, **kwargs):"},{"line_number":2724,"context_line":"            nonlocal counter"},{"line_number":2725,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"cf3ba690_6bd08afb","line":2722,"in_reply_to":"6d6253f3_e6d4e0a6","updated":"2022-05-09 09:00:00.000000000","message":"Yup. There was a reason for why I had to do this...but I don\u0027t remember it. Reverting this will likely cause errors that will clear things up, if anyone were interested","commit_id":"58f23045962fcbbc033f6d61c34781e2fc3798da"}]}
