)]}'
{"mistral/api/controllers/v2/workflow.py":[{"author":{"_account_id":15881,"name":"Limor Stotland","email":"limor.bortman@nokia.com","username":"LimorStotlamd"},"change_message_id":"890d9369a3523b0558fb36ea1eb457befa13431b","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    @wsme_pecan.wsexpose(Workflows, types.uuid, int, types.uniquelist,"},{"line_number":193,"context_line":"                         types.list, types.uniquelist)"},{"line_number":194,"context_line":"    def get_all(self, marker\u003dNone, limit\u003dNone, sort_keys\u003d\u0027created_at\u0027,"},{"line_number":195,"context_line":"                sort_dirs\u003d\u0027asc\u0027, fields\u003d\u0027\u0027):"},{"line_number":196,"context_line":"        \"\"\"Return a list of workflows."},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        :param marker: Optional. Pagination marker for large data sets."}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_fb03f40a","line":195,"updated":"2015-08-13 14:49:11.000000000","message":"if its a list why not put None as default?","commit_id":"939796e35c5256e853cef2eb7d5c71678f56075f"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"915cccb75e308570d2f6cb0511482e543fea09de","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    @wsme_pecan.wsexpose(Workflows, types.uuid, int, types.uniquelist,"},{"line_number":193,"context_line":"                         types.list, types.uniquelist)"},{"line_number":194,"context_line":"    def get_all(self, marker\u003dNone, limit\u003dNone, sort_keys\u003d\u0027created_at\u0027,"},{"line_number":195,"context_line":"                sort_dirs\u003d\u0027asc\u0027, fields\u003d\u0027\u0027):"},{"line_number":196,"context_line":"        \"\"\"Return a list of workflows."},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        :param marker: Optional. Pagination marker for large data sets."}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_42fc5872","line":195,"in_reply_to":"1a4dcd0f_fb03f40a","updated":"2015-08-14 07:48:59.000000000","message":"Hi, Limor, actually, \u0027fields\u0027 itself as a param is not a list, it will be tranformed to a list. \u0027\u0027 or None are both ok here. \n\nHowever, if it\u0027s provided, it should be, for example, fields\u003d\u0027id,name\u0027, so I prefer \u0027\u0027 here.","commit_id":"939796e35c5256e853cef2eb7d5c71678f56075f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3acc188b12c40387e7ab794640bf99fee3116f47","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            if hasattr(e, key):"},{"line_number":73,"context_line":"                setattr(e, key, val)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if \u0027spec\u0027 in d:"},{"line_number":76,"context_line":"            input \u003d d.get(\u0027spec\u0027, {}).get(\u0027input\u0027, [])"},{"line_number":77,"context_line":"            for param in input:"},{"line_number":78,"context_line":"                if isinstance(param, dict):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_5b41500a","line":75,"updated":"2015-08-25 06:05:54.000000000","message":"What is this check for?","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3513ae571534d4b74b7de88ac2852e8f09f3cf7e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            if hasattr(e, key):"},{"line_number":73,"context_line":"                setattr(e, key, val)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if \u0027spec\u0027 in d:"},{"line_number":76,"context_line":"            input \u003d d.get(\u0027spec\u0027, {}).get(\u0027input\u0027, [])"},{"line_number":77,"context_line":"            for param in input:"},{"line_number":78,"context_line":"                if isinstance(param, dict):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_74122164","line":75,"in_reply_to":"fa1b9901_5b41500a","updated":"2015-08-25 08:00:49.000000000","message":"if \u0027input\u0027 in not included in fields, it should not be set value(even it\u0027s empty string), we should keep it as \u0027wtypes.Unset\u0027. Please see WORKFLOW_COL_MAPPING in db/v2/sqlalchemy/api.py","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3acc188b12c40387e7ab794640bf99fee3116f47","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                          sort_keys, \"asc\" or \"desc\" can be choosed."},{"line_number":192,"context_line":"                          Default: asc."},{"line_number":193,"context_line":"        :param fields: Optional. A specified list of fields of the resource to"},{"line_number":194,"context_line":"                       be returned. If it\u0027s provided, \u0027id\u0027 will be added in."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        Where project_id is the same as the requester or"},{"line_number":197,"context_line":"        project_id is different but the scope is public."}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_1b21984d","line":194,"updated":"2015-08-25 06:05:54.000000000","message":"Can you explain this comment about \u0027id\u0027? What does filtering have to do with \u0027id\u0027 field?","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3513ae571534d4b74b7de88ac2852e8f09f3cf7e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                          sort_keys, \"asc\" or \"desc\" can be choosed."},{"line_number":192,"context_line":"                          Default: asc."},{"line_number":193,"context_line":"        :param fields: Optional. A specified list of fields of the resource to"},{"line_number":194,"context_line":"                       be returned. If it\u0027s provided, \u0027id\u0027 will be added in."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        Where project_id is the same as the requester or"},{"line_number":197,"context_line":"        project_id is different but the scope is public."}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_94ea55ab","line":194,"in_reply_to":"fa1b9901_1b21984d","updated":"2015-08-25 08:00:49.000000000","message":"Done","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3acc188b12c40387e7ab794640bf99fee3116f47","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            fields\u003dfields"},{"line_number":222,"context_line":"        )"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        if fields:"},{"line_number":225,"context_line":"            workflows_list \u003d ["},{"line_number":226,"context_line":"                Workflow.from_dict(dict(zip(fields, column_data)))"},{"line_number":227,"context_line":"                for column_data in db_workflows"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_bb8bcc1d","line":224,"updated":"2015-08-25 06:05:54.000000000","message":"I suggest you rewrite this construction so that workflow_list is calculated once. The only thing that varies here is the inner part of list generator (\u0027Workflow.from_dict(dict(zip(fields, column_data)))\u0027 versus \u0027Workflow.from_dict(db_model.to_dict())\u0027)","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"}],"mistral/db/v2/sqlalchemy/api.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3acc188b12c40387e7ab794640bf99fee3116f47","unresolved":false,"context_lines":[{"line_number":235,"context_line":"# Workflow definitions."},{"line_number":236,"context_line":""},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"WORKFLOW_COL_MAPPING \u003d {"},{"line_number":239,"context_line":"    \u0027id\u0027: models.WorkflowDefinition.id,"},{"line_number":240,"context_line":"    \u0027name\u0027: models.WorkflowDefinition.name,"},{"line_number":241,"context_line":"    \u0027input\u0027: models.WorkflowDefinition.spec,"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_c8f1146c","line":238,"updated":"2015-08-25 06:05:54.000000000","message":"Just wondering can we not have this mapping and instead calculate references by just concatenating \u0027models.WorkflowDefinition.\u0027 with a field name.\n\nDon\u0027t know exactly but pls think about it. My concern is that it\u0027s just another piece of seemingly unnecessary code and a source of possible mistakes.","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3513ae571534d4b74b7de88ac2852e8f09f3cf7e","unresolved":false,"context_lines":[{"line_number":235,"context_line":"# Workflow definitions."},{"line_number":236,"context_line":""},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"WORKFLOW_COL_MAPPING \u003d {"},{"line_number":239,"context_line":"    \u0027id\u0027: models.WorkflowDefinition.id,"},{"line_number":240,"context_line":"    \u0027name\u0027: models.WorkflowDefinition.name,"},{"line_number":241,"context_line":"    \u0027input\u0027: models.WorkflowDefinition.spec,"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_6f824a02","line":238,"in_reply_to":"fa1b9901_c8f1146c","updated":"2015-08-25 08:00:49.000000000","message":"Yes, I have pondered the implementation here when I\u0027m writing code, the mapping is used for avoiding the differences between resource names and database columns(\u0027input\u0027 is an example).","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3acc188b12c40387e7ab794640bf99fee3116f47","unresolved":false,"context_lines":[{"line_number":238,"context_line":"WORKFLOW_COL_MAPPING \u003d {"},{"line_number":239,"context_line":"    \u0027id\u0027: models.WorkflowDefinition.id,"},{"line_number":240,"context_line":"    \u0027name\u0027: models.WorkflowDefinition.name,"},{"line_number":241,"context_line":"    \u0027input\u0027: models.WorkflowDefinition.spec,"},{"line_number":242,"context_line":"    \u0027definition\u0027: models.WorkflowDefinition.definition,"},{"line_number":243,"context_line":"    \u0027tags\u0027: models.WorkflowDefinition.tags,"},{"line_number":244,"context_line":"    \u0027scope\u0027: models.WorkflowDefinition.scope,"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_28f9b080","line":241,"updated":"2015-08-25 06:05:54.000000000","message":"\u0027spec\u0027 -\u003e \u0027input\u0027","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3513ae571534d4b74b7de88ac2852e8f09f3cf7e","unresolved":false,"context_lines":[{"line_number":238,"context_line":"WORKFLOW_COL_MAPPING \u003d {"},{"line_number":239,"context_line":"    \u0027id\u0027: models.WorkflowDefinition.id,"},{"line_number":240,"context_line":"    \u0027name\u0027: models.WorkflowDefinition.name,"},{"line_number":241,"context_line":"    \u0027input\u0027: models.WorkflowDefinition.spec,"},{"line_number":242,"context_line":"    \u0027definition\u0027: models.WorkflowDefinition.definition,"},{"line_number":243,"context_line":"    \u0027tags\u0027: models.WorkflowDefinition.tags,"},{"line_number":244,"context_line":"    \u0027scope\u0027: models.WorkflowDefinition.scope,"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_8fe0fefb","line":241,"in_reply_to":"fa1b9901_28f9b080","updated":"2015-08-25 08:00:49.000000000","message":"renat, \u0027input\u0027 is workflow resource key(see https://github.com/openstack/mistral/blob/master/mistral/api/controllers/v2/workflow.py#L43), but it\u0027s not database column. We need to query \u0027spec\u0027 column if we want to get \u0027input\u0027 value(see https://github.com/openstack/mistral/blob/master/mistral/api/controllers/v2/workflow.py#L83)","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3acc188b12c40387e7ab794640bf99fee3116f47","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    return _get_workflow_definition(name)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"# NOTE(xylan): We just leave filter param here for future usage"},{"line_number":277,"context_line":"def get_workflow_definitions(filters\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":278,"context_line":"                             sort_keys\u003dNone, sort_dirs\u003dNone, fields\u003dNone,"},{"line_number":279,"context_line":"                             **kwargs):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_288a10c0","line":276,"updated":"2015-08-25 06:05:54.000000000","message":"This comment is not relevant anymore. Right?","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3513ae571534d4b74b7de88ac2852e8f09f3cf7e","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    return _get_workflow_definition(name)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"# NOTE(xylan): We just leave filter param here for future usage"},{"line_number":277,"context_line":"def get_workflow_definitions(filters\u003dNone, limit\u003dNone, marker\u003dNone,"},{"line_number":278,"context_line":"                             sort_keys\u003dNone, sort_dirs\u003dNone, fields\u003dNone,"},{"line_number":279,"context_line":"                             **kwargs):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_af82a250","line":276,"in_reply_to":"fa1b9901_288a10c0","updated":"2015-08-25 08:00:49.000000000","message":"Done","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"}],"mistral/utils/rest_utils.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3acc188b12c40387e7ab794640bf99fee3116f47","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                                      \"or \u0027asc\u0027\")"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def check_for_invalid_fields(fields, object_fields):"},{"line_number":73,"context_line":"    \"\"\"Check for requested non-existent fields."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Check if the user requested non-existent fields."}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_bb850c5a","line":72,"updated":"2015-08-25 06:05:54.000000000","message":"Naming suggestion:\n\"check_for_invalid_fields\" -\u003e \"validate_fields\" (just shorter)\n\"fields\" -\u003e \"actual_fields\"\n\"object_fields\" -\u003e \"valid_fields\" | \"all_fields\"","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3513ae571534d4b74b7de88ac2852e8f09f3cf7e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                                      \"or \u0027asc\u0027\")"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"def check_for_invalid_fields(fields, object_fields):"},{"line_number":73,"context_line":"    \"\"\"Check for requested non-existent fields."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Check if the user requested non-existent fields."}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_2f3bf2d2","line":72,"in_reply_to":"fa1b9901_bb850c5a","updated":"2015-08-25 08:00:49.000000000","message":"Done","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3acc188b12c40387e7ab794640bf99fee3116f47","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Check if the user requested non-existent fields."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    :param fields: A list of fields requested by the user"},{"line_number":78,"context_line":"    :param object_fields: A list of fields supported by the object."},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":"    if not fields:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_883ebcd8","line":77,"updated":"2015-08-25 06:05:54.000000000","message":"Add a period at the end.","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3513ae571534d4b74b7de88ac2852e8f09f3cf7e","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Check if the user requested non-existent fields."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    :param fields: A list of fields requested by the user"},{"line_number":78,"context_line":"    :param object_fields: A list of fields supported by the object."},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":"    if not fields:"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_4f3666e8","line":77,"in_reply_to":"fa1b9901_883ebcd8","updated":"2015-08-25 08:00:49.000000000","message":"Done","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"3acc188b12c40387e7ab794640bf99fee3116f47","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    if invalid_fields:"},{"line_number":86,"context_line":"        raise exc.ClientSideError("},{"line_number":87,"context_line":"            \u0027Field(s) %s are not valid\u0027 % \u0027, \u0027.join(invalid_fields)"},{"line_number":88,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_7b7f7466","line":87,"updated":"2015-08-25 06:05:54.000000000","message":"\"are not valid\" -\u003e \"invalid\"","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"3513ae571534d4b74b7de88ac2852e8f09f3cf7e","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    if invalid_fields:"},{"line_number":86,"context_line":"        raise exc.ClientSideError("},{"line_number":87,"context_line":"            \u0027Field(s) %s are not valid\u0027 % \u0027, \u0027.join(invalid_fields)"},{"line_number":88,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_ef4bba57","line":87,"in_reply_to":"fa1b9901_7b7f7466","updated":"2015-08-25 08:00:49.000000000","message":"Done","commit_id":"4da9efa56da07f879e138850cb4695adebb70e22"}]}
