)]}'
{"openstack_dashboard/api/keystone.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"acaab2ad8ca52645d4ea86da678fe16990242fbd","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        return manager.get(project)"},{"line_number":343,"context_line":"    except keystone_exceptions.NotFound:"},{"line_number":344,"context_line":"        LOG.info(\"Tenant \u0027%s\u0027 not found.\", project)"},{"line_number":345,"context_line":"        return None"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"@profiler.trace"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f2577a7_8a889171","line":345,"updated":"2017-09-10 00:36:35.000000000","message":"I don\u0027t think it is a good idea to change a return value in case of NotFound. tenant_get is called from other places, so it is better to raise an exception and catch the exception in the caller side (admin/instances in this case).","commit_id":"3ad96875d0adc66c128b95b417d9b743ce31779d"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"d0e863c4c00e15ddcd9e82a655f70aa4144918e1","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        return manager.get(project)"},{"line_number":343,"context_line":"    except keystone_exceptions.NotFound:"},{"line_number":344,"context_line":"        LOG.info(\"Tenant \u0027%s\u0027 not found.\", project)"},{"line_number":345,"context_line":"        return None"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"@profiler.trace"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f2577a7_1a8e2078","line":345,"in_reply_to":"5f2577a7_8a889171","updated":"2017-09-11 17:29:09.000000000","message":"Sounds reasonable, I\u0027ll do it in a following patch","commit_id":"3ad96875d0adc66c128b95b417d9b743ce31779d"},{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"ff098030b7eea923fc04e98a92ee8e2fa2771a09","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        return manager.get(project)"},{"line_number":343,"context_line":"    except keystone_exceptions.NotFound:"},{"line_number":344,"context_line":"        LOG.info(\"Tenant \u0027%s\u0027 not found.\", project)"},{"line_number":345,"context_line":"        raise exceptions.NotFound()"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"@profiler.trace"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_60922e4e","line":345,"updated":"2017-10-03 17:21:45.000000000","message":"why are you raising a different exception? if you are going to change the approach, I think it\u0027s important to keep the exception the same. just re-raise the same exception. This effects all code calling this method. Let\u0027s not randomly change the behavior. just catch the keystone NotFound exception in the other file you\u0027ve edited.","commit_id":"f0cdd99c71bd22581295356597a39496a9b27952"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"345532060cb7b194f8caa36bdee5cb88c29c0121","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        return manager.get(project)"},{"line_number":343,"context_line":"    except keystone_exceptions.NotFound:"},{"line_number":344,"context_line":"        LOG.info(\"Tenant \u0027%s\u0027 not found.\", project)"},{"line_number":345,"context_line":"        raise exceptions.NotFound()"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"@profiler.trace"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_de9d290b","line":345,"in_reply_to":"7f515b1d_60922e4e","updated":"2017-10-04 16:26:38.000000000","message":"It makes sense to me. I\u0027ll change id in a next patch","commit_id":"f0cdd99c71bd22581295356597a39496a9b27952"}],"openstack_dashboard/dashboards/admin/instances/tables.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"e6db90c2f2ccee65ed3bf770e7439076d0b9f67b","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                             instance.tenant_id,"},{"line_number":100,"context_line":"                                             admin\u003dTrue)"},{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_1da34602","line":102,"range":{"start_line":102,"start_character":15,"end_line":102,"end_character":24},"updated":"2017-08-28 14:54:44.000000000","message":"should we distinguish between genuine NotFound error (tenant is gone) and other possible exceptions (like possible connection issues, or auth issues)? or the latter are handled in api.keystone.tenant_get()?","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"1c8ac68d204195818a60b141e2fe7ad00865faaa","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                             instance.tenant_id,"},{"line_number":100,"context_line":"                                             admin\u003dTrue)"},{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_b83a00c9","line":102,"range":{"start_line":102,"start_character":15,"end_line":102,"end_character":24},"in_reply_to":"7f287b81_1da34602","updated":"2017-08-28 15:21:48.000000000","message":"++ to what Pavlo said","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"f47addf70304b1fe5276a71021ea1674132ef7de","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                             instance.tenant_id,"},{"line_number":100,"context_line":"                                             admin\u003dTrue)"},{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_5f8acdbe","line":102,"range":{"start_line":102,"start_character":15,"end_line":102,"end_character":24},"in_reply_to":"7f287b81_28d23b01","updated":"2017-08-29 09:54:55.000000000","message":"IMO, \"except Exception\" is always bad practice. If you consider some exception as safe then you must catch this exception and let the other exceptions to be raised. it would be the best way IMO.","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"8857c64f939ca66215095527eb872939e09b36cf","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                             instance.tenant_id,"},{"line_number":100,"context_line":"                                             admin\u003dTrue)"},{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_da96c8f0","line":102,"range":{"start_line":102,"start_character":15,"end_line":102,"end_character":24},"in_reply_to":"7f287b81_5f8acdbe","updated":"2017-08-29 12:38:35.000000000","message":"Kairat, in general, I agree with you but in case of Horizon, the user should not see any of unhandled errors. E.g.: user should not see 500 error","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"d3b8fda740c26f3191fb8b440980cccadc9427b8","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                             instance.tenant_id,"},{"line_number":100,"context_line":"                                             admin\u003dTrue)"},{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_28d23b01","line":102,"range":{"start_line":102,"start_character":15,"end_line":102,"end_character":24},"in_reply_to":"7f287b81_b83a00c9","updated":"2017-08-28 17:49:22.000000000","message":"From user\u0027s perspective, it won\u0027t be useful to have several messages like \u0027Tenant A was deleted\u0027, that\u0027s why we don\u0027t need to catch it here. For other cases, I filed bug I filed a bug to fix these issues https://bugs.launchpad.net/horizon/+bug/1713541","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ac98f41f451d57afa0e5de55f27f9c5b50c8e9bb","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                             instance.tenant_id,"},{"line_number":100,"context_line":"                                             admin\u003dTrue)"},{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_1ac21035","line":102,"range":{"start_line":102,"start_character":15,"end_line":102,"end_character":24},"in_reply_to":"7f287b81_da96c8f0","updated":"2017-09-08 11:01:39.000000000","message":"IMHO if we know some expected exception it should be handled separately. In this case, we expect NotFound exception in most cases.\nHow about:\n\n  except xxxx.NotFound:\n     ...\n  except Exception:\n     ...","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"055203aa294d90aa8dc0a622c23e3c2131c14499","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                                             admin\u003dTrue)"},{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_0281a14a","line":103,"updated":"2017-08-28 14:26:59.000000000","message":"Any exception info in logs?","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"57b885e387c33a09849fb0c511b5878313910d0b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                                             admin\u003dTrue)"},{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_02d401bc","line":103,"in_reply_to":"7f287b81_0281a14a","updated":"2017-08-28 14:43:48.000000000","message":"We don\u0027t need to do it explicitly [1] \n\n[1] https://docs.python.org/3/library/logging.html#logging.exception","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ac98f41f451d57afa0e5de55f27f9c5b50c8e9bb","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                                             admin\u003dTrue)"},{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_baa65cc0","line":103,"in_reply_to":"7f287b81_02d401bc","updated":"2017-09-08 11:01:39.000000000","message":"LOG.exception should be used only for unknown exception.\nIn this case, I don\u0027t think you need to use LOG.exception.\nInstead it is better to log information on tenant ID and exception type/message. LOG.exception does not provide a lot.","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"0b448e735c3e1aff5081a5df3acc92f0ae670770","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_428b296d","line":104,"updated":"2017-08-28 14:29:30.000000000","message":"can we somehow set the instance.tenant_name to something meaningful for Horizon user, like \"Not Found\" or \"Orphaned\" instead of None? or this field must always be a UUID if set?\n\nor is there smth like \u0027show deleted\u0027 for tenants (presuming they are soft-deleted too..)","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ac98f41f451d57afa0e5de55f27f9c5b50c8e9bb","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_fa706442","line":104,"in_reply_to":"7f287b81_08cadf4c","updated":"2017-09-08 11:01:39.000000000","message":"What information will be shown in \"Project\" column with this patch? If it is empty, I think it is much better to set some value like a shortened UUID as tenant_name in \"exception\" clause.","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"e6db90c2f2ccee65ed3bf770e7439076d0b9f67b","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_5d01ce04","line":104,"in_reply_to":"7f287b81_22cffd29","updated":"2017-08-28 14:54:44.000000000","message":"fair enough","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"57b885e387c33a09849fb0c511b5878313910d0b","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_22cffd29","line":104,"in_reply_to":"7f287b81_428b296d","updated":"2017-08-28 14:43:48.000000000","message":"It\u0027s a good idea, but IMO it should be done out of scope of this bug for all panels","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"d3b8fda740c26f3191fb8b440980cccadc9427b8","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", None)"},{"line_number":102,"context_line":"        except Exception:"},{"line_number":103,"context_line":"            LOG.exception(\"Failed to retrieve tenant information\")"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        return instance"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_08cadf4c","line":104,"in_reply_to":"7f287b81_5d01ce04","updated":"2017-08-28 17:49:22.000000000","message":"I filed a bug to fix these issue https://bugs.launchpad.net/horizon/+bug/1713541","commit_id":"fb79c0ca2fd150396de1f386e3f74fa57712349c"},{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"ff098030b7eea923fc04e98a92ee8e2fa2771a09","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            tenant \u003d api.keystone.tenant_get(request,"},{"line_number":95,"context_line":"                                             instance.tenant_id,"},{"line_number":96,"context_line":"                                             admin\u003dTrue)"},{"line_number":97,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", instance.tenant_id)"},{"line_number":98,"context_line":"        except exceptions.NotFound:"},{"line_number":99,"context_line":"            instance.tenant_name \u003d instance.tenant_id"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_20e0b6fa","line":97,"updated":"2017-10-03 17:21:45.000000000","message":"I\u0027m not a fan of populating fields with incorrect data. Can\u0027t we leave this blank?","commit_id":"f0cdd99c71bd22581295356597a39496a9b27952"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"345532060cb7b194f8caa36bdee5cb88c29c0121","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            tenant \u003d api.keystone.tenant_get(request,"},{"line_number":95,"context_line":"                                             instance.tenant_id,"},{"line_number":96,"context_line":"                                             admin\u003dTrue)"},{"line_number":97,"context_line":"            instance.tenant_name \u003d getattr(tenant, \"name\", instance.tenant_id)"},{"line_number":98,"context_line":"        except exceptions.NotFound:"},{"line_number":99,"context_line":"            instance.tenant_name \u003d instance.tenant_id"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_1e62a117","line":97,"in_reply_to":"7f515b1d_20e0b6fa","updated":"2017-10-04 16:26:38.000000000","message":"Done","commit_id":"f0cdd99c71bd22581295356597a39496a9b27952"}]}
