)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"a0cd25f7d963a3f6203ef7168e296f7775a8cf80","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This commit makes some minor tweaks to how the method resources are"},{"line_number":10,"context_line":"cleaned up after each test run to try and avoid cascading cleanup"},{"line_number":11,"context_line":"failures."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ia3ea943a70c62818418263c80893889fc8082c8f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a18252c_c1ece8c9","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":0},"updated":"2016-04-12 19:39:55.000000000","message":"this needs a launchpad bug.. This is a fix to the cascading failures that we\u0027re seeing on the CI.","commit_id":"383a66471c62f3c3b4cc750f0446823ee183ea01"}],"manila_tempest_tests/tests/api/base.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"2310d47a4dccc8a03ec64155a74759184782745b","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    @classmethod"},{"line_number":639,"context_line":"    def clear_isolated_creds(cls, creds\u003dNone):"},{"line_number":640,"context_line":"        try:"},{"line_number":641,"context_line":"            if creds is None:"},{"line_number":642,"context_line":"                creds \u003d cls.method_isolated_creds"},{"line_number":643,"context_line":"            for ic in creds:"},{"line_number":644,"context_line":"                if \"deleted\" not in ic.keys():"},{"line_number":645,"context_line":"                    ic[\"deleted\"] \u003d False"},{"line_number":646,"context_line":"                if not ic[\"deleted\"]:"},{"line_number":647,"context_line":"                    with handle_cleanup_exceptions():"},{"line_number":648,"context_line":"                        ic[\"method\"]()"},{"line_number":649,"context_line":"                    ic[\"deleted\"] \u003d True"},{"line_number":650,"context_line":"        finally:"},{"line_number":651,"context_line":"            cls.method_isolated_creds \u003d []"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @classmethod"},{"line_number":654,"context_line":"    def clear_share_replicas(cls, share_id, client\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_26496d60","line":651,"range":{"start_line":640,"start_character":8,"end_line":651,"end_character":42},"updated":"2016-04-12 21:09:23.000000000","message":"Doing so, you exit on first failure and do not delete huge amount of other resources. It is even worse then to have \"cleanup\" error in teardowns.\n\nBetter to implement logic that knows about \"1+\" attempt of resource deletion. Also, for shares, we can use \"force_delete\" from second attempt. That will delete DB record.","commit_id":"0c3f7bad520777ebcc021ed65e2aaf1a5cdcf473"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"9f955fb59ee573ce050ac4f980ff30386d5c93d2","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    @classmethod"},{"line_number":639,"context_line":"    def clear_isolated_creds(cls, creds\u003dNone):"},{"line_number":640,"context_line":"        try:"},{"line_number":641,"context_line":"            if creds is None:"},{"line_number":642,"context_line":"                creds \u003d cls.method_isolated_creds"},{"line_number":643,"context_line":"            for ic in creds:"},{"line_number":644,"context_line":"                if \"deleted\" not in ic.keys():"},{"line_number":645,"context_line":"                    ic[\"deleted\"] \u003d False"},{"line_number":646,"context_line":"                if not ic[\"deleted\"]:"},{"line_number":647,"context_line":"                    with handle_cleanup_exceptions():"},{"line_number":648,"context_line":"                        ic[\"method\"]()"},{"line_number":649,"context_line":"                    ic[\"deleted\"] \u003d True"},{"line_number":650,"context_line":"        finally:"},{"line_number":651,"context_line":"            cls.method_isolated_creds \u003d []"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @classmethod"},{"line_number":654,"context_line":"    def clear_share_replicas(cls, share_id, client\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_d63f5ed4","line":651,"range":{"start_line":640,"start_character":8,"end_line":651,"end_character":42},"in_reply_to":"5a18252c_0779a62f","updated":"2016-04-13 15:25:32.000000000","message":"Andrew, you update here \"whole list\" of resources on first failure of \"single\" resource. So, if failed resource is not the only in queue and other, not yet processed, exist, then they will never be processed. It is not acceptable.","commit_id":"0c3f7bad520777ebcc021ed65e2aaf1a5cdcf473"},{"author":{"_account_id":9366,"name":"Andrew Kerr","email":"andrew.kerr@netapp.com","username":"andrew-kerr"},"change_message_id":"0ab4c5108b4c04f5eb4923f18d0de6a06555bf87","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    @classmethod"},{"line_number":639,"context_line":"    def clear_isolated_creds(cls, creds\u003dNone):"},{"line_number":640,"context_line":"        try:"},{"line_number":641,"context_line":"            if creds is None:"},{"line_number":642,"context_line":"                creds \u003d cls.method_isolated_creds"},{"line_number":643,"context_line":"            for ic in creds:"},{"line_number":644,"context_line":"                if \"deleted\" not in ic.keys():"},{"line_number":645,"context_line":"                    ic[\"deleted\"] \u003d False"},{"line_number":646,"context_line":"                if not ic[\"deleted\"]:"},{"line_number":647,"context_line":"                    with handle_cleanup_exceptions():"},{"line_number":648,"context_line":"                        ic[\"method\"]()"},{"line_number":649,"context_line":"                    ic[\"deleted\"] \u003d True"},{"line_number":650,"context_line":"        finally:"},{"line_number":651,"context_line":"            cls.method_isolated_creds \u003d []"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @classmethod"},{"line_number":654,"context_line":"    def clear_share_replicas(cls, share_id, client\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_0779a62f","line":651,"range":{"start_line":640,"start_character":8,"end_line":651,"end_character":42},"in_reply_to":"5a18252c_26496d60","updated":"2016-04-13 14:15:36.000000000","message":"This will not cause a test to exit any faster than before the change.  All this does is make the next testcase not know about the previous testcase\u0027s resources.  If the resource can\u0027t be cleaned up in the original test, the chances of the next testcase being able to clean it up are very small.  However, by not trying to clean it up in the subsequent tests then they won\u0027t erroneously fail because of the previous test\u0027s failure.","commit_id":"0c3f7bad520777ebcc021ed65e2aaf1a5cdcf473"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"9af164a2ea38a762e1ad7fb5cbeda3f2efef1dd4","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    @classmethod"},{"line_number":639,"context_line":"    def clear_isolated_creds(cls, creds\u003dNone):"},{"line_number":640,"context_line":"        try:"},{"line_number":641,"context_line":"            if creds is None:"},{"line_number":642,"context_line":"                creds \u003d cls.method_isolated_creds"},{"line_number":643,"context_line":"            for ic in creds:"},{"line_number":644,"context_line":"                if \"deleted\" not in ic.keys():"},{"line_number":645,"context_line":"                    ic[\"deleted\"] \u003d False"},{"line_number":646,"context_line":"                if not ic[\"deleted\"]:"},{"line_number":647,"context_line":"                    with handle_cleanup_exceptions():"},{"line_number":648,"context_line":"                        ic[\"method\"]()"},{"line_number":649,"context_line":"                    ic[\"deleted\"] \u003d True"},{"line_number":650,"context_line":"        finally:"},{"line_number":651,"context_line":"            cls.method_isolated_creds \u003d []"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @classmethod"},{"line_number":654,"context_line":"    def clear_share_replicas(cls, share_id, client\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_0621d14d","line":651,"range":{"start_line":640,"start_character":8,"end_line":651,"end_character":42},"in_reply_to":"5a18252c_26496d60","updated":"2016-04-12 21:10:51.000000000","message":"force delete may not clear backend resources.. it will just delete them on manila\u0027s database","commit_id":"0c3f7bad520777ebcc021ed65e2aaf1a5cdcf473"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"1ea6c942973028273e76f2173c868e3e8f67c685","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    @classmethod"},{"line_number":639,"context_line":"    def clear_isolated_creds(cls, creds\u003dNone):"},{"line_number":640,"context_line":"        try:"},{"line_number":641,"context_line":"            if creds is None:"},{"line_number":642,"context_line":"                creds \u003d cls.method_isolated_creds"},{"line_number":643,"context_line":"            for ic in creds:"},{"line_number":644,"context_line":"                if \"deleted\" not in ic.keys():"},{"line_number":645,"context_line":"                    ic[\"deleted\"] \u003d False"},{"line_number":646,"context_line":"                if not ic[\"deleted\"]:"},{"line_number":647,"context_line":"                    with handle_cleanup_exceptions():"},{"line_number":648,"context_line":"                        ic[\"method\"]()"},{"line_number":649,"context_line":"                    ic[\"deleted\"] \u003d True"},{"line_number":650,"context_line":"        finally:"},{"line_number":651,"context_line":"            cls.method_isolated_creds \u003d []"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @classmethod"},{"line_number":654,"context_line":"    def clear_share_replicas(cls, share_id, client\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_44337314","line":651,"range":{"start_line":640,"start_character":8,"end_line":651,"end_character":42},"in_reply_to":"5a18252c_b20d8492","updated":"2016-04-14 08:07:33.000000000","message":"Andrew, \"finally\" is reached anyway, always, in any case. No matter what happens in \"try\"-block.\n\nProof: https://docs.python.org/2/tutorial/errors.html#defining-clean-up-actions\n\nAnd yes, you are changing \"existing flow\". Making statement again: such change is not acceptable.","commit_id":"0c3f7bad520777ebcc021ed65e2aaf1a5cdcf473"},{"author":{"_account_id":9366,"name":"Andrew Kerr","email":"andrew.kerr@netapp.com","username":"andrew-kerr"},"change_message_id":"7c70246ace8044b934ff21157961c59f4da61516","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    @classmethod"},{"line_number":639,"context_line":"    def clear_isolated_creds(cls, creds\u003dNone):"},{"line_number":640,"context_line":"        try:"},{"line_number":641,"context_line":"            if creds is None:"},{"line_number":642,"context_line":"                creds \u003d cls.method_isolated_creds"},{"line_number":643,"context_line":"            for ic in creds:"},{"line_number":644,"context_line":"                if \"deleted\" not in ic.keys():"},{"line_number":645,"context_line":"                    ic[\"deleted\"] \u003d False"},{"line_number":646,"context_line":"                if not ic[\"deleted\"]:"},{"line_number":647,"context_line":"                    with handle_cleanup_exceptions():"},{"line_number":648,"context_line":"                        ic[\"method\"]()"},{"line_number":649,"context_line":"                    ic[\"deleted\"] \u003d True"},{"line_number":650,"context_line":"        finally:"},{"line_number":651,"context_line":"            cls.method_isolated_creds \u003d []"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @classmethod"},{"line_number":654,"context_line":"    def clear_share_replicas(cls, share_id, client\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_b20d8492","line":651,"range":{"start_line":640,"start_character":8,"end_line":651,"end_character":42},"in_reply_to":"5a18252c_d63f5ed4","updated":"2016-04-13 18:07:42.000000000","message":"Valeriy,\n\nNo.  The try:finally is outside the for loop.  It will only hit the finally when it would have normally exited anyways.  I\u0027m not changing the existing flow, I\u0027m simply inserting a clear after it would have exited anyways","commit_id":"0c3f7bad520777ebcc021ed65e2aaf1a5cdcf473"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"9eda0d566eb8861cd39f302718ce60538f4366cb","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        try:"},{"line_number":678,"context_line":"            if resources is None:"},{"line_number":679,"context_line":"                resources \u003d cls.method_resources"},{"line_number":680,"context_line":"            for res in resources:"},{"line_number":681,"context_line":"                if \"deleted\" not in res.keys():"},{"line_number":682,"context_line":"                    res[\"deleted\"] \u003d False"},{"line_number":683,"context_line":"                if \"client\" not in res.keys():"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_1e50bf5c","line":680,"range":{"start_line":680,"start_character":12,"end_line":680,"end_character":33},"updated":"2016-04-13 20:54:35.000000000","message":"I suggest adding a try..except inside this and log the cleanup failure and move on to the next resource instead of letting the first cleanup exception raised break out of this loop...","commit_id":"0c3f7bad520777ebcc021ed65e2aaf1a5cdcf473"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"9eda0d566eb8861cd39f302718ce60538f4366cb","unresolved":false,"context_lines":[{"line_number":725,"context_line":"                                \"cleanup \u0027%s\u0027. Skipping.\" % res[\"type\"])"},{"line_number":726,"context_line":"                    res[\"deleted\"] \u003d True"},{"line_number":727,"context_line":"        finally:"},{"line_number":728,"context_line":"            cls.method_resources \u003d []"},{"line_number":729,"context_line":""},{"line_number":730,"context_line":"    @classmethod"},{"line_number":731,"context_line":"    def generate_share_network_data(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_1efeff36","line":728,"range":{"start_line":728,"start_character":35,"end_line":728,"end_character":37},"updated":"2016-04-13 20:54:35.000000000","message":"I also suggest that we raise cleanup exceptions, but attempt to cleanup dependent resources in order.. like, snapshots before shares in the share cleanup so that we don\u0027t get the cleanup error at the shares level.. ..","commit_id":"0c3f7bad520777ebcc021ed65e2aaf1a5cdcf473"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"f2a59f455afe0aeae62743b114e1a40fcf5d6878","unresolved":false,"context_lines":[{"line_number":725,"context_line":"                                \"cleanup \u0027%s\u0027. Skipping.\" % res[\"type\"])"},{"line_number":726,"context_line":"                    res[\"deleted\"] \u003d True"},{"line_number":727,"context_line":"        finally:"},{"line_number":728,"context_line":"            cls.method_resources \u003d []"},{"line_number":729,"context_line":""},{"line_number":730,"context_line":"    @classmethod"},{"line_number":731,"context_line":"    def generate_share_network_data(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a18252c_5b2c0402","line":728,"range":{"start_line":728,"start_character":35,"end_line":728,"end_character":37},"in_reply_to":"5a18252c_1efeff36","updated":"2016-04-13 20:59:46.000000000","message":"I mean, second attempt.. \n\nAlternatively, fail fast on the resource you are meant to fail upon.. but force-delete the same resource before attempting to delete the dependant resource.. \n\nEx:\n\n\nSituation: Cleanup snapshot and share\n\nCurrently:\n\n    Snapshot failed to cleanup, share cleanup is not attempted\n   We repeatedly try to cleanup the snapshot until all tests are done,\n   if that goes through, we cleanup the share.. else it\u0027s left behind..\n\n\nProposed:\n\n   Snapshot failed to cleanup - FAIL the test (log a cleanup failure).. proceed to next resource cleanup (share)\n\n   When cleaning up the share, you know you have dependent resources..\n   look for any snapshots.. force-delete them... so that the main objective\n   of this cleanup -\u003e the share, can be cleaned up safely (of course, it too \n   can fail.. but then we atleast try)","commit_id":"0c3f7bad520777ebcc021ed65e2aaf1a5cdcf473"}]}
