)]}'
{"mistral/api/controllers/v2/execution_report.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":"QUERY_LIMIT \u003d 20"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def create_workflow_execution_entry(wf_ex):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_0d270666","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":11},"updated":"2020-04-30 08:53:52.000000000","message":"I\u0027d suggest:\n\n* Separate this constant from LOG since LOG is more like an infrastructural thing, not related to the module logic\n* Call it something like \"ESTIMATED_TIME_QUERY_LIMIT\" to make it more clear for readers","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    with db_api.transaction():"},{"line_number":93,"context_line":"        wf_ex \u003d db_api.get_workflow_execution(wf_ex_id)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        entry \u003d create_workflow_execution_entry(wf_ex)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        max_depth \u003d filters[\u0027max_depth\u0027]"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_cd919e49","line":95,"range":{"start_line":95,"start_character":8,"end_line":95,"end_character":54},"updated":"2020-04-30 08:53:52.000000000","message":"When we generate a report in \"statistics-only\" mode we don\u0027t need to create report entries at all because this data is not going to be returned to the client. So I either suggest you create different methods for calculating stat or modify these methods (analyse_xxx) so they can work in this mode too). It will be especially important in case of huge workflow trees: if we do this properly, we won\u0027t increase the memory footprint of this API method (aka how much RAM the server side uses to handle an API request).","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    report \u003d resources.ExecutionReport()"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    stat \u003d resources.ExecutionReportStatistics()"},{"line_number":156,"context_line":"    stat.estimated_time_seconds \u003d estimate_time_for_execution(wf_ex_id)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    report.statistics \u003d stat"},{"line_number":159,"context_line":"    root_workflow_execution \u003d analyse_workflow_execution("}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_cdd51e1e","line":156,"range":{"start_line":156,"start_character":9,"end_line":156,"end_character":31},"updated":"2020-04-30 08:53:52.000000000","message":"I\u0027d probably just remove \"_seconds\", seconds is a usual unit we use everywhere.","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    stat.estimated_time_seconds \u003d estimate_time_for_execution(wf_ex_id)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    report.statistics \u003d stat"},{"line_number":159,"context_line":"    root_workflow_execution \u003d analyse_workflow_execution("},{"line_number":160,"context_line":"        wf_ex_id,"},{"line_number":161,"context_line":"        stat,"},{"line_number":162,"context_line":"        filters,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_8def96e7","line":159,"updated":"2020-04-30 08:53:52.000000000","message":"Add a blank line before the method call (line 159), it is semantically a different action.","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        filters,"},{"line_number":163,"context_line":"        0"},{"line_number":164,"context_line":"    )"},{"line_number":165,"context_line":"    if not filters[\u0027statistics_only\u0027]:"},{"line_number":166,"context_line":"        report.root_workflow_execution \u003d root_workflow_execution"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    return report"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_0db546ee","line":165,"updated":"2020-04-30 08:53:52.000000000","message":"Add a blank line before \"if\" (per guidelines).","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"}],"mistral/api/controllers/v2/resources.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":853,"context_line":"    error_tasks_count \u003d wtypes.IntegerType(minimum\u003d0)"},{"line_number":854,"context_line":"    idle_tasks_count \u003d wtypes.IntegerType(minimum\u003d0)"},{"line_number":855,"context_line":"    paused_tasks_count \u003d wtypes.IntegerType(minimum\u003d0)"},{"line_number":856,"context_line":"    estimated_time_seconds \u003d wtypes.IntegerType(minimum\u003d-1)"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"    def __init__(self, **kw):"},{"line_number":859,"context_line":"        self.total_tasks_count \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_ad0a52ce","line":856,"range":{"start_line":856,"start_character":4,"end_line":856,"end_character":26},"updated":"2020-04-30 08:53:52.000000000","message":"On line 865 it is referred to as \"estimated_time\".","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"}],"mistral/tests/unit/api/v2/test_execution_report.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def test_statistics_only(self):"},{"line_number":220,"context_line":"        wb_text \u003d \"\"\"---"},{"line_number":221,"context_line":"            version: \u00272.0\u0027"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"            name: wb"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"            workflows:"},{"line_number":226,"context_line":"              parent_wf:"},{"line_number":227,"context_line":"                tasks:"},{"line_number":228,"context_line":"                  task1:"},{"line_number":229,"context_line":"                    action: std.noop"},{"line_number":230,"context_line":"                    on-success: task2"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"                  task2:"},{"line_number":233,"context_line":"                    workflow: sub_wf"},{"line_number":234,"context_line":"                    on-success: task3"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"                  task3:"},{"line_number":237,"context_line":"                    action: std.fail"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"              sub_wf:"},{"line_number":240,"context_line":"                tasks:"},{"line_number":241,"context_line":"                  task1:"},{"line_number":242,"context_line":"                    action: std.noop"},{"line_number":243,"context_line":"                    on-success: task2"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"                  task2:"},{"line_number":246,"context_line":"                    action: std.fail"},{"line_number":247,"context_line":"            \"\"\""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        wb_service.create_workbook_v2(wb_text)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_8dc4b641","line":246,"range":{"start_line":221,"start_character":12,"end_line":246,"end_character":36},"updated":"2020-04-30 08:53:52.000000000","message":"The indentation can be reduced and made the same as for \"wb_text\".","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        resp \u003d self.app.get("},{"line_number":256,"context_line":"            \u0027/v2/executions/%s/report?statistics_only\u003dTrue\u0027 % wf_ex.id"},{"line_number":257,"context_line":"        )"},{"line_number":258,"context_line":"        print(resp.json)"},{"line_number":259,"context_line":"        self.assertEqual(200, resp.status_int)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        stat \u003d resp.json[\u0027statistics\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_8dab1673","line":258,"range":{"start_line":258,"start_character":8,"end_line":258,"end_character":24},"updated":"2020-04-30 08:53:52.000000000","message":"I guess this is a leftover that needs to be removed.","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def test_estimated_time(self):"},{"line_number":273,"context_line":"        wf_text \u003d \"\"\"---"},{"line_number":274,"context_line":"            version: \u00272.0\u0027"},{"line_number":275,"context_line":"            wf1:"},{"line_number":276,"context_line":"              tasks:"},{"line_number":277,"context_line":"                task1:"},{"line_number":278,"context_line":"                  action: std.sleep seconds\u003d2"},{"line_number":279,"context_line":"            \"\"\""},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        wf_service.create_workflows(wf_text)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_4dce2e63","line":278,"range":{"start_line":274,"start_character":12,"end_line":278,"end_character":45},"updated":"2020-04-30 08:53:52.000000000","message":"The indentation can be reduced and made the same as for \"wf_text\".","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"4b60b6dbc2abcda65fabd241b752743098074b93","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def test_estimated_time_no_previous_executions(self):"},{"line_number":299,"context_line":"        wf_text \u003d \"\"\"---"},{"line_number":300,"context_line":"                version: \u00272.0\u0027"},{"line_number":301,"context_line":"                wf1:"},{"line_number":302,"context_line":"                  tasks:"},{"line_number":303,"context_line":"                    task1:"},{"line_number":304,"context_line":"                      action: std.sleep seconds\u003d5"},{"line_number":305,"context_line":"                \"\"\""},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        wf_service.create_workflows(wf_text)"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_ade252d3","line":305,"range":{"start_line":300,"start_character":15,"end_line":305,"end_character":19},"updated":"2020-04-30 08:53:52.000000000","message":"Reduce the indentation please.","commit_id":"5f7fae12c3611522f30698c48f1cfc95187d6c2d"}]}
