)]}'
{"oslo_policy/policy.py":[{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"57fa05085ce5c6e0767183fed138d12f58890bd9","unresolved":false,"context_lines":[{"line_number":581,"context_line":"                    overwrite\u003dself.overwrite"},{"line_number":582,"context_line":"                )"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"            if policy_file_rules_changed or force_reload:"},{"line_number":585,"context_line":"                force_reload_policy_dir \u003d True"},{"line_number":586,"context_line":"            else:"},{"line_number":587,"context_line":"                force_reload_policy_dir \u003d force_reload"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_4cd046f8","line":584,"range":{"start_line":584,"start_character":41,"end_line":584,"end_character":56},"updated":"2020-05-29 12:53:04.000000000","message":"LGTM but force_reload could become the default and then overrided only if policy is changed:\n\n```\nforce_reload_policy_dir \u003d force_reload\nif policy_file_rules_changed:\n    force_reload_policy_dir \u003d True\n```","commit_id":"35b19109b58222747a385d6865bcaf5197ec27b5"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"7fb30a7bd50be74383dd1c7f31ee5b50e4935a33","unresolved":false,"context_lines":[{"line_number":581,"context_line":"                    overwrite\u003dself.overwrite"},{"line_number":582,"context_line":"                )"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":"            if policy_file_rules_changed or force_reload:"},{"line_number":585,"context_line":"                force_reload_policy_dir \u003d True"},{"line_number":586,"context_line":"            else:"},{"line_number":587,"context_line":"                force_reload_policy_dir \u003d force_reload"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_47977f91","line":584,"range":{"start_line":584,"start_character":41,"end_line":584,"end_character":56},"in_reply_to":"ff570b3c_4cd046f8","updated":"2020-05-29 13:26:21.000000000","message":"Thanks for the review!\n\nI\u0027ll make the change.","commit_id":"35b19109b58222747a385d6865bcaf5197ec27b5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d4c6a7ec1df477407192e92ac75c9e47d30df3bf","unresolved":false,"context_lines":[{"line_number":785,"context_line":"        # is in the cache"},{"line_number":786,"context_line":"        mtime \u003d 0"},{"line_number":787,"context_line":"        if os.path.exists(path):"},{"line_number":788,"context_line":"            if not os.path.isdir(path):"},{"line_number":789,"context_line":"                raise ValueError(\u0027%s is not a directory\u0027 % path)"},{"line_number":790,"context_line":"            # Make a list of all the files"},{"line_number":791,"context_line":"            files \u003d [path] + [os.path.join(path, file) for file in"},{"line_number":792,"context_line":"                              os.listdir(path)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_8996453e","line":789,"range":{"start_line":788,"start_character":0,"end_line":789,"end_character":64},"updated":"2020-06-08 10:31:54.000000000","message":"Can we get a test for this? It should probably be a separate change too but that\u0027s not a big deal","commit_id":"90ebd500ff4be373b5b84498c2615b845ad6aa33"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"bea4b283ccd0a38da95f7a76148144560edd461e","unresolved":false,"context_lines":[{"line_number":785,"context_line":"        # is in the cache"},{"line_number":786,"context_line":"        mtime \u003d 0"},{"line_number":787,"context_line":"        if os.path.exists(path):"},{"line_number":788,"context_line":"            if not os.path.isdir(path):"},{"line_number":789,"context_line":"                raise ValueError(\u0027%s is not a directory\u0027 % path)"},{"line_number":790,"context_line":"            # Make a list of all the files"},{"line_number":791,"context_line":"            files \u003d [path] + [os.path.join(path, file) for file in"},{"line_number":792,"context_line":"                              os.listdir(path)]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_0974f5fd","line":789,"range":{"start_line":788,"start_character":0,"end_line":789,"end_character":64},"in_reply_to":"ff570b3c_8996453e","updated":"2020-06-08 12:10:13.000000000","message":"I think there is an existing test case which covers this:\n\nhttps://opendev.org/openstack/oslo.policy/src/commit/90009d338c85cba32529de280faec905126d57dd/oslo_policy/tests/test_policy.py#L417-L423\n\nThe reason why there were no failures previously with it was that force_reload was set to True which meant that `_is_directory_updated` was never evaluated:\n\nif (force_reload or self._is_directory_updated(\n                        self._policy_dir_mtimes, path)):\n\n\nI am going to add another assertion to it with False passed in:\n\nself.assertRaises(ValueError, self.enforcer.load_rules, False)","commit_id":"90ebd500ff4be373b5b84498c2615b845ad6aa33"}],"oslo_policy/tests/test_policy.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d4c6a7ec1df477407192e92ac75c9e47d30df3bf","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        loaded_rules \u003d jsonutils.loads(str(self.enforcer.rules))"},{"line_number":331,"context_line":"        self.assertEqual(\u0027role:fakeA\u0027, loaded_rules[\u0027default\u0027])"},{"line_number":332,"context_line":"        self.assertEqual(\u0027is_admin:True\u0027, loaded_rules[\u0027admin\u0027])"},{"line_number":333,"context_line":"        print(loaded_rules)"},{"line_number":334,"context_line":"        self.assertEqual(\u0027rule:bar\u0027, loaded_rules[\u0027foo\u0027])"},{"line_number":335,"context_line":"        self.check_loaded_files(["},{"line_number":336,"context_line":"            \u0027policy.json\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_a977c93b","line":333,"range":{"start_line":333,"start_character":0,"end_line":333,"end_character":27},"updated":"2020-06-08 10:31:54.000000000","message":"Drop this","commit_id":"90ebd500ff4be373b5b84498c2615b845ad6aa33"},{"author":{"_account_id":24824,"name":"Dmitrii Shcherbakov","username":"dmitriis"},"change_message_id":"bea4b283ccd0a38da95f7a76148144560edd461e","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        loaded_rules \u003d jsonutils.loads(str(self.enforcer.rules))"},{"line_number":331,"context_line":"        self.assertEqual(\u0027role:fakeA\u0027, loaded_rules[\u0027default\u0027])"},{"line_number":332,"context_line":"        self.assertEqual(\u0027is_admin:True\u0027, loaded_rules[\u0027admin\u0027])"},{"line_number":333,"context_line":"        print(loaded_rules)"},{"line_number":334,"context_line":"        self.assertEqual(\u0027rule:bar\u0027, loaded_rules[\u0027foo\u0027])"},{"line_number":335,"context_line":"        self.check_loaded_files(["},{"line_number":336,"context_line":"            \u0027policy.json\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_e9d421ec","line":333,"range":{"start_line":333,"start_character":0,"end_line":333,"end_character":27},"in_reply_to":"ff570b3c_a977c93b","updated":"2020-06-08 12:10:13.000000000","message":"Thanks for noticing! I should have removed this after testing.","commit_id":"90ebd500ff4be373b5b84498c2615b845ad6aa33"}],"releasenotes/notes/bug-1880959-8f1370a59759d40d.yaml":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bcc17d8aa07af40a98a50faa26fe54e5b90d861d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    [`bug 1880959 \u003chttps://bugs.launchpad.net/keystone/+bug/1880959\u003e`_]"},{"line_number":5,"context_line":"    The behavior of policy file reloading from policy directories was fixed."},{"line_number":6,"context_line":"    Previously the rules from policy files located in the directories"},{"line_number":7,"context_line":"    specified in the `policy_dirs` option were not re-applied after the rules"},{"line_number":8,"context_line":"    from the primary policy file have been re-applied due to a change."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ff570b3c_817299ac","line":7,"range":{"start_line":7,"start_character":21,"end_line":7,"end_character":34},"updated":"2020-06-08 13:36:10.000000000","message":"``literal`` (double backticks)","commit_id":"9744eb155ae1326ca7055dd609f0841ebb6cfb20"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bcc17d8aa07af40a98a50faa26fe54e5b90d861d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    [`bug 1880959 \u003chttps://bugs.launchpad.net/keystone/+bug/1880959\u003e`_]"},{"line_number":5,"context_line":"    The behavior of policy file reloading from policy directories was fixed."},{"line_number":6,"context_line":"    Previously the rules from policy files located in the directories"},{"line_number":7,"context_line":"    specified in the `policy_dirs` option were not re-applied after the rules"},{"line_number":8,"context_line":"    from the primary policy file have been re-applied due to a change."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ff570b3c_c163f1dc","line":7,"range":{"start_line":7,"start_character":51,"end_line":7,"end_character":61},"updated":"2020-06-08 13:36:10.000000000","message":"reapplied (below too)","commit_id":"9744eb155ae1326ca7055dd609f0841ebb6cfb20"}]}
