)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"925fff54e05b8fe4e484bbec71bda9528afba8ec","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"c01c23ce_0a736f58","updated":"2024-10-14 19:20:44.000000000","message":"I have made some changes to Mohammeds patch. Whilst I am coordinating with him on getting these up for review, it would be interesting to see if anyone could apply the patch and test it out. git patch can be found here: https://gist.github.com/scrungus/f2c623a791117d7415b3b06a97f3a89b","commit_id":"00c404fdd7dd905c2afc549cafc549fa51bc3bdd"},{"author":{"_account_id":8064,"name":"Jake Yip","email":"jake.yip@ardc.edu.au","username":"jake"},"change_message_id":"c67dca9f7cca3cccc6c1a5cb9c0e139367128bc1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"0979c35a_5acab601","updated":"2024-11-06 22:15:18.000000000","message":"@mnaser I would appreciate your comments on this, many thanks!","commit_id":"0ce2c41404f1f8dcd1bcd19d36a885edc34926a2"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"a6821a6478f4a978ee3dd00f4c8e5312e00afb23","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"0607fa5b_5b89cebf","updated":"2024-11-13 14:31:30.000000000","message":"It looks good to me, but I really think we need some external validation of this.","commit_id":"0ce2c41404f1f8dcd1bcd19d36a885edc34926a2"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"28770c3f4de68c9604a33f2d114a3723b2d44750","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"ec9db263_7f883a95","updated":"2024-11-21 20:19:35.000000000","message":"Tested that as much as I could, it\u0027s new dev cycle - I\u0027ll do some additional series of testing before back porting that to stable branches...","commit_id":"0ce2c41404f1f8dcd1bcd19d36a885edc34926a2"}],"magnum/db/sqlalchemy/alembic/env.py":[{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f48c76679a0aa15dfeb2d76248aebbddd98907e4","unresolved":true,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from alembic import context"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from magnum.db.sqlalchemy import api as sqla_api"},{"line_number":18,"context_line":"from magnum.db.sqlalchemy import models"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# this is the Alembic Config object, which provides"}],"source_content_type":"text/x-python","patch_set":6,"id":"eec86189_bcd847b5","side":"PARENT","line":17,"updated":"2024-10-24 14:26:09.000000000","message":"What about magnum/magnum/db/api.py functions?","commit_id":"8d09169a8aa4d8425e9ab7f37bbb636c4410a39f"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"4f90454599fb6a846eeb988f82e27dc2b585cc8d","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from alembic import context"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from magnum.db.sqlalchemy import api as sqla_api"},{"line_number":18,"context_line":"from magnum.db.sqlalchemy import models"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# this is the Alembic Config object, which provides"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ec61915_d849c13c","side":"PARENT","line":17,"in_reply_to":"4d5cb3ba_3fe0b85b","updated":"2024-11-06 09:59:20.000000000","message":"Acknowledged","commit_id":"8d09169a8aa4d8425e9ab7f37bbb636c4410a39f"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"16cca7401ae65118f0dbb5f6561f3f2f9a5b2154","unresolved":true,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from alembic import context"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from magnum.db.sqlalchemy import api as sqla_api"},{"line_number":18,"context_line":"from magnum.db.sqlalchemy import models"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# this is the Alembic Config object, which provides"}],"source_content_type":"text/x-python","patch_set":6,"id":"4d5cb3ba_3fe0b85b","side":"PARENT","line":17,"in_reply_to":"73e4c296_766aef82","updated":"2024-10-30 11:16:04.000000000","message":"I think it\u0027s out of scope for this patch, as we\u0027re not changing the way those methods are used anywhere. Does that seem reasonable?","commit_id":"8d09169a8aa4d8425e9ab7f37bbb636c4410a39f"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"ed79de7ea59d1da912b79c39c9193389b2dd947e","unresolved":true,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from alembic import context"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from magnum.db.sqlalchemy import api as sqla_api"},{"line_number":18,"context_line":"from magnum.db.sqlalchemy import models"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# this is the Alembic Config object, which provides"}],"source_content_type":"text/x-python","patch_set":6,"id":"73e4c296_766aef82","side":"PARENT","line":17,"in_reply_to":"d5e97e03_5b159589","updated":"2024-10-30 06:45:37.000000000","message":"Using maybe here doesn’t sound like we have a plan for this","commit_id":"8d09169a8aa4d8425e9ab7f37bbb636c4410a39f"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"d19e3426aae5162f5b387c70285b1deb61a5a1f9","unresolved":true,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from alembic import context"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from magnum.db.sqlalchemy import api as sqla_api"},{"line_number":18,"context_line":"from magnum.db.sqlalchemy import models"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# this is the Alembic Config object, which provides"}],"source_content_type":"text/x-python","patch_set":6,"id":"d5e97e03_5b159589","side":"PARENT","line":17,"in_reply_to":"eec86189_bcd847b5","updated":"2024-10-29 21:29:13.000000000","message":"I guess I don\u0027t really understand the purpose of these functions at the moment, and I don\u0027t see them used anywhere. is it so we can have multiple ORM backends? the sqlachemy db module doesn\u0027t seem to have explicitly implemented those abstract methods, so maybe that should be done in a separate patch.","commit_id":"8d09169a8aa4d8425e9ab7f37bbb636c4410a39f"}],"magnum/db/sqlalchemy/api.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c72107c19ee331c61384fe47243e0a6cf47708e7","unresolved":true,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    with _session_for_read() as session:"},{"line_number":79,"context_line":"        query \u003d session.query(model, *args)"},{"line_number":80,"context_line":"        return query"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"def add_identity_filter(query, value):"}],"source_content_type":"text/x-python","patch_set":1,"id":"be189d2a_9d810b13","line":80,"updated":"2024-09-24 21:22:36.000000000","message":"The session.query() method does not actually execute a query, so _session_for_read() will not work as intended here. You will need _session_for_read() to encompass the query executions like query.all() and query.one() etc.\n\nAs currently written, the session wrapper will go out of scope before the query execution happens.\n\nThere was a similar bug in Nova in the past: https://launchpad.net/bugs/2027755","commit_id":"00c404fdd7dd905c2afc549cafc549fa51bc3bdd"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"f971c8452dbef71c02ca33721a8e1743fed3ea1b","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    with _session_for_read() as session:"},{"line_number":79,"context_line":"        query \u003d session.query(model, *args)"},{"line_number":80,"context_line":"        return query"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"def add_identity_filter(query, value):"}],"source_content_type":"text/x-python","patch_set":1,"id":"f65ee68e_9380a00c","line":80,"in_reply_to":"be189d2a_9d810b13","updated":"2024-10-17 11:41:15.000000000","message":"Done","commit_id":"00c404fdd7dd905c2afc549cafc549fa51bc3bdd"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f89f7f0d10d77aa41f5294166b3fb3b7c064ca88","unresolved":true,"context_lines":[{"line_number":56,"context_line":"    return _wrap_session(enginefacade.reader.using(_CONTEXT))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# Please add @oslo_db_api.retry_on_deadlock decorator to all methods using"},{"line_number":60,"context_line":"# _session_for_write (as deadlocks happen on write), so that oslo_db is able"},{"line_number":61,"context_line":"# to retry in case of deadlocks."},{"line_number":62,"context_line":"def _session_for_write():"}],"source_content_type":"text/x-python","patch_set":4,"id":"15418878_b6f35fde","line":59,"updated":"2024-10-23 07:29:20.000000000","message":"Is that a NOTE or a TODO? probably needs to be reworded a bit.","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"57f4cfcfd0a688d7a85992760099478215dcf6cd","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    return _wrap_session(enginefacade.reader.using(_CONTEXT))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# Please add @oslo_db_api.retry_on_deadlock decorator to all methods using"},{"line_number":60,"context_line":"# _session_for_write (as deadlocks happen on write), so that oslo_db is able"},{"line_number":61,"context_line":"# to retry in case of deadlocks."},{"line_number":62,"context_line":"def _session_for_write():"}],"source_content_type":"text/x-python","patch_set":4,"id":"c558eda3_73b6a98e","line":59,"in_reply_to":"15418878_b6f35fde","updated":"2024-10-24 13:13:57.000000000","message":"Done","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f89f7f0d10d77aa41f5294166b3fb3b7c064ca88","unresolved":true,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def _wrap_session(session):"},{"line_number":67,"context_line":"    if CONF.profiler.enabled and CONF.profiler.trace_sqlalchemy:"},{"line_number":68,"context_line":"        session \u003d profiler_sqlalchemy.wrap_session(sa, session)"},{"line_number":69,"context_line":"    return session"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"a4701c56_04522936","line":67,"updated":"2024-10-23 07:29:20.000000000","message":"Did you test profiler with that change?","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f48c76679a0aa15dfeb2d76248aebbddd98907e4","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def _wrap_session(session):"},{"line_number":67,"context_line":"    if CONF.profiler.enabled and CONF.profiler.trace_sqlalchemy:"},{"line_number":68,"context_line":"        session \u003d profiler_sqlalchemy.wrap_session(sa, session)"},{"line_number":69,"context_line":"    return session"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"092ecd32_25956dc9","line":67,"in_reply_to":"2e9b1687_95d084d5","updated":"2024-10-24 14:26:09.000000000","message":"We\u0027ve had history of breaking profiler - but let\u0027s tackle it when somebody reports a bug.","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"57f4cfcfd0a688d7a85992760099478215dcf6cd","unresolved":true,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def _wrap_session(session):"},{"line_number":67,"context_line":"    if CONF.profiler.enabled and CONF.profiler.trace_sqlalchemy:"},{"line_number":68,"context_line":"        session \u003d profiler_sqlalchemy.wrap_session(sa, session)"},{"line_number":69,"context_line":"    return session"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"2e9b1687_95d084d5","line":67,"in_reply_to":"a4701c56_04522936","updated":"2024-10-24 13:13:57.000000000","message":"What exactly should I test? \n\nit\u0027s a pretty minimal change - wrap_session just wraps add_tracing to ensure it\u0027s not done twice: https://github.com/openstack/osprofiler/blob/92dee3ed9e9f45f6a31573606fbb0cc75bdea2e0/osprofiler/sqlalchemy.py#L55-L60","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f89f7f0d10d77aa41f5294166b3fb3b7c064ca88","unresolved":true,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"            if project_id:"},{"line_number":263,"context_line":"                query \u003d query.filter_by(project_id\u003dproject_id)"},{"line_number":264,"context_line":"                # TODO(tylerchristie): hmmmmm??"},{"line_number":265,"context_line":"                nquery \u003d query.session.query(ncfunc.label(\"nodes\")).filter_by("},{"line_number":266,"context_line":"                    project_id\u003dproject_id"},{"line_number":267,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":4,"id":"55d05298_948dff4d","line":264,"updated":"2024-10-23 07:29:20.000000000","message":"hm?","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"57f4cfcfd0a688d7a85992760099478215dcf6cd","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"            if project_id:"},{"line_number":263,"context_line":"                query \u003d query.filter_by(project_id\u003dproject_id)"},{"line_number":264,"context_line":"                # TODO(tylerchristie): hmmmmm??"},{"line_number":265,"context_line":"                nquery \u003d query.session.query(ncfunc.label(\"nodes\")).filter_by("},{"line_number":266,"context_line":"                    project_id\u003dproject_id"},{"line_number":267,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":4,"id":"ace31a57_ecba4636","line":264,"in_reply_to":"55d05298_948dff4d","updated":"2024-10-24 13:13:57.000000000","message":"Done","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f89f7f0d10d77aa41f5294166b3fb3b7c064ca88","unresolved":true,"context_lines":[{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def update_cluster(self, cluster_id, values):"},{"line_number":296,"context_line":"        # NOTE(dtantsur): this can lead to very strange errors"},{"line_number":297,"context_line":"        if \"uuid\" in values:"},{"line_number":298,"context_line":"            msg \u003d _(\"Cannot overwrite UUID for an existing Cluster.\")"},{"line_number":299,"context_line":"            raise exception.InvalidParameterValue(err\u003dmsg)"},{"line_number":300,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"909c5d36_d73d1f46","line":297,"updated":"2024-10-23 07:29:20.000000000","message":"I don\u0027t think changing single quotes to double quotes helps in reviewing that patch (that applies to most of the changes) - can we keep it to a minimal set? That patch needs to be backported when it lands...","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"16cca7401ae65118f0dbb5f6561f3f2f9a5b2154","unresolved":false,"context_lines":[{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def update_cluster(self, cluster_id, values):"},{"line_number":296,"context_line":"        # NOTE(dtantsur): this can lead to very strange errors"},{"line_number":297,"context_line":"        if \"uuid\" in values:"},{"line_number":298,"context_line":"            msg \u003d _(\"Cannot overwrite UUID for an existing Cluster.\")"},{"line_number":299,"context_line":"            raise exception.InvalidParameterValue(err\u003dmsg)"},{"line_number":300,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"c2cdae49_319ad110","line":297,"in_reply_to":"31090aaf_23ae330a","updated":"2024-10-30 11:16:04.000000000","message":"Done","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"57f4cfcfd0a688d7a85992760099478215dcf6cd","unresolved":true,"context_lines":[{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def update_cluster(self, cluster_id, values):"},{"line_number":296,"context_line":"        # NOTE(dtantsur): this can lead to very strange errors"},{"line_number":297,"context_line":"        if \"uuid\" in values:"},{"line_number":298,"context_line":"            msg \u003d _(\"Cannot overwrite UUID for an existing Cluster.\")"},{"line_number":299,"context_line":"            raise exception.InvalidParameterValue(err\u003dmsg)"},{"line_number":300,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fae585d5_8a213ad6","line":297,"in_reply_to":"909c5d36_d73d1f46","updated":"2024-10-24 13:13:57.000000000","message":"This was a result of using black to format the code. I can go change these back if you\u0027d like, but I think we should switch to using black linting in this project anyway as that helps resolve any arguments about formatting :)","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"d7f29936f54fbd2d3e30ad2a1cebc1a82feee351","unresolved":true,"context_lines":[{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def update_cluster(self, cluster_id, values):"},{"line_number":296,"context_line":"        # NOTE(dtantsur): this can lead to very strange errors"},{"line_number":297,"context_line":"        if \"uuid\" in values:"},{"line_number":298,"context_line":"            msg \u003d _(\"Cannot overwrite UUID for an existing Cluster.\")"},{"line_number":299,"context_line":"            raise exception.InvalidParameterValue(err\u003dmsg)"},{"line_number":300,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"31090aaf_23ae330a","line":297,"in_reply_to":"fae585d5_8a213ad6","updated":"2024-10-24 13:18:10.000000000","message":"Go back please, implementing black should be another change and should be first discussed on the weekly meeting.","commit_id":"eabb7663016d7a58bcf16ce574a5c519d330ced9"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f48c76679a0aa15dfeb2d76248aebbddd98907e4","unresolved":true,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"def _paginate_query(model, limit\u003dNone, marker\u003dNone, sort_key\u003dNone,"},{"line_number":103,"context_line":"                    sort_dir\u003dNone, query\u003dNone):"},{"line_number":104,"context_line":"    if not query:"},{"line_number":105,"context_line":"        query \u003d model_query(model)"},{"line_number":106,"context_line":"    sort_keys \u003d [\u0027id\u0027]"},{"line_number":107,"context_line":"    if sort_key and sort_key not in sort_keys:"}],"source_content_type":"text/x-python","patch_set":6,"id":"735413db_d42496df","side":"PARENT","line":104,"updated":"2024-10-24 14:26:09.000000000","message":"Why?","commit_id":"8d09169a8aa4d8425e9ab7f37bbb636c4410a39f"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"d19e3426aae5162f5b387c70285b1deb61a5a1f9","unresolved":true,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"def _paginate_query(model, limit\u003dNone, marker\u003dNone, sort_key\u003dNone,"},{"line_number":103,"context_line":"                    sort_dir\u003dNone, query\u003dNone):"},{"line_number":104,"context_line":"    if not query:"},{"line_number":105,"context_line":"        query \u003d model_query(model)"},{"line_number":106,"context_line":"    sort_keys \u003d [\u0027id\u0027]"},{"line_number":107,"context_line":"    if sort_key and sort_key not in sort_keys:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ef4ffc23_0c9b6207","side":"PARENT","line":104,"in_reply_to":"735413db_d42496df","updated":"2024-10-29 21:29:13.000000000","message":"the query is always passed into this method now. model_query was getting a new session if one didn\u0027t exist, and I think this is where we were leaking connections as it fell out of scope","commit_id":"8d09169a8aa4d8425e9ab7f37bbb636c4410a39f"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"16cca7401ae65118f0dbb5f6561f3f2f9a5b2154","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"def _paginate_query(model, limit\u003dNone, marker\u003dNone, sort_key\u003dNone,"},{"line_number":103,"context_line":"                    sort_dir\u003dNone, query\u003dNone):"},{"line_number":104,"context_line":"    if not query:"},{"line_number":105,"context_line":"        query \u003d model_query(model)"},{"line_number":106,"context_line":"    sort_keys \u003d [\u0027id\u0027]"},{"line_number":107,"context_line":"    if sort_key and sort_key not in sort_keys:"}],"source_content_type":"text/x-python","patch_set":6,"id":"2e7fc090_eb9204d0","side":"PARENT","line":104,"in_reply_to":"8d79146d_14aed117","updated":"2024-10-30 11:16:04.000000000","message":"Done","commit_id":"8d09169a8aa4d8425e9ab7f37bbb636c4410a39f"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"ed79de7ea59d1da912b79c39c9193389b2dd947e","unresolved":true,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"def _paginate_query(model, limit\u003dNone, marker\u003dNone, sort_key\u003dNone,"},{"line_number":103,"context_line":"                    sort_dir\u003dNone, query\u003dNone):"},{"line_number":104,"context_line":"    if not query:"},{"line_number":105,"context_line":"        query \u003d model_query(model)"},{"line_number":106,"context_line":"    sort_keys \u003d [\u0027id\u0027]"},{"line_number":107,"context_line":"    if sort_key and sort_key not in sort_keys:"}],"source_content_type":"text/x-python","patch_set":6,"id":"8d79146d_14aed117","side":"PARENT","line":104,"in_reply_to":"ef4ffc23_0c9b6207","updated":"2024-10-30 06:45:37.000000000","message":"That should also be in the commit message.","commit_id":"8d09169a8aa4d8425e9ab7f37bbb636c4410a39f"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f48c76679a0aa15dfeb2d76248aebbddd98907e4","unresolved":true,"context_lines":[{"line_number":56,"context_line":"    return _wrap_session(enginefacade.reader.using(_CONTEXT))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# Please add @oslo_db_api.retry_on_deadlock decorator to any new methods using"},{"line_number":60,"context_line":"# _session_for_write (as deadlocks happen on write), so that oslo_db is able"},{"line_number":61,"context_line":"# to retry in case of deadlocks."},{"line_number":62,"context_line":"def _session_for_write():"}],"source_content_type":"text/x-python","patch_set":6,"id":"8b92c159_58665d23","line":59,"updated":"2024-10-24 14:26:09.000000000","message":"```suggestion\n# NOTE(yourname): Please add @oslo_db_api.retry_on_deadlock decorator to any new methods using\n```","commit_id":"26ca3a87464b12a3b589484ec839a2f09162689b"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"d19e3426aae5162f5b387c70285b1deb61a5a1f9","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    return _wrap_session(enginefacade.reader.using(_CONTEXT))"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# Please add @oslo_db_api.retry_on_deadlock decorator to any new methods using"},{"line_number":60,"context_line":"# _session_for_write (as deadlocks happen on write), so that oslo_db is able"},{"line_number":61,"context_line":"# to retry in case of deadlocks."},{"line_number":62,"context_line":"def _session_for_write():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3837e98d_6125848e","line":59,"in_reply_to":"8b92c159_58665d23","updated":"2024-10-29 21:29:13.000000000","message":"Done","commit_id":"26ca3a87464b12a3b589484ec839a2f09162689b"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f48c76679a0aa15dfeb2d76248aebbddd98907e4","unresolved":true,"context_lines":[{"line_number":153,"context_line":"        def filter_node_count(query, node_count, is_master\u003dFalse):"},{"line_number":154,"context_line":"            nfunc \u003d func.sum(models.NodeGroup.node_count)"},{"line_number":155,"context_line":"            with _session_for_read() as session:"},{"line_number":156,"context_line":"                nquery \u003d session.query(models.NodeGroup)"},{"line_number":157,"context_line":"                if is_master:"},{"line_number":158,"context_line":"                    nquery \u003d nquery.filter(models.NodeGroup.role \u003d\u003d \u0027master\u0027)"},{"line_number":159,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1e3641fb_04732b44","line":156,"updated":"2024-10-24 14:26:09.000000000","message":"Should we rather update the functions in magnum/db/sqlalchemy/api.py instead of not using them at all?","commit_id":"26ca3a87464b12a3b589484ec839a2f09162689b"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"d19e3426aae5162f5b387c70285b1deb61a5a1f9","unresolved":true,"context_lines":[{"line_number":153,"context_line":"        def filter_node_count(query, node_count, is_master\u003dFalse):"},{"line_number":154,"context_line":"            nfunc \u003d func.sum(models.NodeGroup.node_count)"},{"line_number":155,"context_line":"            with _session_for_read() as session:"},{"line_number":156,"context_line":"                nquery \u003d session.query(models.NodeGroup)"},{"line_number":157,"context_line":"                if is_master:"},{"line_number":158,"context_line":"                    nquery \u003d nquery.filter(models.NodeGroup.role \u003d\u003d \u0027master\u0027)"},{"line_number":159,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3c368430_a74af58d","line":156,"in_reply_to":"1e3641fb_04732b44","updated":"2024-10-29 21:29:13.000000000","message":"what do you mean? the thing we are changing here is having each function manage it\u0027s own session explicitly, rather than having a model_query method create a new session if one doesn\u0027t exist, which is never the right thing to do.","commit_id":"26ca3a87464b12a3b589484ec839a2f09162689b"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"ed79de7ea59d1da912b79c39c9193389b2dd947e","unresolved":true,"context_lines":[{"line_number":153,"context_line":"        def filter_node_count(query, node_count, is_master\u003dFalse):"},{"line_number":154,"context_line":"            nfunc \u003d func.sum(models.NodeGroup.node_count)"},{"line_number":155,"context_line":"            with _session_for_read() as session:"},{"line_number":156,"context_line":"                nquery \u003d session.query(models.NodeGroup)"},{"line_number":157,"context_line":"                if is_master:"},{"line_number":158,"context_line":"                    nquery \u003d nquery.filter(models.NodeGroup.role \u003d\u003d \u0027master\u0027)"},{"line_number":159,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f3b853e_fd5a3b7f","line":156,"in_reply_to":"3c368430_a74af58d","updated":"2024-10-30 06:45:37.000000000","message":"So add that to the commit message, the more context is there, the less questions reviewers will ask.","commit_id":"26ca3a87464b12a3b589484ec839a2f09162689b"},{"author":{"_account_id":35260,"name":"Tyler","email":"tyler@stackhpc.com","username":"scrungus"},"change_message_id":"16cca7401ae65118f0dbb5f6561f3f2f9a5b2154","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        def filter_node_count(query, node_count, is_master\u003dFalse):"},{"line_number":154,"context_line":"            nfunc \u003d func.sum(models.NodeGroup.node_count)"},{"line_number":155,"context_line":"            with _session_for_read() as session:"},{"line_number":156,"context_line":"                nquery \u003d session.query(models.NodeGroup)"},{"line_number":157,"context_line":"                if is_master:"},{"line_number":158,"context_line":"                    nquery \u003d nquery.filter(models.NodeGroup.role \u003d\u003d \u0027master\u0027)"},{"line_number":159,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"42d7dc6d_ca7a23f3","line":156,"in_reply_to":"3f3b853e_fd5a3b7f","updated":"2024-10-30 11:16:04.000000000","message":"Done","commit_id":"26ca3a87464b12a3b589484ec839a2f09162689b"}]}
