)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"940d1b223270b1015a9c0797820125fbf00f2e7a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangbailin \u003czhangbailin@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-02-28 15:48:21 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove fatal\u003dFalse from os-instance-actions show API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We should test the authorized contexts and the unauthorized contexts,"},{"line_number":10,"context_line":"and check the PolicyNotAuthorized [1]."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1fa4df85_44f1fecc","line":7,"updated":"2020-03-02 11:30:03.000000000","message":"The main goal here is to correct the target in os-instance-actions?\n\nI don\u0027t think we really should remove fatal\u003dFalse here.","commit_id":"9011da79a2b7a58864c0dac355407e8644aa11c1"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"f050422ccce09a6f3f0d1274b89df3e44d8a370e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangbailin \u003czhangbailin@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-02-28 15:48:21 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove fatal\u003dFalse from os-instance-actions show API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We should test the authorized contexts and the unauthorized contexts,"},{"line_number":10,"context_line":"and check the PolicyNotAuthorized [1]."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1fa4df85_f6ce6558","line":7,"in_reply_to":"1fa4df85_44f1fecc","updated":"2020-03-04 23:56:16.000000000","message":"yeah, purpose of policy check here is different not to fail.","commit_id":"9011da79a2b7a58864c0dac355407e8644aa11c1"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"847cf42c0e30da2b00310042255085a664c76416","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangbailin \u003czhangbailin@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-02-28 15:48:21 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove fatal\u003dFalse from os-instance-actions show API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We should test the authorized contexts and the unauthorized contexts,"},{"line_number":10,"context_line":"and check the PolicyNotAuthorized [1]."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1fa4df85_36babd6d","line":7,"in_reply_to":"1fa4df85_f6ce6558","updated":"2020-03-05 00:55:05.000000000","message":"Done","commit_id":"9011da79a2b7a58864c0dac355407e8644aa11c1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ed84133e5b922af4387e5ed3e604b05ec3868248","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"And add target to pass the server project_id in policy target."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Partial implement blueprint policy-defaults-refresh"},{"line_number":26,"context_line":"Closes-Bug: #1865117"},{"line_number":27,"context_line":"Change-Id: I98405ebc216d4567b004d1222298136ab64fd5d1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1fa4df85_50ea2bac","line":25,"updated":"2020-02-28 17:49:56.000000000","message":"nit: newline under this would be nice","commit_id":"9011da79a2b7a58864c0dac355407e8644aa11c1"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"847cf42c0e30da2b00310042255085a664c76416","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"And add target to pass the server project_id in policy target."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Partial implement blueprint policy-defaults-refresh"},{"line_number":26,"context_line":"Closes-Bug: #1865117"},{"line_number":27,"context_line":"Change-Id: I98405ebc216d4567b004d1222298136ab64fd5d1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1fa4df85_d6b24994","line":25,"in_reply_to":"1fa4df85_50ea2bac","updated":"2020-03-05 00:55:05.000000000","message":"Done","commit_id":"9011da79a2b7a58864c0dac355407e8644aa11c1"}],"nova/api/openstack/compute/instance_actions.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"940d1b223270b1015a9c0797820125fbf00f2e7a","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        show_events \u003d False"},{"line_number":159,"context_line":"        show_traceback \u003d False"},{"line_number":160,"context_line":"        show_host \u003d False"},{"line_number":161,"context_line":"        if context.can(ia_policies.POLICY_ROOT % \u0027events\u0027, fatal\u003dFalse):"},{"line_number":162,"context_line":"            # For all microversions, the user can see all event details"},{"line_number":163,"context_line":"            # including the traceback."},{"line_number":164,"context_line":"            show_events \u003d show_traceback \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_64175aef","side":"PARENT","line":161,"updated":"2020-03-02 11:30:03.000000000","message":"Why can\u0027t we keep this approach? I think the idea was that without fatel\u003dFalse we get strange log messages on success. Are you sure the new approach doesn\u0027t cause strage log messages?","commit_id":"392bfe867011c6b6141e651f66ca493a7aed1a1a"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"847cf42c0e30da2b00310042255085a664c76416","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        show_events \u003d False"},{"line_number":159,"context_line":"        show_traceback \u003d False"},{"line_number":160,"context_line":"        show_host \u003d False"},{"line_number":161,"context_line":"        if context.can(ia_policies.POLICY_ROOT % \u0027events\u0027, fatal\u003dFalse):"},{"line_number":162,"context_line":"            # For all microversions, the user can see all event details"},{"line_number":163,"context_line":"            # including the traceback."},{"line_number":164,"context_line":"            show_events \u003d show_traceback \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_b9e0de27","side":"PARENT","line":161,"in_reply_to":"1fa4df85_36e95db6","updated":"2020-03-05 00:55:05.000000000","message":"Ok, let me keep this approach, and think of another way to give a test.","commit_id":"392bfe867011c6b6141e651f66ca493a7aed1a1a"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1f377fa8365e33d57a1f32ce2a12c03f95bf8e39","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        show_events \u003d False"},{"line_number":159,"context_line":"        show_traceback \u003d False"},{"line_number":160,"context_line":"        show_host \u003d False"},{"line_number":161,"context_line":"        if context.can(ia_policies.POLICY_ROOT % \u0027events\u0027, fatal\u003dFalse):"},{"line_number":162,"context_line":"            # For all microversions, the user can see all event details"},{"line_number":163,"context_line":"            # including the traceback."},{"line_number":164,"context_line":"            show_events \u003d show_traceback \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_eddeb90f","side":"PARENT","line":161,"in_reply_to":"1fa4df85_64175aef","updated":"2020-03-03 10:41:52.000000000","message":"If fatal\u003dTrue, that will raise directly, if fatal\u003dFalse, that will be return False not raise exception [1]. Indeed I think we don\u0027t necessary to keep this approach, use try..except instead of fatal\u003dFalse is ok.\n\n[1]https://opendev.org/openstack/nova/src/branch/master/nova/context.py#L245","commit_id":"392bfe867011c6b6141e651f66ca493a7aed1a1a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"f050422ccce09a6f3f0d1274b89df3e44d8a370e","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        show_events \u003d False"},{"line_number":159,"context_line":"        show_traceback \u003d False"},{"line_number":160,"context_line":"        show_host \u003d False"},{"line_number":161,"context_line":"        if context.can(ia_policies.POLICY_ROOT % \u0027events\u0027, fatal\u003dFalse):"},{"line_number":162,"context_line":"            # For all microversions, the user can see all event details"},{"line_number":163,"context_line":"            # including the traceback."},{"line_number":164,"context_line":"            show_events \u003d show_traceback \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_36e95db6","side":"PARENT","line":161,"in_reply_to":"1fa4df85_e4f8017c","updated":"2020-03-04 23:56:16.000000000","message":"yeah, this policy is not to return 403 for user but to control the log message. If policy pass then we add the traceback for each event otherwise not.","commit_id":"392bfe867011c6b6141e651f66ca493a7aed1a1a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"47a00e0e05f5c3659e619289b08b3a9bdad714fe","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        show_events \u003d False"},{"line_number":159,"context_line":"        show_traceback \u003d False"},{"line_number":160,"context_line":"        show_host \u003d False"},{"line_number":161,"context_line":"        if context.can(ia_policies.POLICY_ROOT % \u0027events\u0027, fatal\u003dFalse):"},{"line_number":162,"context_line":"            # For all microversions, the user can see all event details"},{"line_number":163,"context_line":"            # including the traceback."},{"line_number":164,"context_line":"            show_events \u003d show_traceback \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_e4f8017c","side":"PARENT","line":161,"in_reply_to":"1fa4df85_eddeb90f","updated":"2020-03-04 09:43:05.000000000","message":"But in both of these approaches, the unit test doesn\u0027t get an exception raised, which I though is why we were doing this change?","commit_id":"392bfe867011c6b6141e651f66ca493a7aed1a1a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"47a00e0e05f5c3659e619289b08b3a9bdad714fe","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":142,"context_line":"        instance \u003d self._get_instance(req, context, server_id)"},{"line_number":143,"context_line":"        context.can(ia_policies.BASE_POLICY_NAME,"},{"line_number":144,"context_line":"                    target\u003d{\u0027project_id\u0027: instance.project_id})"},{"line_number":145,"context_line":"        action \u003d self.action_api.action_get_by_request_id(context, instance,"},{"line_number":146,"context_line":"                                                          id)"},{"line_number":147,"context_line":"        if action is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_6432d161","line":144,"updated":"2020-03-04 09:43:05.000000000","message":"To be clear, I am good with this bit of the change.","commit_id":"9011da79a2b7a58864c0dac355407e8644aa11c1"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"61d96c809a20178c0e6ed44d5f0643b99b204ece","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        show_events \u003d False"},{"line_number":162,"context_line":"        show_traceback \u003d False"},{"line_number":163,"context_line":"        show_host \u003d False"},{"line_number":164,"context_line":"        if context.can(ia_policies.POLICY_ROOT % \u0027events\u0027,"},{"line_number":165,"context_line":"                       target\u003d{\u0027project_id\u0027: instance.project_id},"},{"line_number":166,"context_line":"                       fatal\u003dFalse):"},{"line_number":167,"context_line":"            # For all microversions, the user can see all event details"},{"line_number":168,"context_line":"            # including the traceback."},{"line_number":169,"context_line":"            show_events \u003d show_traceback \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_70e57e37","line":166,"range":{"start_line":164,"start_character":0,"end_line":166,"end_character":36},"updated":"2020-03-06 14:20:59.000000000","message":"you should not pass the project id here as it is admin only not admin_or-owner\n\nhttps://github.com/openstack/nova/blob/38a11ed4a72bb6dc67cccb428648baf90e63f9ab/nova/policies/instance_actions.py#L28","commit_id":"3903b91676c75b8d0082975337d0192e5dd96788"}]}
