)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  1. Namespaces are not part of the mistral DSL."},{"line_number":14,"context_line":"  2. When executing a workflow, the namespace passes down to the subworkflow."},{"line_number":15,"context_line":"  3. When searching for the sub-workflow definition -"},{"line_number":16,"context_line":"     If no workflow was found in the given namespace, than the defualt namespace will be used."},{"line_number":17,"context_line":"  4. The default namespace is an empty string."},{"line_number":18,"context_line":"  5. The namespace property or the workflow execution will be under params"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ff346bd7_c4053ac4","line":16,"range":{"start_line":16,"start_character":71,"end_line":16,"end_character":80},"updated":"2017-07-25 07:18:38.000000000","message":"Not sure if it\u0027s still a strict requirement but I\u0027d recommend to keep lines within 80 chars.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  1. Namespaces are not part of the mistral DSL."},{"line_number":14,"context_line":"  2. When executing a workflow, the namespace passes down to the subworkflow."},{"line_number":15,"context_line":"  3. When searching for the sub-workflow definition -"},{"line_number":16,"context_line":"     If no workflow was found in the given namespace, than the defualt namespace will be used."},{"line_number":17,"context_line":"  4. The default namespace is an empty string."},{"line_number":18,"context_line":"  5. The namespace property or the workflow execution will be under params"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ff346bd7_53d1fdcc","line":16,"range":{"start_line":16,"start_character":71,"end_line":16,"end_character":80},"in_reply_to":"ff346bd7_c4053ac4","updated":"2017-07-25 15:55:48.000000000","message":"Done","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  4. The default namespace is an empty string."},{"line_number":18,"context_line":"  5. The namespace property or the workflow execution will be under params"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"blueprint create-and-run-workflows-within-a-namespace"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: Id248ec5906a0899d188675d002b45f6249d36d90"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ff346bd7_046ea294","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":9},"updated":"2017-07-25 07:18:38.000000000","message":"The right syntax is:\n\nImplements: blueprint \u003cBP name\u003e\n\nbut given our discussion with Brad, I think in this case it should be:\n\nPartially implements: blueprint \u003cBP name\u003e\n\n[1] https://docs.openstack.org/infra/manual/developers.html","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  4. The default namespace is an empty string."},{"line_number":18,"context_line":"  5. The namespace property or the workflow execution will be under params"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"blueprint create-and-run-workflows-within-a-namespace"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Change-Id: Id248ec5906a0899d188675d002b45f6249d36d90"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ff346bd7_73cac11a","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":9},"in_reply_to":"ff346bd7_046ea294","updated":"2017-07-25 15:55:48.000000000","message":"Done","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"}],"functionaltests/run_tests.sh":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":23,"context_line":"echo \"Successfully contacted Mistral API\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"# Where tempest code lives"},{"line_number":26,"context_line":"TEMPEST_DIR\u003d${TEMPEST_DIR:-/opt/stack/new/tempest}"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# Path to directory with tempest.conf file, otherwise it will"},{"line_number":29,"context_line":"# take relative path from where the run tests command is being executed."}],"source_content_type":"text/x-sh","patch_set":8,"id":"ff346bd7_b1ecb729","side":"PARENT","line":26,"range":{"start_line":26,"start_character":38,"end_line":26,"end_character":41},"updated":"2017-07-25 07:18:38.000000000","message":"Can you explain the context of this change?","commit_id":"ee3c5db23a67464095610fc37b5f8a8814a1dd61"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":23,"context_line":"echo \"Successfully contacted Mistral API\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"# Where tempest code lives"},{"line_number":26,"context_line":"TEMPEST_DIR\u003d${TEMPEST_DIR:-/opt/stack/new/tempest}"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# Path to directory with tempest.conf file, otherwise it will"},{"line_number":29,"context_line":"# take relative path from where the run tests command is being executed."}],"source_content_type":"text/x-sh","patch_set":8,"id":"ff346bd7_1b5f1973","side":"PARENT","line":26,"range":{"start_line":26,"start_character":38,"end_line":26,"end_character":41},"in_reply_to":"ff346bd7_b1ecb729","updated":"2017-07-25 15:55:48.000000000","message":"I believe this script is here to allow developers to run tests easily. When I tried to run it without my changes it failed because the paths were incorrect, so I fixed them.","commit_id":"ee3c5db23a67464095610fc37b5f8a8814a1dd61"}],"mistral/api/controllers/v2/resources.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":217,"context_line":"    \"reference to workflow definition\""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    workflow_namespace \u003d wtypes.text"},{"line_number":220,"context_line":"    \"reference to workflow definition\""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    workflow_id \u003d wtypes.text"},{"line_number":223,"context_line":"    \"reference to workflow ID\""}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_11226301","line":220,"range":{"start_line":220,"start_character":5,"end_line":220,"end_character":37},"updated":"2017-07-25 07:18:38.000000000","message":"Fix it.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":217,"context_line":"    \"reference to workflow definition\""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    workflow_namespace \u003d wtypes.text"},{"line_number":220,"context_line":"    \"reference to workflow definition\""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    workflow_id \u003d wtypes.text"},{"line_number":223,"context_line":"    \"reference to workflow ID\""}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_dbacf136","line":220,"range":{"start_line":220,"start_character":5,"end_line":220,"end_character":37},"in_reply_to":"ff346bd7_11226301","updated":"2017-07-25 15:55:48.000000000","message":"Done","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"}],"mistral/db/sqlalchemy/migration/alembic_migrations/versions/022_namespace_support.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from sqlalchemy.sql import table, column"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# A simple model of the workflow definitions table with only the field needed"},{"line_number":33,"context_line":"wf_def \u003d table(\u0027workflow_definitions_v2\u0027, column(\u0027namespace\u0027))"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# A simple model of the workflow executions table with only the field needed"},{"line_number":36,"context_line":"wf_exec \u003d table(\u0027workflow_executions_v2\u0027, column(\u0027workflow_namespace\u0027))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"# A simple model of the task executions table with only the field needed"},{"line_number":39,"context_line":"task_exec \u003d table(\u0027task_executions_v2\u0027, column(\u0027workflow_namespace\u0027))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# A simple model of the action executions table with only the fields needed"},{"line_number":42,"context_line":"action_executions \u003d sa.Table("},{"line_number":43,"context_line":"    \u0027action_executions_v2\u0027,"},{"line_number":44,"context_line":"    sa.MetaData(),"},{"line_number":45,"context_line":"    sa.Column(\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":46,"context_line":"    sa.Column(\u0027workflow_name\u0027, sa.String(255)),"},{"line_number":47,"context_line":"    sa.Column(\u0027workflow_namespace\u0027, sa.String(255), nullable\u003dTrue)"},{"line_number":48,"context_line":")"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def upgrade():"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_1108232a","line":48,"range":{"start_line":33,"start_character":0,"end_line":48,"end_character":1},"updated":"2017-07-25 07:18:38.000000000","message":"Can you briefly explain why you need this? Why is just using op.add_column() not enough?","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from sqlalchemy.sql import table, column"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# A simple model of the workflow definitions table with only the field needed"},{"line_number":33,"context_line":"wf_def \u003d table(\u0027workflow_definitions_v2\u0027, column(\u0027namespace\u0027))"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# A simple model of the workflow executions table with only the field needed"},{"line_number":36,"context_line":"wf_exec \u003d table(\u0027workflow_executions_v2\u0027, column(\u0027workflow_namespace\u0027))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"# A simple model of the task executions table with only the field needed"},{"line_number":39,"context_line":"task_exec \u003d table(\u0027task_executions_v2\u0027, column(\u0027workflow_namespace\u0027))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# A simple model of the action executions table with only the fields needed"},{"line_number":42,"context_line":"action_executions \u003d sa.Table("},{"line_number":43,"context_line":"    \u0027action_executions_v2\u0027,"},{"line_number":44,"context_line":"    sa.MetaData(),"},{"line_number":45,"context_line":"    sa.Column(\u0027id\u0027, sa.String(36), nullable\u003dFalse),"},{"line_number":46,"context_line":"    sa.Column(\u0027workflow_name\u0027, sa.String(255)),"},{"line_number":47,"context_line":"    sa.Column(\u0027workflow_namespace\u0027, sa.String(255), nullable\u003dTrue)"},{"line_number":48,"context_line":")"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def upgrade():"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_9e453746","line":48,"range":{"start_line":33,"start_character":0,"end_line":48,"end_character":1},"in_reply_to":"ff346bd7_1108232a","updated":"2017-07-25 15:55:48.000000000","message":"Right now all the new columns are nullable. Since we decided the default namespace will be the empty string, and not null, after adding the columns we need to update them with the empty string.\n\nFor updating the columns I needed a model (or a partial model) of how the tables look like.\n\nSo basically this is the model. \n\nThere are other things I could have done. For example for workflow_definitions_v2, I could have decided to create the column with a server default set to the empty string, but I didn\u0027t see it anywhere else in mistral, so I thought using a more familiar approach is better. \n\nAnd also, in action_executions_v2 I believe the column should be nullable, because it is possible to create action execution without a workflow execution.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                       \u0027workflow_name\u0027: row[1]})"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":101,"context_line":"        session.execute(wf_def.update().values(namespace\u003d\u0027\u0027))"},{"line_number":102,"context_line":"        session.execute(wf_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":103,"context_line":"        session.execute(task_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_5e08efd7","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":61},"updated":"2017-07-25 15:55:48.000000000","message":"update all existing workflow definition to be in the default namespace.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":101,"context_line":"        session.execute(wf_def.update().values(namespace\u003d\u0027\u0027))"},{"line_number":102,"context_line":"        session.execute(wf_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":103,"context_line":"        session.execute(task_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        for value in values:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_7e84d35e","line":102,"range":{"start_line":102,"start_character":8,"end_line":102,"end_character":71},"updated":"2017-07-25 15:55:48.000000000","message":"Before all workflow execution had a column called workflow_name. Above, in lines 70-77, we added a new column - workflow_namespace and here we update it to be the default namespace (empty string)","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":101,"context_line":"        session.execute(wf_def.update().values(namespace\u003d\u0027\u0027))"},{"line_number":102,"context_line":"        session.execute(wf_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":103,"context_line":"        session.execute(task_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        for value in values:"},{"line_number":106,"context_line":"            if value[\u0027workflow_name\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_1ef6e7fa","line":103,"range":{"start_line":103,"start_character":8,"end_line":103,"end_character":73},"updated":"2017-07-25 15:55:48.000000000","message":"Before all task execution had a column called workflow_name. Above, in lines 79-86, we added a new column - workflow_namespace, and here we update it to be the default namespace (empty string)","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        session.execute(wf_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":103,"context_line":"        session.execute(task_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        for value in values:"},{"line_number":106,"context_line":"            if value[\u0027workflow_name\u0027]:"},{"line_number":107,"context_line":"                session.execute(action_executions.update().values("},{"line_number":108,"context_line":"                    workflow_namespace\u003d\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_9e72d748","line":105,"updated":"2017-07-25 15:55:48.000000000","message":"Before all action executions had a column called workflow_name. Above, in lines 88-91, we added a new column - workflow_namespace, and here we update a given row workflow_namespace to be the default namespace (empty string).\n\nOnly the rows that have a workflow_name will be updated bellow.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        values.append({\u0027id\u0027: row[0],"},{"line_number":98,"context_line":"                       \u0027workflow_name\u0027: row[1]})"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":101,"context_line":"        session.execute(wf_def.update().values(namespace\u003d\u0027\u0027))"},{"line_number":102,"context_line":"        session.execute(wf_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":103,"context_line":"        session.execute(task_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        for value in values:"},{"line_number":106,"context_line":"            if value[\u0027workflow_name\u0027]:"},{"line_number":107,"context_line":"                session.execute(action_executions.update().values("},{"line_number":108,"context_line":"                    workflow_namespace\u003d\u0027\u0027"},{"line_number":109,"context_line":"                ).where(action_executions.c.id \u003d\u003d value[\u0027id\u0027]))"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    # this commit appears to be necessary"},{"line_number":112,"context_line":"    session.commit()"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_740cfd3a","line":109,"range":{"start_line":100,"start_character":4,"end_line":109,"end_character":63},"updated":"2017-07-25 07:18:38.000000000","message":"I also don\u0027t understand this part.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        values.append({\u0027id\u0027: row[0],"},{"line_number":98,"context_line":"                       \u0027workflow_name\u0027: row[1]})"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":101,"context_line":"        session.execute(wf_def.update().values(namespace\u003d\u0027\u0027))"},{"line_number":102,"context_line":"        session.execute(wf_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":103,"context_line":"        session.execute(task_exec.update().values(workflow_namespace\u003d\u0027\u0027))"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        for value in values:"},{"line_number":106,"context_line":"            if value[\u0027workflow_name\u0027]:"},{"line_number":107,"context_line":"                session.execute(action_executions.update().values("},{"line_number":108,"context_line":"                    workflow_namespace\u003d\u0027\u0027"},{"line_number":109,"context_line":"                ).where(action_executions.c.id \u003d\u003d value[\u0027id\u0027]))"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    # this commit appears to be necessary"},{"line_number":112,"context_line":"    session.commit()"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_de9dff57","line":109,"range":{"start_line":100,"start_character":4,"end_line":109,"end_character":63},"in_reply_to":"ff346bd7_740cfd3a","updated":"2017-07-25 15:55:48.000000000","message":"I tried to explain, hope it\u0027s clearer now, if not, please let me know.\n\nNot in this file - adding namespace to params of existing workflow executions. Let me know if you think we need it.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"}],"mistral/db/v2/sqlalchemy/api.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    )"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"def _get_db_object_by_name(model, name, namespace\u003dNone):"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    query \u003d _secure_query(model)"},{"line_number":259,"context_line":"    filter_ \u003d model.name \u003d\u003d name"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_5498d9be","line":256,"range":{"start_line":256,"start_character":4,"end_line":256,"end_character":56},"updated":"2017-07-25 07:18:38.000000000","message":"Leaking abstraction. The method is supposed to be used for different objects but \"namespace\" is leaking here which is relevant only for workflow definitions. Please refactor it somehow. E.g. you you can change this method signature to something like:\n\n_get_db_object(model, filter)\n\nwhere \"filter\" could be a dict [field_name, field_value] so that entries are applied with \"and\" logical operator. Or \"filter\" could be even more flexible thing that already have (see filter_utils.py).\n\nAnyway, once this refactoring is made you won\u0027t need to pass \"namespace\" explicitly.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    )"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"def _get_db_object_by_name(model, name, namespace\u003dNone):"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    query \u003d _secure_query(model)"},{"line_number":259,"context_line":"    filter_ \u003d model.name \u003d\u003d name"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_721ac27d","line":256,"range":{"start_line":256,"start_character":4,"end_line":256,"end_character":56},"in_reply_to":"ff346bd7_5498d9be","updated":"2017-07-25 15:55:48.000000000","message":"You are right. I will fix it.\nI do want to keep the name in the signature though.\n\nOur logic is slightly different when we are looking for the next sub-workflow to run compare to just getting a definition from the DB. maybe we need to change the way this function is called. I\u0027ll make an initial fix and we can continue the discussion there.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"def _get_db_object_by_name_or_id(model, identifier, namespace\u003dNone,"},{"line_number":281,"context_line":"                                 insecure\u003dFalse):"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    query \u003d b.model_query(model) if insecure else _secure_query(model)"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_6de9c318","line":281,"updated":"2017-07-25 15:55:48.000000000","message":"Leaking abstraction here too. Don\u0027t think I made it better in the new PS. ideas?","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"@b.session_aware()"},{"line_number":521,"context_line":"def update_workflow_definition(identifier, values, namespace\u003d\u0027\u0027, session\u003dNone):"},{"line_number":522,"context_line":"    wf_def \u003d get_workflow_definition(identifier, namespace\u003dnamespace)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    m_dbutils.check_db_obj_access(wf_def)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_94cc01bd","line":521,"range":{"start_line":521,"start_character":31,"end_line":521,"end_character":41},"updated":"2017-07-25 07:18:38.000000000","message":"Just a thought: we could create the class Identifier that would encapsulate all these things. For workflow definitions \"namespace\" could be a part of identifier.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"@b.session_aware()"},{"line_number":521,"context_line":"def update_workflow_definition(identifier, values, namespace\u003d\u0027\u0027, session\u003dNone):"},{"line_number":522,"context_line":"    wf_def \u003d get_workflow_definition(identifier, namespace\u003dnamespace)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    m_dbutils.check_db_obj_access(wf_def)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_cd0d4f36","line":521,"range":{"start_line":521,"start_character":31,"end_line":521,"end_character":41},"in_reply_to":"ff346bd7_94cc01bd","updated":"2017-07-25 15:55:48.000000000","message":"yes, we should probably do that, but we are almost at the feature freeze. is it very bad to push it like this?","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"}],"mistral/engine/workflow_handler.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    wf_def \u003d db_api.get_workflow_definition(wf_identifier, wf_namespace)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    if \u0027namespace\u0027 not in params:"},{"line_number":42,"context_line":"        # too fix"},{"line_number":43,"context_line":"        params[\u0027namespace\u0027] \u003d wf_def.namespace"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    wf.start("}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_346f9593","line":42,"range":{"start_line":42,"start_character":8,"end_line":42,"end_character":17},"updated":"2017-07-25 07:18:38.000000000","message":"What\u0027s this comment for?","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    wf_def \u003d db_api.get_workflow_definition(wf_identifier, wf_namespace)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    if \u0027namespace\u0027 not in params:"},{"line_number":42,"context_line":"        # too fix"},{"line_number":43,"context_line":"        params[\u0027namespace\u0027] \u003d wf_def.namespace"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    wf.start("}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_fef9e37f","line":42,"range":{"start_line":42,"start_character":8,"end_line":42,"end_character":17},"in_reply_to":"ff346bd7_346f9593","updated":"2017-07-25 15:55:48.000000000","message":"Sorry, forgot to remove it. I didn\u0027t see it since it says \"too\" instead of \"todo\".","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"}],"mistral/tests/unit/engine/test_action_context.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def test_action_context(self):"},{"line_number":61,"context_line":"        wb_service.create_workbook_v2(WORKBOOK)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        wf_ex \u003d self.engine.start_workflow(\u0027wb.wf1\u0027, \u0027\u0027, {})"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        self.await_workflow_success(wf_ex.id)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_d48a8919","line":63,"range":{"start_line":63,"start_character":52,"end_line":63,"end_character":59},"updated":"2017-07-25 07:18:38.000000000","message":"These two params can be omitted. Please fix it in all of the tests that you changed.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def test_action_context(self):"},{"line_number":61,"context_line":"        wb_service.create_workbook_v2(WORKBOOK)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        wf_ex \u003d self.engine.start_workflow(\u0027wb.wf1\u0027, \u0027\u0027, {})"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        self.await_workflow_success(wf_ex.id)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_be76bb05","line":63,"range":{"start_line":63,"start_character":52,"end_line":63,"end_character":59},"in_reply_to":"ff346bd7_d48a8919","updated":"2017-07-25 15:55:48.000000000","message":"Really? there are like 200 usages of this function :(\n\nIf we must do it, at least let\u0027s do it in a separate review.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"}],"mistral/tests/unit/engine/test_action_defaults.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"a68114329f856e8f82b81d0794eb90e9c1e22e67","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    def test_action_defaults_from_env(self):"},{"line_number":106,"context_line":"        wf_service.create_workflows(WORKFLOW1)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        wf_ex \u003d self.engine.start_workflow(\u0027wf1\u0027, \u0027\u0027, None, env\u003dENV)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.await_workflow_success(wf_ex.id)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_74b99de7","line":108,"range":{"start_line":108,"start_character":42,"end_line":108,"end_character":68},"updated":"2017-07-25 07:18:38.000000000","message":"Shouldn\u0027t it look like\n\n(\u0027wf1\u0027, env\u003dENV)\n\n?","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"004a7da88ed966b52846ad1702fcdb5593e7e3b5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    def test_action_defaults_from_env(self):"},{"line_number":106,"context_line":"        wf_service.create_workflows(WORKFLOW1)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        wf_ex \u003d self.engine.start_workflow(\u0027wf1\u0027, \u0027\u0027, None, env\u003dENV)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        self.await_workflow_success(wf_ex.id)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ff346bd7_612b1282","line":108,"range":{"start_line":108,"start_character":42,"end_line":108,"end_character":68},"in_reply_to":"ff346bd7_74b99de7","updated":"2017-07-25 15:55:48.000000000","message":"start workflow is used more than 200 times. I used structural replace with regex. Going over all the usages can take more than an hour.","commit_id":"e1e8214ae9dd75876fdb73a1ca68c6bcef2d25d0"}]}
