)]}'
{"glance/async/taskflow_executor.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"263f1cf3b6c65df042961c232ed1e471b521d626","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                engine.run()"},{"line_number":137,"context_line":"        except exception.Forbidden as exc:"},{"line_number":138,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":139,"context_line":"                task.fail(exc.msg)"},{"line_number":140,"context_line":"                self.task_repo.save(task)"},{"line_number":141,"context_line":"        except Exception as exc:"},{"line_number":142,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_b8297be8","line":139,"range":{"start_line":139,"start_character":30,"end_line":139,"end_character":33},"updated":"2016-03-18 16:30:48.000000000","message":"I don\u0027t think we\u0027d do this.\n\nYou can\u0027t expect what a Forbidden exception would have in the message. In general, on a regular API we catch this and raise a HTTP exception that\u0027s well encapsulated.\n\nIf we copy over what\u0027s in the exception to the message, the forbidden details are exposed to the user.","commit_id":"2d6fa08e806de8f1f6ef2f44e9211996159aab90"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"0a0b66c64fd11c6743a3fa8d440ba9b771a67fa4","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        except (exception.ReadonlyProperty,"},{"line_number":138,"context_line":"                exception.ReservedProperty) as exc:"},{"line_number":139,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":140,"context_line":"                task.fail(exc.msg)"},{"line_number":141,"context_line":"                self.task_repo.save(task)"},{"line_number":142,"context_line":"        except Exception as exc:"},{"line_number":143,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_8cfeac69","line":140,"updated":"2016-03-21 16:49:54.000000000","message":"Shouldn\u0027t we be doing this for every task failure? Tasks are not exposed to non-admin users anyway.\n\nI mean, we should probably just modify L149","commit_id":"6f2f9efc981552ac80d8fd4e083bd76259d47778"},{"author":{"_account_id":17116,"name":"Niall Bunting","email":"niall.bunting@hpe.com","username":"NiallBunting"},"change_message_id":"db6c46adc2e004aac52364250c50564de9d31ef8","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        except (exception.ReadonlyProperty,"},{"line_number":138,"context_line":"                exception.ReservedProperty) as exc:"},{"line_number":139,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":140,"context_line":"                task.fail(exc.msg)"},{"line_number":141,"context_line":"                self.task_repo.save(task)"},{"line_number":142,"context_line":"        except Exception as exc:"},{"line_number":143,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_c7899dcc","line":140,"in_reply_to":"fa0719c6_8cfeac69","updated":"2016-03-21 17:12:22.000000000","message":"In that case, its probably worth modifying that as you suggest.","commit_id":"6f2f9efc981552ac80d8fd4e083bd76259d47778"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"9466c7a6536322183ae36e98736989f4c13fbedd","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                LOG.error(msg)"},{"line_number":143,"context_line":"                # NOTE(NiallBunting): As tasks are not exposed to non-admin"},{"line_number":144,"context_line":"                # users we return the exception message. This makes it easier"},{"line_number":145,"context_line":"                # for the admin to debug the task."},{"line_number":146,"context_line":"                task.fail(msg)"},{"line_number":147,"context_line":"                self.task_repo.save(task)"},{"line_number":148,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_73793ef6","line":145,"range":{"start_line":145,"start_character":18,"end_line":145,"end_character":21},"updated":"2016-03-22 16:49:24.000000000","message":"admins should be able to debug tasks using logs. why log if we are just sending exceptions back to the API message!?","commit_id":"f3e999816d3ae13958271c726adce542e3ad7d98"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"089265cd59d415d71a83eeba3646e8a9b4f205f3","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                LOG.error(msg)"},{"line_number":143,"context_line":"                # NOTE(NiallBunting): As tasks are not exposed to non-admin"},{"line_number":144,"context_line":"                # users we return the exception message. This makes it easier"},{"line_number":145,"context_line":"                # for the admin to debug the task."},{"line_number":146,"context_line":"                task.fail(msg)"},{"line_number":147,"context_line":"                self.task_repo.save(task)"},{"line_number":148,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_e37feedd","line":145,"range":{"start_line":145,"start_character":18,"end_line":145,"end_character":21},"in_reply_to":"fa0719c6_307b20f7","updated":"2016-03-23 20:55:01.000000000","message":"Tasks aren\u0027t admin-only. They can be and are meant to be exposed publicly. It\u0027s just that the default policy for tasks is admin-only.\n\nAlso, how does this change compare to this [0]?\nAre we essentially just capturing taskflow exceptions because the exceptions from the script are already being handled? If it is just taskflow exceptions, is that detail necessary for the users? \n\nLet me know if I\u0027m missing anything here.\n\n[0] https://github.com/openstack/glance/blob/master/glance/common/scripts/image_import/main.py#L73","commit_id":"f3e999816d3ae13958271c726adce542e3ad7d98"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"9dca1e7091f18563ef296e7c0945758e1e3337ac","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                LOG.error(msg)"},{"line_number":143,"context_line":"                # NOTE(NiallBunting): As tasks are not exposed to non-admin"},{"line_number":144,"context_line":"                # users we return the exception message. This makes it easier"},{"line_number":145,"context_line":"                # for the admin to debug the task."},{"line_number":146,"context_line":"                task.fail(msg)"},{"line_number":147,"context_line":"                self.task_repo.save(task)"},{"line_number":148,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_852da548","line":145,"range":{"start_line":145,"start_character":18,"end_line":145,"end_character":21},"in_reply_to":"fa0719c6_73793ef6","updated":"2016-03-22 16:57:29.000000000","message":"Giving users better error messages anyway makes sense, doesn\u0027t it?","commit_id":"f3e999816d3ae13958271c726adce542e3ad7d98"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"6f1637fbf40353cb43eaed1b146ceb28056a31bf","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                LOG.error(msg)"},{"line_number":143,"context_line":"                # NOTE(NiallBunting): As tasks are not exposed to non-admin"},{"line_number":144,"context_line":"                # users we return the exception message. This makes it easier"},{"line_number":145,"context_line":"                # for the admin to debug the task."},{"line_number":146,"context_line":"                task.fail(msg)"},{"line_number":147,"context_line":"                self.task_repo.save(task)"},{"line_number":148,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_a5ec2990","line":145,"range":{"start_line":145,"start_character":18,"end_line":145,"end_character":21},"in_reply_to":"fa0719c6_852da548","updated":"2016-03-22 17:04:45.000000000","message":"Sure but better \u0026 that do not make operators/systems insecure.","commit_id":"f3e999816d3ae13958271c726adce542e3ad7d98"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"8efc450fad9d787afaef72c70de4055d1896ec79","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                LOG.error(msg)"},{"line_number":143,"context_line":"                # NOTE(NiallBunting): As tasks are not exposed to non-admin"},{"line_number":144,"context_line":"                # users we return the exception message. This makes it easier"},{"line_number":145,"context_line":"                # for the admin to debug the task."},{"line_number":146,"context_line":"                task.fail(msg)"},{"line_number":147,"context_line":"                self.task_repo.save(task)"},{"line_number":148,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_307b20f7","line":145,"range":{"start_line":145,"start_character":18,"end_line":145,"end_character":21},"in_reply_to":"fa0719c6_a5ec2990","updated":"2016-03-23 06:54:19.000000000","message":"Task is an admin-only API. So it\u0027s safe here IMHO.","commit_id":"f3e999816d3ae13958271c726adce542e3ad7d98"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"1e00bac68ef145b7ffc935d2616acd75d880410d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                LOG.error(msg)"},{"line_number":143,"context_line":"                # NOTE(NiallBunting): As tasks are not exposed to non-admin"},{"line_number":144,"context_line":"                # users we return the exception message. This makes it easier"},{"line_number":145,"context_line":"                # for the admin to debug the task."},{"line_number":146,"context_line":"                task.fail(msg)"},{"line_number":147,"context_line":"                self.task_repo.save(task)"},{"line_number":148,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_699ba366","line":145,"range":{"start_line":145,"start_character":18,"end_line":145,"end_character":21},"in_reply_to":"fa0719c6_e37feedd","updated":"2016-03-24 11:26:08.000000000","message":"Hermanth,\n\nJust one clarification here. Tasks shouldn\u0027t be exposed publicly and we\u0027ve been advocating against that. We marked the tasks API as admin-only and we are going to deprecate it in Newton.\n\nWe are not going to remove it and we are not going to deprecate the tasks *engine*.","commit_id":"f3e999816d3ae13958271c726adce542e3ad7d98"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"049bec106151738357285d4c70de5510894b430e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                LOG.error(msg)"},{"line_number":143,"context_line":"                # NOTE(NiallBunting): As tasks are not exposed to non-admin"},{"line_number":144,"context_line":"                # users we return the exception message. This makes it easier"},{"line_number":145,"context_line":"                # for the admin to debug the task."},{"line_number":146,"context_line":"                task.fail(msg)"},{"line_number":147,"context_line":"                self.task_repo.save(task)"},{"line_number":148,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa0719c6_7566ea2a","line":145,"range":{"start_line":145,"start_character":18,"end_line":145,"end_character":21},"in_reply_to":"fa0719c6_e37feedd","updated":"2016-03-24 02:18:48.000000000","message":"Oh, yes, It depends on the policy.","commit_id":"f3e999816d3ae13958271c726adce542e3ad7d98"}]}
