)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"109018ebc868f00a6455b5d2f23509b8cfc9a446","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add hacking check for greenthread.spawn()"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Because nova.utils.spawn() and spawn_n() should be used"},{"line_number":10,"context_line":"instead of greenthread.spawn() and spawn_n(), this change adds a hacking"},{"line_number":11,"context_line":"check to enforce this during pep8."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa32b979_6b67c3ea","line":9,"updated":"2015-06-28 14:08:23.000000000","message":"Would it be possible that you please explain why.","commit_id":"c4fb4e4de3c24d4b685a9ee501ccdb5ff42bd3fc"}],"HACKING.rst":[{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"cb82048a5582e7bf29547392f5128226dd316e0a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"  assertEqual(A in B, False) or assertEqual(False, A in B) to the more specific"},{"line_number":51,"context_line":"  assertIn/NotIn(A, B)"},{"line_number":52,"context_line":"- [N339] Check common raise_feature_not_supported() is used for v2.1 HTTPNotImplemented response."},{"line_number":53,"context_line":"- [N340] Check nova.utils.spawn() is used instead of greenthread.spawn() and eventlet.spawn()"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Creating Unit Tests"},{"line_number":56,"context_line":"-------------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"1a4dcd0f_aa902aee","line":53,"updated":"2015-08-11 15:54:45.000000000","message":"Crap. Missed one eventlet mention.","commit_id":"91c6455924adb1d555c603b13d49301f18712a83"}],"nova/hacking/checks.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6512e6d0009274f07dde39b7d2ae0c502297888e","unresolved":false,"context_lines":[{"line_number":26,"context_line":" - Pick numbers in the range N3xx. Find the current test with"},{"line_number":27,"context_line":"   the highest allocated number and then pick the next value."},{"line_number":28,"context_line":" - Keep the test method code in the source file ordered based"},{"line_number":29,"context_line":"   on the N3xx value."},{"line_number":30,"context_line":" - List the new rule in the top level HACKING.rst file"},{"line_number":31,"context_line":" - Add test cases for each new rule to nova/tests/unit/test_hacking.py"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_6b115153","line":29,"updated":"2015-06-25 19:33:23.000000000","message":"You forgot this part.","commit_id":"8f6cb717abf58af1071098836e83441a1d717b09"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"83a3f10671ed35a0f68cc5363ae6197ee1dc3c53","unresolved":false,"context_lines":[{"line_number":26,"context_line":" - Pick numbers in the range N3xx. Find the current test with"},{"line_number":27,"context_line":"   the highest allocated number and then pick the next value."},{"line_number":28,"context_line":" - Keep the test method code in the source file ordered based"},{"line_number":29,"context_line":"   on the N3xx value."},{"line_number":30,"context_line":" - List the new rule in the top level HACKING.rst file"},{"line_number":31,"context_line":" - Add test cases for each new rule to nova/tests/unit/test_hacking.py"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_7e9ecab9","line":29,"in_reply_to":"fa32b979_25cfd12a","updated":"2015-06-26 15:38:10.000000000","message":"Done","commit_id":"8f6cb717abf58af1071098836e83441a1d717b09"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"a8dd52af7e048a71fce8245946a9f99dd7f26d8a","unresolved":false,"context_lines":[{"line_number":26,"context_line":" - Pick numbers in the range N3xx. Find the current test with"},{"line_number":27,"context_line":"   the highest allocated number and then pick the next value."},{"line_number":28,"context_line":" - Keep the test method code in the source file ordered based"},{"line_number":29,"context_line":"   on the N3xx value."},{"line_number":30,"context_line":" - List the new rule in the top level HACKING.rst file"},{"line_number":31,"context_line":" - Add test cases for each new rule to nova/tests/unit/test_hacking.py"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_25cfd12a","line":29,"in_reply_to":"fa32b979_38ab7dd8","updated":"2015-06-26 14:25:52.000000000","message":"You need to list N340 in the file https://github.com/openstack/nova/blob/master/HACKING.rst","commit_id":"8f6cb717abf58af1071098836e83441a1d717b09"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"06c3ee3593a39450d328ca705c4f41ff5c078748","unresolved":false,"context_lines":[{"line_number":26,"context_line":" - Pick numbers in the range N3xx. Find the current test with"},{"line_number":27,"context_line":"   the highest allocated number and then pick the next value."},{"line_number":28,"context_line":" - Keep the test method code in the source file ordered based"},{"line_number":29,"context_line":"   on the N3xx value."},{"line_number":30,"context_line":" - List the new rule in the top level HACKING.rst file"},{"line_number":31,"context_line":" - Add test cases for each new rule to nova/tests/unit/test_hacking.py"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_38ab7dd8","line":29,"in_reply_to":"fa32b979_6b115153","updated":"2015-06-26 13:32:24.000000000","message":"I put mine (N340) after the http_not_implemented (N339)... or am I missing something?","commit_id":"8f6cb717abf58af1071098836e83441a1d717b09"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"91931ebc87bf5777194c31edc26dc3aca65e1592","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"def check_greenthread_spawns(logical_line, physical_line, filename):"},{"line_number":525,"context_line":"    \"\"\"Check for use of greenthread.spawn(), greenthread.spawn_n(),"},{"line_number":526,"context_line":"    eventlet.spawn(), eventlet.spawn_n()"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"    N340"},{"line_number":529,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_8dd6a84d","line":526,"updated":"2015-08-11 16:03:08.000000000","message":"Should eventlet.spawn() or eventlet.spawn_n() be removed since they aren\u0027t checked for?","commit_id":"0872b9f870a4ff7b29151065c68a3ed55ec393c8"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"972d716d0f8ec714ddc75f3957a33f6c49b2c3d0","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"def check_greenthread_spawns(logical_line, physical_line, filename):"},{"line_number":525,"context_line":"    \"\"\"Check for use of greenthread.spawn(), greenthread.spawn_n(),"},{"line_number":526,"context_line":"    eventlet.spawn(), eventlet.spawn_n()"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"    N340"},{"line_number":529,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_0d013838","line":526,"in_reply_to":"1a4dcd0f_8dd6a84d","updated":"2015-08-11 16:11:06.000000000","message":"I guess I missed this one too. Done.","commit_id":"0872b9f870a4ff7b29151065c68a3ed55ec393c8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"37a8f4d8269caa23ff4970fec2070530874fc306","unresolved":false,"context_lines":[{"line_number":528,"context_line":"    \"\"\""},{"line_number":529,"context_line":"    msg \u003d (\"N340: Use nova.utils.%(spawn)s() rather than \""},{"line_number":530,"context_line":"           \"greenthread.%(spawn)s()\")"},{"line_number":531,"context_line":"    if re.match(greenthread_spawn_re, logical_line):"},{"line_number":532,"context_line":"        yield (0, msg % {\u0027spawn\u0027: \u0027spawn\u0027})"},{"line_number":533,"context_line":"    if re.match(greenthread_spawn_n_re, logical_line):"},{"line_number":534,"context_line":"        yield (0, msg % {\u0027spawn\u0027: \u0027spawn_n\u0027})"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_00fedaad","line":531,"updated":"2015-08-11 17:56:41.000000000","message":"In patch set 4 you also skipped the usage in nova/utils and nova/tests, why not now?\n\nif \"nova/utils.py\" in filename or \"nova/tests/\" in filename:\n    return","commit_id":"97821a9c7e1aff420ef2de319e158630ce811551"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"796e6b190f0e7147350bec93d5f3db0921162a8e","unresolved":false,"context_lines":[{"line_number":528,"context_line":"    \"\"\""},{"line_number":529,"context_line":"    msg \u003d (\"N340: Use nova.utils.%(spawn)s() rather than \""},{"line_number":530,"context_line":"           \"greenthread.%(spawn)s()\")"},{"line_number":531,"context_line":"    if re.match(greenthread_spawn_re, logical_line):"},{"line_number":532,"context_line":"        yield (0, msg % {\u0027spawn\u0027: \u0027spawn\u0027})"},{"line_number":533,"context_line":"    if re.match(greenthread_spawn_n_re, logical_line):"},{"line_number":534,"context_line":"        yield (0, msg % {\u0027spawn\u0027: \u0027spawn_n\u0027})"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_c3c0fc52","line":531,"in_reply_to":"1a4dcd0f_00e01a95","updated":"2015-08-11 18:17:22.000000000","message":"OK, I see those are handled in the dependent change.","commit_id":"97821a9c7e1aff420ef2de319e158630ce811551"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"b6ad5f875e6792a08d795d54c817dc4fa30b0b5b","unresolved":false,"context_lines":[{"line_number":528,"context_line":"    \"\"\""},{"line_number":529,"context_line":"    msg \u003d (\"N340: Use nova.utils.%(spawn)s() rather than \""},{"line_number":530,"context_line":"           \"greenthread.%(spawn)s()\")"},{"line_number":531,"context_line":"    if re.match(greenthread_spawn_re, logical_line):"},{"line_number":532,"context_line":"        yield (0, msg % {\u0027spawn\u0027: \u0027spawn\u0027})"},{"line_number":533,"context_line":"    if re.match(greenthread_spawn_n_re, logical_line):"},{"line_number":534,"context_line":"        yield (0, msg % {\u0027spawn\u0027: \u0027spawn_n\u0027})"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_00e01a95","line":531,"in_reply_to":"1a4dcd0f_00fedaad","updated":"2015-08-11 18:06:26.000000000","message":"utils.spawn() uses eventlet within it, so when checking for eventlet, that one needs to be ignored. There are also some tests using eventlet (https://github.com/openstack/nova/blob/master/nova/tests/unit/virt/libvirt/test_host.py#L296) that would also need to be ignored.\n\nBut those are both eventlet, and this is just checking for greenthread so we don\u0027t need to worry about those in this patch.","commit_id":"97821a9c7e1aff420ef2de319e158630ce811551"}],"nova/tests/unit/test_hacking.py":[{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"91931ebc87bf5777194c31edc26dc3aca65e1592","unresolved":false,"context_lines":[{"line_number":546,"context_line":"        self._assert_has_errors(code, checks.check_greenthread_spawns,"},{"line_number":547,"context_line":"                                expected_errors\u003derrors)"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"        code \u003d \"eventlet.greenthread.spawn(func, arg1, kwarg1\u003dkwarg1)\""},{"line_number":550,"context_line":"        self._assert_has_errors(code, checks.check_greenthread_spawns,"},{"line_number":551,"context_line":"                                expected_errors\u003derrors)"},{"line_number":552,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_2d5514c1","line":549,"updated":"2015-08-11 16:03:08.000000000","message":"Does this test pass?","commit_id":"0872b9f870a4ff7b29151065c68a3ed55ec393c8"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"972d716d0f8ec714ddc75f3957a33f6c49b2c3d0","unresolved":false,"context_lines":[{"line_number":546,"context_line":"        self._assert_has_errors(code, checks.check_greenthread_spawns,"},{"line_number":547,"context_line":"                                expected_errors\u003derrors)"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"        code \u003d \"eventlet.greenthread.spawn(func, arg1, kwarg1\u003dkwarg1)\""},{"line_number":550,"context_line":"        self._assert_has_errors(code, checks.check_greenthread_spawns,"},{"line_number":551,"context_line":"                                expected_errors\u003derrors)"},{"line_number":552,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_4deae075","line":549,"in_reply_to":"1a4dcd0f_2d5514c1","updated":"2015-08-11 16:11:06.000000000","message":"yep. We want to check for greenthread.spawn(), and because greenthread is part of the eventlet module, eventlet.greenthread.spawn() is a valid occurrence of greenthread.spawn(). We just want to leave eventlet.spawn() to the follow-on patch.","commit_id":"0872b9f870a4ff7b29151065c68a3ed55ec393c8"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"a9320942a1157255018e4a433d658719fc3f34c8","unresolved":false,"context_lines":[{"line_number":546,"context_line":"        self._assert_has_errors(code, checks.check_greenthread_spawns,"},{"line_number":547,"context_line":"                                expected_errors\u003derrors)"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"        code \u003d \"eventlet.greenthread.spawn(func, arg1, kwarg1\u003dkwarg1)\""},{"line_number":550,"context_line":"        self._assert_has_errors(code, checks.check_greenthread_spawns,"},{"line_number":551,"context_line":"                                expected_errors\u003derrors)"},{"line_number":552,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a4dcd0f_884e966d","line":549,"in_reply_to":"1a4dcd0f_4deae075","updated":"2015-08-11 16:15:19.000000000","message":"I get it now ... I let the leading \u0027eventlet\u0027 confuse me.","commit_id":"0872b9f870a4ff7b29151065c68a3ed55ec393c8"}]}
