)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"884111e21d5e524f29c85d2db29d960c9526d0da","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Artem Lapin \u003carteom.lap@yandex.ru\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-10-16 11:40:38 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added additional check for workflow name to"},{"line_number":8,"context_line":"prevent creation workflows with spaces in"},{"line_number":9,"context_line":"name"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: If52bd09f9178a1d6f2b0d476a43b25daa26a03be"},{"line_number":12,"context_line":"Closes-Bug: 1848037"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_ca93404e","line":9,"range":{"start_line":7,"start_character":0,"end_line":9,"end_character":4},"updated":"2019-10-16 08:58:30.000000000","message":"Please look at how commit messages of other patches are formatted. The first summary line must be short (ideally within 80 chars) and concisely express what this patch does. Then, after a blank line, you can write a detailed description.","commit_id":"fdb4394837f10b2ff16244001b38c0fae9d1f297"}],"mistral/db/v2/sqlalchemy/models.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"884111e21d5e524f29c85d2db29d960c9526d0da","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            raise exc.SizeLimitExceededException(msg)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def validate_name_has_no_spaces(value):"},{"line_number":86,"context_line":"    \"\"\"Makes sure name does not contain spaces.\"\"\""},{"line_number":87,"context_line":"    if value:"},{"line_number":88,"context_line":"        if \" \" in value:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_2acd3465","line":85,"range":{"start_line":85,"start_character":32,"end_line":85,"end_character":37},"updated":"2019-10-16 08:58:30.000000000","message":"I think it should be \"name\", not \"value\", because \"name\" resides in the name of the method. Or you can use a more generic name of the method like \"validate_no_spaces(value)\". But then you\u0027ll have to avoid using \"name\" in the method body (including comments).\n\nSo please make it all consistent.","commit_id":"fdb4394837f10b2ff16244001b38c0fae9d1f297"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"884111e21d5e524f29c85d2db29d960c9526d0da","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    if value:"},{"line_number":88,"context_line":"        if \" \" in value:"},{"line_number":89,"context_line":"            msg \u003d ("},{"line_number":90,"context_line":"                \"Name \u0027{}\u0027 should not contain spaces\""},{"line_number":91,"context_line":"            ).format("},{"line_number":92,"context_line":"                value"},{"line_number":93,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_4acd105b","line":90,"range":{"start_line":90,"start_character":27,"end_line":90,"end_character":33},"updated":"2019-10-16 08:58:30.000000000","message":"-\u003e must","commit_id":"fdb4394837f10b2ff16244001b38c0fae9d1f297"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"884111e21d5e524f29c85d2db29d960c9526d0da","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        if \" \" in value:"},{"line_number":89,"context_line":"            msg \u003d ("},{"line_number":90,"context_line":"                \"Name \u0027{}\u0027 should not contain spaces\""},{"line_number":91,"context_line":"            ).format("},{"line_number":92,"context_line":"                value"},{"line_number":93,"context_line":"            )"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"            LOG.error(msg)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_6ae48ce0","line":93,"range":{"start_line":91,"start_character":14,"end_line":93,"end_character":13},"updated":"2019-10-16 08:58:30.000000000","message":"could be just .format(value)","commit_id":"fdb4394837f10b2ff16244001b38c0fae9d1f297"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"884111e21d5e524f29c85d2db29d960c9526d0da","unresolved":false,"context_lines":[{"line_number":115,"context_line":"def register_name_validator():"},{"line_number":116,"context_line":"    \"\"\"Register an event listener on the attribute."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    This event listener will validate that name does not contains"},{"line_number":119,"context_line":"    spaces every time a \u0027set\u0027 occurs."},{"line_number":120,"context_line":"    \"\"\""},{"line_number":121,"context_line":"    for cls in utils.iter_subclasses(Definition):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_2afbf478","line":118,"range":{"start_line":118,"start_character":43,"end_line":118,"end_character":47},"updated":"2019-10-16 08:58:30.000000000","message":"Maybe something like \"names of objects don\u0027t contain...\" because otherwise, it\u0027s not clear what it is about.","commit_id":"fdb4394837f10b2ff16244001b38c0fae9d1f297"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"884111e21d5e524f29c85d2db29d960c9526d0da","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    spaces every time a \u0027set\u0027 occurs."},{"line_number":120,"context_line":"    \"\"\""},{"line_number":121,"context_line":"    for cls in utils.iter_subclasses(Definition):"},{"line_number":122,"context_line":"        if hasattr(cls, \"name\"):"},{"line_number":123,"context_line":"            event.listen("},{"line_number":124,"context_line":"                getattr(cls, \"name\"),"},{"line_number":125,"context_line":"                \u0027set\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_2a40d4a4","line":122,"range":{"start_line":122,"start_character":8,"end_line":122,"end_character":32},"updated":"2019-10-16 08:58:30.000000000","message":"This condition is redundant. The base class Definition already has this field.","commit_id":"fdb4394837f10b2ff16244001b38c0fae9d1f297"},{"author":{"_account_id":26693,"name":"do3meli","email":"info@dominicschlegel.ch","username":"do3meli"},"change_message_id":"ec434a2705a022530554a47906079bb22bdb000c","unresolved":false,"context_lines":[{"line_number":113,"context_line":"def register_name_validator():"},{"line_number":114,"context_line":"    \"\"\"Register an event listener on the attribute."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    This event listener will validate that name of object does not "},{"line_number":117,"context_line":"\tcontains spaces every time a \u0027set\u0027 occurs."},{"line_number":118,"context_line":"    \"\"\""},{"line_number":119,"context_line":"    for cls in utils.iter_subclasses(Definition):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_fdfa84b7","line":116,"range":{"start_line":116,"start_character":66,"end_line":116,"end_character":67},"updated":"2019-10-16 09:37:29.000000000","message":"there is a space at the end of the line","commit_id":"85b81157d908ffda10da6ef9dfe20b4142fd1534"},{"author":{"_account_id":26693,"name":"do3meli","email":"info@dominicschlegel.ch","username":"do3meli"},"change_message_id":"fdfa79163197b267f88566547294fc48693f2524","unresolved":false,"context_lines":[{"line_number":113,"context_line":"def register_name_validator():"},{"line_number":114,"context_line":"    \"\"\"Register an event listener on the attribute."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    This event listener will validate that name of object does not "},{"line_number":117,"context_line":"\tcontains spaces every time a \u0027set\u0027 occurs."},{"line_number":118,"context_line":"    \"\"\""},{"line_number":119,"context_line":"    for cls in utils.iter_subclasses(Definition):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_1de8c0df","line":116,"range":{"start_line":116,"start_character":66,"end_line":116,"end_character":67},"updated":"2019-10-16 09:38:18.000000000","message":"there is a space at the line ending","commit_id":"c66163873ad83b91b686e510a0729e9b1a8a2393"}],"mistral/tests/unit/engine/test_names_validation.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"884111e21d5e524f29c85d2db29d960c9526d0da","unresolved":false,"context_lines":[{"line_number":1,"context_line":"from oslo_config import cfg"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"from mistral import exceptions as exc"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_0a1ab8c4","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":2},"updated":"2019-10-16 08:58:30.000000000","message":"We always put a copyright text first, just copy it from any file.","commit_id":"fdb4394837f10b2ff16244001b38c0fae9d1f297"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"884111e21d5e524f29c85d2db29d960c9526d0da","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# the change in value is not permanent."},{"line_number":11,"context_line":"cfg.CONF.set_default(\u0027auth_enable\u0027, False, group\u003d\u0027pecan\u0027)"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"WF1 \u003d \"\"\""},{"line_number":14,"context_line":"---"},{"line_number":15,"context_line":"version: \u00272.0\u0027"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"wf name with space:"},{"line_number":18,"context_line":"  tasks:"},{"line_number":19,"context_line":"    t1:"},{"line_number":20,"context_line":"      action: a1"},{"line_number":21,"context_line":"\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class NameValidationTests(base.EngineTestCase):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_ea739c14","line":21,"range":{"start_line":13,"start_character":0,"end_line":21,"end_character":3},"updated":"2019-10-16 08:58:30.000000000","message":"I would put this text into the method body. Yes, sometimes we use global variables but only if a workflow text is used in several tests. Otherwise, it\u0027s harder to read and navigate.","commit_id":"fdb4394837f10b2ff16244001b38c0fae9d1f297"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"884111e21d5e524f29c85d2db29d960c9526d0da","unresolved":false,"context_lines":[{"line_number":21,"context_line":"\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class NameValidationTests(base.EngineTestCase):"},{"line_number":25,"context_line":"    def test_workflow_name_validation(self):"},{"line_number":26,"context_line":"        e \u003d self.assertRaises("},{"line_number":27,"context_line":"            exc.InvalidModelException,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_2a29b4e4","line":24,"range":{"start_line":24,"start_character":20,"end_line":24,"end_character":25},"updated":"2019-10-16 08:58:30.000000000","message":"Please use singular \"Test\".","commit_id":"fdb4394837f10b2ff16244001b38c0fae9d1f297"},{"author":{"_account_id":26693,"name":"do3meli","email":"info@dominicschlegel.ch","username":"do3meli"},"change_message_id":"0ed2a55bb35eccaa3c0dee383aeb0c5309cf570c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"cfg.CONF.set_default(\u0027auth_enable\u0027, False, group\u003d\u0027pecan\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class NameValidationTest(base.EngineTestCase):"},{"line_number":29,"context_line":"    def test_workflow_name_validation(self):"},{"line_number":30,"context_line":"        wf \u003d \"\"\""},{"line_number":31,"context_line":"        ---"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_dd746838","line":28,"updated":"2019-10-16 09:43:18.000000000","message":"shouldn\u0027t this class have a send test that verifies if a workflow with a correct name (without spaces) is passing the test?","commit_id":"80fdeff03ed9843a87b0415d7663e046bed41077"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"82263dcf484dbdd10a8d323d77537f7971d9cc1c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            t1:"},{"line_number":36,"context_line":"              action: a1"},{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        e \u003d self.assertRaises("},{"line_number":39,"context_line":"            exc.InvalidModelException,"},{"line_number":40,"context_line":"            wf_service.create_workflows,"},{"line_number":41,"context_line":"            wf"},{"line_number":42,"context_line":"        )"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        self.assertEqual("},{"line_number":45,"context_line":"            \"Name \u0027wf name with space\u0027 must not contain spaces\","},{"line_number":46,"context_line":"            str(e)"},{"line_number":47,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_3b57c45a","line":47,"range":{"start_line":38,"start_character":7,"end_line":47,"end_character":9},"updated":"2019-10-16 12:13:28.000000000","message":"if you want to check the exception and its value you can use:\n\n\nfrom testtools import ExpectedException\n\n\n\n\nwith ExpectedException(exc.InvalidModelException,\n                               \"Name \u0027wf name with space\u0027 must not contain spaces\"):\n      wf_service.create_workflows(wf)","commit_id":"80fdeff03ed9843a87b0415d7663e046bed41077"}]}
