)]}'
{"mistral/api/controllers/v2/workflow.py":[{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"0f392fda11d67232dd09bb30a6855cb2858d8832","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    @rest_utils.wrap_pecan_controller_exception"},{"line_number":134,"context_line":"    @pecan.expose(content_type\u003d\"text/plain\")"},{"line_number":135,"context_line":"    def put(self, identifier\u003d\u0027\u0027):"},{"line_number":136,"context_line":"        \"\"\"Update one or more workflows."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        :param identifier: Optional. If provided, it\u0027s UUID of a workflow."}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_9541363c","line":135,"updated":"2015-12-15 01:51:03.000000000","message":"identifier\u003dNone won\u0027t work here? If this is pecan specific, can we keep identifier\u003d\u0027\u0027 here but use identifier\u003dNone in underlying methods?","commit_id":"2e0538fb3ac510d0531a55615f26258c6c8875e0"}],"mistral/db/v2/sqlalchemy/api.py":[{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"9972c964e22b03f429bad3a85f3bcc5d8c7d468a","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    if not wf_def:"},{"line_number":325,"context_line":"        raise exc.NotFoundException("},{"line_number":326,"context_line":"            \"Workflow not found [workflow_identifier\u003d%s]\" %"},{"line_number":327,"context_line":"            (identifier or name)"},{"line_number":328,"context_line":"        )"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_b0de1b6b","line":326,"updated":"2015-12-13 09:43:29.000000000","message":"Code is good, but I think it\u0027s better to give message like\n\"Workflow not found [workflow\u003d%s]\" %","commit_id":"0f8428b8aae47ad0abbc737a9c2db417fe0897f4"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"2eef502ddba54203450f5240dfb58569f96da2aa","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    if not wf_def:"},{"line_number":325,"context_line":"        raise exc.NotFoundException("},{"line_number":326,"context_line":"            \"Workflow not found [workflow_identifier\u003d%s]\" %"},{"line_number":327,"context_line":"            (identifier or name)"},{"line_number":328,"context_line":"        )"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_305f8be6","line":326,"in_reply_to":"7a740942_b0de1b6b","updated":"2015-12-13 09:48:13.000000000","message":"Hi, wangzhh, thanks for the advise, but IMHO, ``[workflow\u003d%s]`` will be perceived as the whole workflow definition, rather than the workflow name or workflow uuid.","commit_id":"0f8428b8aae47ad0abbc737a9c2db417fe0897f4"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"0f392fda11d67232dd09bb30a6855cb2858d8832","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"@b.session_aware()"},{"line_number":329,"context_line":"def update_workflow_definition(name, values, identifier\u003d\u0027\u0027, session\u003dNone):"},{"line_number":330,"context_line":"    wf_def \u003d (_get_workflow_definition_by_id(identifier) if"},{"line_number":331,"context_line":"              identifier else _get_workflow_definition(name))"},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_15ba26e2","line":329,"updated":"2015-12-15 01:51:03.000000000","message":"How about the following? \n\ndef update_workflow_definition(identifier, values, session\u003dNone) and let get_workflow_definition determine if identifier is UUID or name?","commit_id":"2e0538fb3ac510d0531a55615f26258c6c8875e0"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"7e6b9f3103baecc98515245e87b1a8c4e2c195b4","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"@b.session_aware()"},{"line_number":329,"context_line":"def update_workflow_definition(name, values, identifier\u003d\u0027\u0027, session\u003dNone):"},{"line_number":330,"context_line":"    wf_def \u003d (_get_workflow_definition_by_id(identifier) if"},{"line_number":331,"context_line":"              identifier else _get_workflow_definition(name))"},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_d8484e30","line":329,"in_reply_to":"5a710552_15ba26e2","updated":"2015-12-15 04:57:36.000000000","message":"good idea, winson!","commit_id":"2e0538fb3ac510d0531a55615f26258c6c8875e0"},{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"0f392fda11d67232dd09bb30a6855cb2858d8832","unresolved":false,"context_lines":[{"line_number":328,"context_line":"@b.session_aware()"},{"line_number":329,"context_line":"def update_workflow_definition(name, values, identifier\u003d\u0027\u0027, session\u003dNone):"},{"line_number":330,"context_line":"    wf_def \u003d (_get_workflow_definition_by_id(identifier) if"},{"line_number":331,"context_line":"              identifier else _get_workflow_definition(name))"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    if not wf_def:"},{"line_number":334,"context_line":"        raise exc.NotFoundException("}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_953a96cc","line":331,"updated":"2015-12-15 01:51:03.000000000","message":"Can we push this logic to get_workflow_definition or _get_workflow_definition so we don\u0027t have to duplicate this whenever we get a workflow definition?","commit_id":"2e0538fb3ac510d0531a55615f26258c6c8875e0"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"7e6b9f3103baecc98515245e87b1a8c4e2c195b4","unresolved":false,"context_lines":[{"line_number":328,"context_line":"@b.session_aware()"},{"line_number":329,"context_line":"def update_workflow_definition(name, values, identifier\u003d\u0027\u0027, session\u003dNone):"},{"line_number":330,"context_line":"    wf_def \u003d (_get_workflow_definition_by_id(identifier) if"},{"line_number":331,"context_line":"              identifier else _get_workflow_definition(name))"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    if not wf_def:"},{"line_number":334,"context_line":"        raise exc.NotFoundException("}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_385e32ea","line":331,"in_reply_to":"5a710552_953a96cc","updated":"2015-12-15 04:57:36.000000000","message":"yes, i have already refactored in get_workflow_definition function, and can reues that. Thanks!","commit_id":"2e0538fb3ac510d0531a55615f26258c6c8875e0"},{"author":{"_account_id":8592,"name":"Anastasia Kuznetsova","email":"akuznetsova@mirantis.com","username":"nastya-kuz"},"change_message_id":"3d39410847d3265383e3eda3bf9345b5ddd9b335","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"@b.session_aware()"},{"line_number":329,"context_line":"def update_workflow_definition(identifier, values, session\u003dNone):"},{"line_number":330,"context_line":"    wf_def \u003d get_workflow_definition(identifier)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    if wf_def.project_id !\u003d security.get_project_id():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_96035e73","line":329,"range":{"start_line":329,"start_character":63,"end_line":329,"end_character":65},"updated":"2015-12-17 11:41:32.000000000","message":"In all other methods you pass identifier as the last argument, can we do it here too? especially because now this argument is not required:\n\ndef update_workflow_definition(values, identifier\u003dNone, session\u003dNone):\n   if not identifier:\n       identifier\u003dvalues[\"name\"]","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fd52df3297bc155f554bebab7879187fe5b5b3e9","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"@b.session_aware()"},{"line_number":329,"context_line":"def update_workflow_definition(identifier, values, session\u003dNone):"},{"line_number":330,"context_line":"    wf_def \u003d get_workflow_definition(identifier)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    if wf_def.project_id !\u003d security.get_project_id():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_4949d830","line":329,"range":{"start_line":329,"start_character":63,"end_line":329,"end_character":65},"in_reply_to":"3a7e1126_96035e73","updated":"2015-12-17 12:22:45.000000000","message":"I actually think that \"identifier\" should be always the first parameter, if it\u0027s possible. Not sure where you saw it when it\u0027s not the first one. \"name\" which used to play the role of identifier previously always goes first.","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"},{"author":{"_account_id":8592,"name":"Anastasia Kuznetsova","email":"akuznetsova@mirantis.com","username":"nastya-kuz"},"change_message_id":"3d39410847d3265383e3eda3bf9345b5ddd9b335","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    if wf_def.project_id !\u003d security.get_project_id():"},{"line_number":333,"context_line":"        raise exc.NotAllowedException("},{"line_number":334,"context_line":"            \"Can not update workflow of other tenants. \""},{"line_number":335,"context_line":"            \"[workflow_identifier\u003d%s]\" % identifier"},{"line_number":336,"context_line":"        )"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_0207301d","line":334,"range":{"start_line":334,"start_character":53,"end_line":334,"end_character":54},"updated":"2015-12-17 11:41:32.000000000","message":"Do we really need dot here ?","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fd52df3297bc155f554bebab7879187fe5b5b3e9","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    if wf_def.project_id !\u003d security.get_project_id():"},{"line_number":333,"context_line":"        raise exc.NotAllowedException("},{"line_number":334,"context_line":"            \"Can not update workflow of other tenants. \""},{"line_number":335,"context_line":"            \"[workflow_identifier\u003d%s]\" % identifier"},{"line_number":336,"context_line":"        )"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_e903e4b6","line":334,"range":{"start_line":334,"start_character":53,"end_line":334,"end_character":54},"in_reply_to":"3a7e1126_0207301d","updated":"2015-12-17 12:22:45.000000000","message":"And what if it\u0027s public?","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"cdc6d4e9885c79c86921f67e5f548bc8a200a085","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    if wf_def.project_id !\u003d security.get_project_id():"},{"line_number":333,"context_line":"        raise exc.NotAllowedException("},{"line_number":334,"context_line":"            \"Can not update workflow of other tenants. \""},{"line_number":335,"context_line":"            \"[workflow_identifier\u003d%s]\" % identifier"},{"line_number":336,"context_line":"        )"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_034619bf","line":334,"range":{"start_line":334,"start_character":53,"end_line":334,"end_character":54},"in_reply_to":"3a7e1126_0207301d","updated":"2015-12-18 05:21:23.000000000","message":"I think \u0027yes\u0027, for messages exposed to end users, it should be a complete sentence, the following content in brackets is for debugging.","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"cdc6d4e9885c79c86921f67e5f548bc8a200a085","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    if wf_def.project_id !\u003d security.get_project_id():"},{"line_number":333,"context_line":"        raise exc.NotAllowedException("},{"line_number":334,"context_line":"            \"Can not update workflow of other tenants. \""},{"line_number":335,"context_line":"            \"[workflow_identifier\u003d%s]\" % identifier"},{"line_number":336,"context_line":"        )"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_c38c9137","line":334,"range":{"start_line":334,"start_character":53,"end_line":334,"end_character":54},"in_reply_to":"3a7e1126_e903e4b6","updated":"2015-12-18 05:21:23.000000000","message":"For workflows of public scope, other tenants can only see and use those workflows, only workflow owners have the privilege for updating. This is also a constraint in workflow sharing feature.","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"}],"mistral/services/workflows.py":[{"author":{"_account_id":5558,"name":"Winson Chan","email":"wcchan@stackstorm.com","username":"winson-c-chan"},"change_message_id":"0f392fda11d67232dd09bb30a6855cb2858d8832","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    if identifier and len(wfs) \u003e 1:"},{"line_number":86,"context_line":"        raise exc.InputException("},{"line_number":87,"context_line":"            \"More than one workflows are provided for update.\""},{"line_number":88,"context_line":"        )"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    db_wfs \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_152c6649","line":87,"updated":"2015-12-15 01:51:03.000000000","message":"Can the error message be specific that more than one workflows are not supported because identifier is provided?","commit_id":"2e0538fb3ac510d0531a55615f26258c6c8875e0"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"7e6b9f3103baecc98515245e87b1a8c4e2c195b4","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    if identifier and len(wfs) \u003e 1:"},{"line_number":86,"context_line":"        raise exc.InputException("},{"line_number":87,"context_line":"            \"More than one workflows are provided for update.\""},{"line_number":88,"context_line":"        )"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    db_wfs \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_580a1ed4","line":87,"in_reply_to":"5a710552_152c6649","updated":"2015-12-15 04:57:36.000000000","message":"Done","commit_id":"2e0538fb3ac510d0531a55615f26258c6c8875e0"}],"mistral/tests/unit/api/v2/test_workflows.py":[{"author":{"_account_id":8592,"name":"Anastasia Kuznetsova","email":"akuznetsova@mirantis.com","username":"nastya-kuz"},"change_message_id":"3d39410847d3265383e3eda3bf9345b5ddd9b335","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            headers\u003d{\u0027Content-Type\u0027: \u0027text/plain\u0027}"},{"line_number":222,"context_line":"        )"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        self.maxDiff \u003d None"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        self.assertEqual(200, resp.status_int)"},{"line_number":227,"context_line":"        update_mock.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_02dc1011","line":224,"updated":"2015-12-17 11:41:32.000000000","message":"Please, remove this from code","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fd52df3297bc155f554bebab7879187fe5b5b3e9","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            headers\u003d{\u0027Content-Type\u0027: \u0027text/plain\u0027}"},{"line_number":222,"context_line":"        )"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        self.maxDiff \u003d None"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        self.assertEqual(200, resp.status_int)"},{"line_number":227,"context_line":"        update_mock.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_e9f1a4ce","line":224,"in_reply_to":"3a7e1126_02dc1011","updated":"2015-12-17 12:22:45.000000000","message":"agree","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"}],"mistral/tests/unit/db/v2/test_sqlalchemy_db_api.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"fd52df3297bc155f554bebab7879187fe5b5b3e9","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        self.assertEqual(updated, fetched)"},{"line_number":285,"context_line":"        self.assertIsNotNone(fetched.updated_at)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def test_update_other_project_workflow_definition(self):"},{"line_number":288,"context_line":"        created \u003d db_api.create_workflow_definition(WF_DEFINITIONS[0])"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        # Switch to another project."}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_e9ad2489","line":287,"range":{"start_line":287,"start_character":8,"end_line":287,"end_character":53},"updated":"2015-12-17 12:22:45.000000000","message":"This test is not the main test that should actually be here. This change is about changing semantics of update operation for DB workflow object. We need to test that we can use both id and name and it has the same effect. Such test must be here, not in API layer.","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"},{"author":{"_account_id":6732,"name":"Lingxian Kong","email":"anlin.kong@gmail.com","username":"kong"},"change_message_id":"cdc6d4e9885c79c86921f67e5f548bc8a200a085","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        self.assertEqual(updated, fetched)"},{"line_number":285,"context_line":"        self.assertIsNotNone(fetched.updated_at)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def test_update_other_project_workflow_definition(self):"},{"line_number":288,"context_line":"        created \u003d db_api.create_workflow_definition(WF_DEFINITIONS[0])"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        # Switch to another project."}],"source_content_type":"text/x-python","patch_set":6,"id":"3a7e1126_5e6e3602","line":287,"range":{"start_line":287,"start_character":8,"end_line":287,"end_character":53},"in_reply_to":"3a7e1126_e9ad2489","updated":"2015-12-18 05:21:23.000000000","message":"Done","commit_id":"dd00324eb54a8b03281725312a80cf5921b14dc2"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5f03619a1ccd173ed017b09a25413a3e7d7a6aa0","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        # Update workflow using workflow name as identifier."},{"line_number":282,"context_line":"        updated \u003d db_api.update_workflow_definition("},{"line_number":283,"context_line":"            created[\u0027name\u0027],"},{"line_number":284,"context_line":"            {\u0027definition\u0027: \u0027my new definition\u0027}"},{"line_number":285,"context_line":"        )"},{"line_number":286,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_ad156440","line":283,"range":{"start_line":283,"start_character":19,"end_line":283,"end_character":21},"updated":"2015-12-21 07:34:44.000000000","message":"Soft: No need to use [] here. The returned is a regular object.","commit_id":"b468b9f5241c277c9af713ebaa750b82207e03e4"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"5f03619a1ccd173ed017b09a25413a3e7d7a6aa0","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        # Update workflow using workflow uuid as identifier."},{"line_number":295,"context_line":"        updated \u003d db_api.update_workflow_definition("},{"line_number":296,"context_line":"            created[\u0027id\u0027],"},{"line_number":297,"context_line":"            {\u0027name\u0027: \u0027updated_name\u0027, \u0027definition\u0027: \u0027my new definition\u0027}"},{"line_number":298,"context_line":"        )"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a7e1126_6d1bfc73","line":296,"range":{"start_line":296,"start_character":23,"end_line":296,"end_character":26},"updated":"2015-12-21 07:34:44.000000000","message":"Same here.","commit_id":"b468b9f5241c277c9af713ebaa750b82207e03e4"}]}
