)]}'
{"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"87c82d3dd9cd8be105203e51400c1060b52c37b3","unresolved":false,"context_lines":[{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"        if info_cache and info_cache[\u0027deleted\u0027]:"},{"line_number":1935,"context_line":"            # NOTE(tr3buchet): let\u0027s leave it alone if it\u0027s already deleted"},{"line_number":1936,"context_line":"            return"},{"line_number":1937,"context_line":"        elif not info_cache:"},{"line_number":1938,"context_line":"            # NOTE(tr3buchet): just in case someone blows away an instance\u0027s"},{"line_number":1939,"context_line":"            #                  cache entry"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BnyM%3D","line":1936,"updated":"2013-02-25 15:48:53.000000000","message":"Does returning None here change the API enough to cause problems for the caller?","commit_id":"500dc2f39c4949860a3772d67bc6312e46b0691f"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"9a154495be1bec3cd29aa2f8027ed44b7e6f5371","unresolved":false,"context_lines":[{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"        if info_cache and info_cache[\u0027deleted\u0027]:"},{"line_number":1935,"context_line":"            # NOTE(tr3buchet): let\u0027s leave it alone if it\u0027s already deleted"},{"line_number":1936,"context_line":"            return"},{"line_number":1937,"context_line":"        elif not info_cache:"},{"line_number":1938,"context_line":"            # NOTE(tr3buchet): just in case someone blows away an instance\u0027s"},{"line_number":1939,"context_line":"            #                  cache entry"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BlIE%3D","line":1936,"in_reply_to":"AAAAM3%2F%2BlOs%3D","updated":"2013-02-26 20:36:43.000000000","message":"Ya.  Since this case would already raise a weird DBDuplicateEntry exception... it\u0027s probably okay to make it explicitly raise NotFound of some sort.","commit_id":"500dc2f39c4949860a3772d67bc6312e46b0691f"},{"author":{"_account_id":100,"name":"Johannes Erdfelt","email":"johannes@erdfelt.com","username":"johannes.erdfelt"},"change_message_id":"03db36d2782cc0ac7db3298f8aa90ddc48b40906","unresolved":false,"context_lines":[{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"        if info_cache and info_cache[\u0027deleted\u0027]:"},{"line_number":1935,"context_line":"            # NOTE(tr3buchet): let\u0027s leave it alone if it\u0027s already deleted"},{"line_number":1936,"context_line":"            return"},{"line_number":1937,"context_line":"        elif not info_cache:"},{"line_number":1938,"context_line":"            # NOTE(tr3buchet): just in case someone blows away an instance\u0027s"},{"line_number":1939,"context_line":"            #                  cache entry"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BlOs%3D","line":1936,"in_reply_to":"AAAAM3%2F%2BlpU%3D","updated":"2013-02-26 19:58:18.000000000","message":"I can see two possible solutions:\n1) Make the caller handle None\n2) Raise an exception (assuming this really is exceptional and we can\u0027t handle it)\n\nI\u0027m not a fan of returning None and having the caller traceback in a weird way :)","commit_id":"500dc2f39c4949860a3772d67bc6312e46b0691f"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"98fb0309f88d71e333091d2d7049dbc637f96949","unresolved":false,"context_lines":[{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"        if info_cache and info_cache[\u0027deleted\u0027]:"},{"line_number":1935,"context_line":"            # NOTE(tr3buchet): let\u0027s leave it alone if it\u0027s already deleted"},{"line_number":1936,"context_line":"            return"},{"line_number":1937,"context_line":"        elif not info_cache:"},{"line_number":1938,"context_line":"            # NOTE(tr3buchet): just in case someone blows away an instance\u0027s"},{"line_number":1939,"context_line":"            #                  cache entry"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2BlpU%3D","line":1936,"in_reply_to":"AAAAM3%2F%2BnyM%3D","updated":"2013-02-26 17:10:56.000000000","message":"Good question. Technically I don\u0027t think it should have returned anything if it was \u0027deleted\u0027 before.  It seems wrong to return a model with \u0027deleted\u0027 being set.  The other bug here (I think I left it out of the commit message, but I can update it), is that it was try to create a new entry if the old one was deleted... despite the fact that the comment above says \"let\u0027s leave it alone if it\u0027s already deleted\".  This would actually fail because \u0027instance_uuid\u0027 is a unique key in this table.\n\nDoing a quick scan, the only place I see where the return value is used is for cells within the nova/db/api.py call itself.  I could fix it to check for None.  Opinions on all of this?","commit_id":"500dc2f39c4949860a3772d67bc6312e46b0691f"}]}
