)]}'
{"patrole_tempest_plugin/rbac_exceptions.py":[{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ccbbb62456d5d7727963b18e1fab51eaaf7ede52","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class BasePatroleException(exceptions.TempestException):"},{"line_number":20,"context_line":"    message \u003d \"An unknown RBAC exception occurred\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class RbacConflictingPolicies(BasePatroleException):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3f79a3b5_7d4c879d","line":20,"range":{"start_line":20,"start_character":18,"end_line":20,"end_character":25},"updated":"2018-08-23 15:15:00.000000000","message":"I don\u0027t think unknown is the right word here. All the RBAC exceptions that are raised are known","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"f90c22aaf09f25826a77178903433c2a31463cde","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class BasePatroleException(exceptions.TempestException):"},{"line_number":20,"context_line":"    message \u003d \"An unknown RBAC exception occurred\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class RbacConflictingPolicies(BasePatroleException):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3f79a3b5_65ee2d23","line":20,"range":{"start_line":20,"start_character":18,"end_line":20,"end_character":25},"in_reply_to":"3f79a3b5_7d4c879d","updated":"2018-08-23 16:27:26.000000000","message":"This message is overridden by all the sub-exceptions below. If anyone chose to raise this base exception though it would be for the prescribed reason: because an unknown RBAC-related exception occurred.\n\nThis exception is simply used for bookkeeping and better code organization: this way it\u0027s easy to do this: https://review.openstack.org/#/c/589281/17/patrole_tempest_plugin/rbac_rule_validation.py@502","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"}],"patrole_tempest_plugin/rbac_rule_validation.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"e579f1ce0d1346f8274ae27b1ad03e3c6932621e","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                if hasattr(test_obj, \"__override_role_called\") and\\"},{"line_number":204,"context_line":"                        not test_obj.__override_role_called:"},{"line_number":205,"context_line":"                    # Exception happened outside of override_role. It is not"},{"line_number":206,"context_line":"                    # expected behaviour so we throw original exception."},{"line_number":207,"context_line":"                    raise"},{"line_number":208,"context_line":"                if allowed:"},{"line_number":209,"context_line":"                    msg \u003d (\"Role %s was not allowed to perform the following \""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_ed4aa97e","line":206,"updated":"2018-08-07 01:33:47.000000000","message":"We should LOG an error here:\n\n    LOG.error(\u0027Caught expected exception: %s but it was raised before or after the \u0027\n                     \u0027override_role context. This error is unrelated to RBAC and is due to \u0027\n                     \u0027either an API or override role bug or failure. Raising the \u0027         \n                     \u0027exception since this is a test error.\u0027, expected_exception)","commit_id":"193747bb644ae5cbd0eedd7caf0a750ed934af42"},{"author":{"_account_id":16274,"name":"Mykola Yakovliev","email":"VegasQ@gmail.com","username":"vegasq"},"change_message_id":"32950a6ed5be27212bca133e655a72b81a231a86","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                if hasattr(test_obj, \"__override_role_called\") and\\"},{"line_number":204,"context_line":"                        not test_obj.__override_role_called:"},{"line_number":205,"context_line":"                    # Exception happened outside of override_role. It is not"},{"line_number":206,"context_line":"                    # expected behaviour so we throw original exception."},{"line_number":207,"context_line":"                    raise"},{"line_number":208,"context_line":"                if allowed:"},{"line_number":209,"context_line":"                    msg \u003d (\"Role %s was not allowed to perform the following \""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_04b250e7","line":206,"in_reply_to":"3f79a3b5_ed4aa97e","updated":"2018-08-07 18:33:18.000000000","message":"Done","commit_id":"193747bb644ae5cbd0eedd7caf0a750ed934af42"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"447d7cb50db4e95d3044321c535c43ba4b480426","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                        not test_obj.__override_role_called:"},{"line_number":205,"context_line":"                    # Exception happened outside of override_role. It is not"},{"line_number":206,"context_line":"                    # expected behaviour so we throw original exception."},{"line_number":207,"context_line":"                    raise"},{"line_number":208,"context_line":"                if allowed:"},{"line_number":209,"context_line":"                    msg \u003d (\"Role %s was not allowed to perform the following \""},{"line_number":210,"context_line":"                           \"actions: %s. Expected allowed actions: %s. \""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_bf404537","line":207,"range":{"start_line":207,"start_character":20,"end_line":207,"end_character":25},"updated":"2018-08-07 15:32:16.000000000","message":"It will probably be better to raise a custom exception here too so there is no misunderstanding as to the nature of the exception. Like: RbacPrematureException() or RbacWorkflowException() or something that provides an explanation like:\n\n    \"Excepted exception (%(exception)s) was raised but outside the scope of the `override_role` context\"","commit_id":"193747bb644ae5cbd0eedd7caf0a750ed934af42"},{"author":{"_account_id":16274,"name":"Mykola Yakovliev","email":"VegasQ@gmail.com","username":"vegasq"},"change_message_id":"32950a6ed5be27212bca133e655a72b81a231a86","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                        not test_obj.__override_role_called:"},{"line_number":205,"context_line":"                    # Exception happened outside of override_role. It is not"},{"line_number":206,"context_line":"                    # expected behaviour so we throw original exception."},{"line_number":207,"context_line":"                    raise"},{"line_number":208,"context_line":"                if allowed:"},{"line_number":209,"context_line":"                    msg \u003d (\"Role %s was not allowed to perform the following \""},{"line_number":210,"context_line":"                           \"actions: %s. Expected allowed actions: %s. \""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_0ad1f654","line":207,"range":{"start_line":207,"start_character":20,"end_line":207,"end_character":25},"in_reply_to":"3f79a3b5_bf404537","updated":"2018-08-07 18:33:18.000000000","message":"Done","commit_id":"193747bb644ae5cbd0eedd7caf0a750ed934af42"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"28aa8ae19b7442d80eb6990d2c0e9e3e7d15e221","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                           \u0027an API or override role bug or failure. Raising \u0027"},{"line_number":209,"context_line":"                           \u0027the exception since this is a test error.\u0027)"},{"line_number":210,"context_line":"                    LOG.error(msg, expected_exception)"},{"line_number":211,"context_line":"                    exception_msg \u003d (\"Excepted exception (%{exception}s) was \""},{"line_number":212,"context_line":"                                     \"raised but outside the scope of the \""},{"line_number":213,"context_line":"                                     \"`override_role` context\")"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"                    raise rbac_exceptions.RbacPrematureException("},{"line_number":216,"context_line":"                        exception_msg.format(exception\u003de))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_6b28a533","line":213,"range":{"start_line":211,"start_character":37,"end_line":213,"end_character":62},"updated":"2018-08-08 05:22:28.000000000","message":"This is redundant with the message here: https://review.openstack.org/#/c/589281/5/patrole_tempest_plugin/rbac_exceptions.py@82\n\nWe can just replace that message with this and everything else should be fine.","commit_id":"c56d776147c68dc9798f842fd2f4d38fad2c5c22"},{"author":{"_account_id":16274,"name":"Mykola Yakovliev","email":"VegasQ@gmail.com","username":"vegasq"},"change_message_id":"beab57fe3219792c30d3a7b949b6c84cf3ca70a5","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                           \u0027an API or override role bug or failure. Raising \u0027"},{"line_number":209,"context_line":"                           \u0027the exception since this is a test error.\u0027)"},{"line_number":210,"context_line":"                    LOG.error(msg, expected_exception)"},{"line_number":211,"context_line":"                    exception_msg \u003d (\"Excepted exception (%{exception}s) was \""},{"line_number":212,"context_line":"                                     \"raised but outside the scope of the \""},{"line_number":213,"context_line":"                                     \"`override_role` context\")"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"                    raise rbac_exceptions.RbacPrematureException("},{"line_number":216,"context_line":"                        exception_msg.format(exception\u003de))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_f7948846","line":213,"range":{"start_line":211,"start_character":37,"end_line":213,"end_character":62},"in_reply_to":"3f79a3b5_6b28a533","updated":"2018-08-08 15:14:00.000000000","message":"Done","commit_id":"c56d776147c68dc9798f842fd2f4d38fad2c5c22"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"a6e6f167f8c700ebe9d2cd8ddbb265a71cd429c5","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                                test_func.__name__,"},{"line_number":201,"context_line":"                                \u0027, \u0027.join(rules),"},{"line_number":202,"context_line":"                                service)"},{"line_number":203,"context_line":"                if hasattr(test_obj, \"__override_role_called\") and\\"},{"line_number":204,"context_line":"                        not test_obj.__override_role_called:"},{"line_number":205,"context_line":"                    msg \u003d (\u0027Caught expected exception: %s but it was raised \u0027"},{"line_number":206,"context_line":"                           \u0027before or after the override_role context. This \u0027"},{"line_number":207,"context_line":"                           \u0027error is unrelated to RBAC and is due to either \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_64bbdd71","line":204,"range":{"start_line":203,"start_character":16,"end_line":204,"end_character":60},"updated":"2018-08-09 01:07:26.000000000","message":"This sort of thing is problematic because of variable mangling when using __ in a variable. Better to use a wrapper function.\n\nI think this is causing the tests to pass this check because the hasattr() check fails.","commit_id":"ba2b5a23b544bd1e1901f3d9e2234bace226d5ea"}],"patrole_tempest_plugin/rbac_utils.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"e579f1ce0d1346f8274ae27b1ad03e3c6932621e","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        LOG.debug(\u0027Overriding role to: %s.\u0027, toggle_rbac_role)"},{"line_number":122,"context_line":"        role_already_present \u003d False"},{"line_number":123,"context_line":"        test_obj.__override_role_called \u003d True"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            if not all([self.admin_role_id, self.rbac_role_id]):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_adaef12b","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":46},"updated":"2018-08-07 01:33:47.000000000","message":"We should call this as the very first thing. Example: https://github.com/openstack/tempest/blob/dcbcc65910bb76af951f151b984cce06f8a1ca5c/tempest/test.py#L143\n\nMind you this isn\u0027t a perfect solution but should be good enough for the time being, until a more careful overhaul of the design is done.","commit_id":"193747bb644ae5cbd0eedd7caf0a750ed934af42"},{"author":{"_account_id":16274,"name":"Mykola Yakovliev","email":"VegasQ@gmail.com","username":"vegasq"},"change_message_id":"32950a6ed5be27212bca133e655a72b81a231a86","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        LOG.debug(\u0027Overriding role to: %s.\u0027, toggle_rbac_role)"},{"line_number":122,"context_line":"        role_already_present \u003d False"},{"line_number":123,"context_line":"        test_obj.__override_role_called \u003d True"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            if not all([self.admin_role_id, self.rbac_role_id]):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_4414c8a0","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":46},"in_reply_to":"3f79a3b5_adaef12b","updated":"2018-08-07 18:33:18.000000000","message":"Done","commit_id":"193747bb644ae5cbd0eedd7caf0a750ed934af42"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"a6e6f167f8c700ebe9d2cd8ddbb265a71cd429c5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            # test. Automatically switch back to the admin role for test clean"},{"line_number":106,"context_line":"            # up."},{"line_number":107,"context_line":"            self._override_role(test_obj, False)"},{"line_number":108,"context_line":"            test_obj.__override_role_called \u003d False"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _override_role(self, test_obj, toggle_rbac_role\u003dFalse):"},{"line_number":111,"context_line":"        \"\"\"Private helper for overriding ``os_primary`` Tempest credentials."}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_04b22995","line":108,"range":{"start_line":108,"start_character":12,"end_line":108,"end_character":51},"updated":"2018-08-09 01:07:26.000000000","message":"This won\u0027t work because of the following workflow:\n\n1) Decorator calls test \u003d\u003e __override_role_called \u003d\u003d False\n2) Test calls rbac_utils.override_role.__enter__ automatically via `with` statement \u003d\u003e __override_role_called \u003d\u003d True\n3) Test calls  rbac_utils.override_role.__exit__ automatically via `with` statement \u003d\u003e __override_role_called \u003d\u003d False\n4) Decorator checks whether __override_role_called \u003d\u003d True. But as per above it is False, so it should blow up.\n\nBut I think variable mangling is causing this to not be properly checked from rbac_rule_validation module. We should do all the checks within the same class to avoid this behavior.","commit_id":"ba2b5a23b544bd1e1901f3d9e2234bace226d5ea"}],"patrole_tempest_plugin/tests/api/network/rbac_base.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"e579f1ce0d1346f8274ae27b1ad03e3c6932621e","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class BaseNetworkRbacTest(rbac_utils.RbacUtilsMixin,"},{"line_number":25,"context_line":"                          network_base.BaseNetworkTest):"},{"line_number":26,"context_line":"    # Shows if override_role was called."},{"line_number":27,"context_line":"    __override_role_called \u003d False"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    @classmethod"},{"line_number":30,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_2d68a1f3","line":27,"range":{"start_line":26,"start_character":0,"end_line":27,"end_character":34},"updated":"2018-08-07 01:33:47.000000000","message":"This can be initialized here: https://review.openstack.org/#/c/589281/2/patrole_tempest_plugin/rbac_utils.py@225 (in the mixin itself)","commit_id":"193747bb644ae5cbd0eedd7caf0a750ed934af42"},{"author":{"_account_id":16274,"name":"Mykola Yakovliev","email":"VegasQ@gmail.com","username":"vegasq"},"change_message_id":"32950a6ed5be27212bca133e655a72b81a231a86","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class BaseNetworkRbacTest(rbac_utils.RbacUtilsMixin,"},{"line_number":25,"context_line":"                          network_base.BaseNetworkTest):"},{"line_number":26,"context_line":"    # Shows if override_role was called."},{"line_number":27,"context_line":"    __override_role_called \u003d False"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    @classmethod"},{"line_number":30,"context_line":"    def skip_checks(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_045c907c","line":27,"range":{"start_line":26,"start_character":0,"end_line":27,"end_character":34},"in_reply_to":"3f79a3b5_2d68a1f3","updated":"2018-08-07 18:33:18.000000000","message":"Done","commit_id":"193747bb644ae5cbd0eedd7caf0a750ed934af42"}],"patrole_tempest_plugin/tests/unit/test_rbac_rule_validation.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"28aa8ae19b7442d80eb6990d2c0e9e3e7d15e221","unresolved":false,"context_lines":[{"line_number":726,"context_line":"        def test_policy(*args):"},{"line_number":727,"context_line":"            raise exceptions.NotFound()"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"        self.mock_test_args.__setattr__(\"__override_role_called\", False)"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        self.assertRaises(rbac_exceptions.RbacPrematureException,"},{"line_number":732,"context_line":"                          test_policy, self.mock_test_args)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_6bdd0541","line":729,"range":{"start_line":729,"start_character":8,"end_line":729,"end_character":39},"updated":"2018-08-08 05:22:28.000000000","message":"nit: Would be cleaner to just do:\n\n    self.mock_test_args.__override_role_called \u003d False\n\nOr else:\n\n    setattr(self.mock-test_args, \u0027__override_role_called\u0027, False)","commit_id":"c56d776147c68dc9798f842fd2f4d38fad2c5c22"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"acc5cb213b28837bca550f554dd7c2c95ae1bb4a","unresolved":false,"context_lines":[{"line_number":726,"context_line":"        def test_policy(*args):"},{"line_number":727,"context_line":"            raise exceptions.NotFound()"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"        self.mock_test_args.__setattr__(\"__override_role_called\", False)"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        self.assertRaises(rbac_exceptions.RbacPrematureException,"},{"line_number":732,"context_line":"                          test_policy, self.mock_test_args)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_6ba2d04d","line":729,"range":{"start_line":729,"start_character":8,"end_line":729,"end_character":39},"in_reply_to":"3f79a3b5_3741a00c","updated":"2018-08-08 21:21:11.000000000","message":"This is basically attribute mangling in Python since it begins with \"__\". The spec_set that is used to initialize mock_test_args is probably what is enforcing this behavior. Thanks for pointing this out, I think we can leave it like this.","commit_id":"c56d776147c68dc9798f842fd2f4d38fad2c5c22"},{"author":{"_account_id":16274,"name":"Mykola Yakovliev","email":"VegasQ@gmail.com","username":"vegasq"},"change_message_id":"beab57fe3219792c30d3a7b949b6c84cf3ca70a5","unresolved":false,"context_lines":[{"line_number":726,"context_line":"        def test_policy(*args):"},{"line_number":727,"context_line":"            raise exceptions.NotFound()"},{"line_number":728,"context_line":""},{"line_number":729,"context_line":"        self.mock_test_args.__setattr__(\"__override_role_called\", False)"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        self.assertRaises(rbac_exceptions.RbacPrematureException,"},{"line_number":732,"context_line":"                          test_policy, self.mock_test_args)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_3741a00c","line":729,"range":{"start_line":729,"start_character":8,"end_line":729,"end_character":39},"in_reply_to":"3f79a3b5_6bdd0541","updated":"2018-08-08 15:14:00.000000000","message":"Yeah... I spent some time around this line. I think it has something to do with how python works with private properties in runtime (but not in pdb!).\n\n```\n        setattr(self.mock_test_args, \u0027__override_role_called\u0027, False)\n        self.assertFalse(self.mock_test_args.__override_role_called)\n```\n\nResult in:\n\n```\nAttributeError: Mock object has no attribute \u0027_RBACOverrideRoleValidationTest__override_role_called\u0027\n```\n\n\nand\n\n```\n        self.mock_test_args.__override_role_called \u003d False\n        self.assertFalse(self.mock_test_args.__override_role_called)\n```\n\nResult in\n\n```\ntesttools.matchers._impl.MismatchError: \u003cfunction test_policy at 0x7fb4f7d88c80\u003e returned None\n```\n\nRead as hasattr(obj, \"__override_role_called\") \u003d\u003d False\n\n\nSo I agree that line looks strange, but it was done on purpose.\n\nIf we want to change it, we can change the property name from __override_role_called to _override_role_called, it should help.","commit_id":"c56d776147c68dc9798f842fd2f4d38fad2c5c22"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"28aa8ae19b7442d80eb6990d2c0e9e3e7d15e221","unresolved":false,"context_lines":[{"line_number":746,"context_line":"        def test_policy(*args):"},{"line_number":747,"context_line":"            raise exceptions.NotFound()"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"        self.mock_test_args.__setattr__(\"__override_role_called\", True)"},{"line_number":750,"context_line":""},{"line_number":751,"context_line":"        test_policy(self.mock_test_args)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_ebc91578","line":749,"range":{"start_line":749,"start_character":8,"end_line":749,"end_character":71},"updated":"2018-08-08 05:22:28.000000000","message":"Ditto.","commit_id":"c56d776147c68dc9798f842fd2f4d38fad2c5c22"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"fc64c4c2e978f009c81428c9d590b6f27d893dc0","unresolved":false,"context_lines":[{"line_number":748,"context_line":"    ``override_role`` is called) result in test failures."},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    This regression tests false positives caused by the expected exception"},{"line_number":751,"context_line":"    matching the raised exception, before the actual policy action is enforced"},{"line_number":752,"context_line":"    by the appropriate API."},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_1e2fb4a1","line":751,"range":{"start_line":751,"start_character":35,"end_line":751,"end_character":41},"updated":"2018-08-10 02:15:06.000000000","message":"before/after/never","commit_id":"db36aa8d4cf69730ddc668cc3775dc36b20a3133"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"fc64c4c2e978f009c81428c9d590b6f27d893dc0","unresolved":false,"context_lines":[{"line_number":857,"context_line":""},{"line_number":858,"context_line":"            @rbac_rv.action(mock.sentinel.service, rules\u003d[\"fake:rule\"],"},{"line_number":859,"context_line":"                            expected_error_codes\u003d[404])"},{"line_number":860,"context_line":"            def never_called(self_):"},{"line_number":861,"context_line":"                pass"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":"        child_test \u003d ChildRbacTest()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_fe3438fd","line":860,"range":{"start_line":860,"start_character":16,"end_line":860,"end_character":28},"updated":"2018-08-10 02:15:06.000000000","message":"test_never_called","commit_id":"db36aa8d4cf69730ddc668cc3775dc36b20a3133"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"fc64c4c2e978f009c81428c9d590b6f27d893dc0","unresolved":false,"context_lines":[{"line_number":862,"context_line":""},{"line_number":863,"context_line":"        child_test \u003d ChildRbacTest()"},{"line_number":864,"context_line":"        self.assertRaises(rbac_exceptions.RbacPrematureException,"},{"line_number":865,"context_line":"                          child_test.never_called)"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"    @mock.patch.object(rbac_rv, \u0027policy_authority\u0027, autospec\u003dTrue)"},{"line_number":868,"context_line":"    def test_rule_validation_override_role_sequential_test_calls("}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_9e3bc4e9","line":865,"range":{"start_line":865,"start_character":37,"end_line":865,"end_character":49},"updated":"2018-08-10 02:15:06.000000000","message":"test_never_called","commit_id":"db36aa8d4cf69730ddc668cc3775dc36b20a3133"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"c5e6827120d283394b26b14825ab1d5b6786c662","unresolved":false,"context_lines":[{"line_number":742,"context_line":""},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"class RBACOverrideRoleValidationTest(BaseRBACRuleValidationTest):"},{"line_number":745,"context_line":"    \"\"\"Class for validating that premature exceptions (before"},{"line_number":746,"context_line":"    ``override_role`` is called) result in test failures."},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"    This regression tests false positives caused by test exceptions matching"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_22bef5d4","line":745,"range":{"start_line":745,"start_character":55,"end_line":745,"end_character":61},"updated":"2018-08-11 18:18:47.000000000","message":"outside","commit_id":"a5ee59a9ff32ca08edb501cf0f59cd169e968d47"}],"releasenotes/notes/check-expected-errors-only-in-override-role-f7109a73f5ff70e2.yaml":[{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ccbbb62456d5d7727963b18e1fab51eaaf7ede52","unresolved":false,"context_lines":[{"line_number":11,"context_line":"    * an exception is raised after ``override_role`` context"},{"line_number":12,"context_line":"fixes:"},{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    The rbac_rule_validatin.action decorator catch expected exceptions with no"},{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_2fded63d","line":14,"range":{"start_line":14,"start_character":45,"end_line":14,"end_character":50},"updated":"2018-08-23 15:15:00.000000000","message":"nit: catching","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ccbbb62456d5d7727963b18e1fab51eaaf7ede52","unresolved":false,"context_lines":[{"line_number":11,"context_line":"    * an exception is raised after ``override_role`` context"},{"line_number":12,"context_line":"fixes:"},{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    The rbac_rule_validatin.action decorator catch expected exceptions with no"},{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_8f17eaee","line":14,"range":{"start_line":14,"start_character":18,"end_line":14,"end_character":27},"updated":"2018-08-23 15:15:00.000000000","message":"nit: validation","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"f90c22aaf09f25826a77178903433c2a31463cde","unresolved":false,"context_lines":[{"line_number":11,"context_line":"    * an exception is raised after ``override_role`` context"},{"line_number":12,"context_line":"fixes:"},{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    The rbac_rule_validatin.action decorator catch expected exceptions with no"},{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_c5dce175","line":14,"range":{"start_line":14,"start_character":45,"end_line":14,"end_character":50},"in_reply_to":"3f79a3b5_2fded63d","updated":"2018-08-23 16:27:26.000000000","message":"Done","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"f90c22aaf09f25826a77178903433c2a31463cde","unresolved":false,"context_lines":[{"line_number":11,"context_line":"    * an exception is raised after ``override_role`` context"},{"line_number":12,"context_line":"fixes:"},{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    The rbac_rule_validatin.action decorator catch expected exceptions with no"},{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_e5d9dd82","line":14,"range":{"start_line":14,"start_character":18,"end_line":14,"end_character":27},"in_reply_to":"3f79a3b5_8f17eaee","updated":"2018-08-23 16:27:26.000000000","message":"Done","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ccbbb62456d5d7727963b18e1fab51eaaf7ede52","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    The rbac_rule_validatin.action decorator catch expected exceptions with no"},{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"},{"line_number":18,"context_line":"    rbac_exceptions.RbacPrematureException."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_2fb7b6f7","line":16,"range":{"start_line":16,"start_character":55,"end_line":16,"end_character":63},"updated":"2018-08-23 15:15:00.000000000","message":"happens","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ccbbb62456d5d7727963b18e1fab51eaaf7ede52","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    The rbac_rule_validatin.action decorator catch expected exceptions with no"},{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"},{"line_number":18,"context_line":"    rbac_exceptions.RbacPrematureException."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_afe986e3","line":16,"range":{"start_line":16,"start_character":13,"end_line":16,"end_character":38},"updated":"2018-08-23 15:15:00.000000000","message":"nit: To prevent this from happening,","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"f90c22aaf09f25826a77178903433c2a31463cde","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    The rbac_rule_validatin.action decorator catch expected exceptions with no"},{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"},{"line_number":18,"context_line":"    rbac_exceptions.RbacPrematureException."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_a5df6564","line":16,"range":{"start_line":16,"start_character":55,"end_line":16,"end_character":63},"in_reply_to":"3f79a3b5_2fb7b6f7","updated":"2018-08-23 16:27:26.000000000","message":"Done","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"f90c22aaf09f25826a77178903433c2a31463cde","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    The rbac_rule_validatin.action decorator catch expected exceptions with no"},{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"},{"line_number":18,"context_line":"    rbac_exceptions.RbacPrematureException."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_45d2115e","line":16,"range":{"start_line":16,"start_character":13,"end_line":16,"end_character":38},"in_reply_to":"3f79a3b5_afe986e3","updated":"2018-08-23 16:27:26.000000000","message":"Done","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":17896,"name":"Rick Bartra","email":"rickbartra@microsoft.com","username":"rb560u"},"change_message_id":"ccbbb62456d5d7727963b18e1fab51eaaf7ede52","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"},{"line_number":18,"context_line":"    rbac_exceptions.RbacPrematureException."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_8f736a4e","line":18,"range":{"start_line":18,"start_character":20,"end_line":18,"end_character":42},"updated":"2018-08-23 15:15:00.000000000","message":"I don\u0027t see this exception in rbac_exceptions.py","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"f90c22aaf09f25826a77178903433c2a31463cde","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    regard to where the error happened. Such behavior caused false-positive"},{"line_number":16,"context_line":"    results. To prevent it from now on if an exception happened outside of"},{"line_number":17,"context_line":"    `role_override` context, it will cause a raise of"},{"line_number":18,"context_line":"    rbac_exceptions.RbacPrematureException."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"3f79a3b5_65d70d4d","line":18,"range":{"start_line":18,"start_character":20,"end_line":18,"end_character":42},"in_reply_to":"3f79a3b5_8f736a4e","updated":"2018-08-23 16:27:26.000000000","message":"Done, this is renamed to `RbacOverrideRoleException`.","commit_id":"fcd76438505e366ba5ffc27f17470c945e743f39"}]}
