)]}'
{"barbican/api/app.py":[{"author":{"_account_id":8004,"name":"Paul Kehrer","email":"paul.l.kehrer@gmail.com","username":"reaperhulk"},"change_message_id":"6501a1e562bf0dca025c140efeaf94f4b30892d8","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        transport_keys \u003d transportkeys.TransportKeysController()"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    wsgi_app \u003d PecanAPI("},{"line_number":118,"context_line":"        RootController(), is_transactional\u003dTrue, force_canonical\u003dFalse)"},{"line_number":119,"context_line":"    if newrelic_loaded:"},{"line_number":120,"context_line":"        wsgi_app \u003d newrelic.agent.WSGIApplicationWrapper(wsgi_app)"},{"line_number":121,"context_line":"    return wsgi_app"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_ae4574b4","line":118,"updated":"2014-10-02 15:55:24.000000000","message":"So what does this actually do?","commit_id":"7dcef77005664b2958fd4e0a4514b5f2d23111d2"}],"barbican/model/repositories.py":[{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"3d887c59ce7939966c7d4bd4c352158752ecbc84","unresolved":false,"context_lines":[{"line_number":72,"context_line":"_IDLE_TIMEOUT \u003d None"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"# Database/SQLAlchemy lifecycle functions, to support request-based workflows:"},{"line_number":76,"context_line":"def start():"},{"line_number":77,"context_line":"    configure_db()"},{"line_number":78,"context_line":"    get_session()"}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_a4f765f4","line":75,"updated":"2014-10-02 02:15:46.000000000","message":"I prefer to document functions wit docstrings.  Once merged, it won\u0027t be clear how many functions this comment applies to.","commit_id":"cdf50321b955db913da1d827c6ea61926da9d97a"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"3d887c59ce7939966c7d4bd4c352158752ecbc84","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        self._do_validate(entity.to_dict())"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        try:"},{"line_number":402,"context_line":"            entity.save()  # session\u003dsession)"},{"line_number":403,"context_line":"        except sqlalchemy.exc.IntegrityError:"},{"line_number":404,"context_line":"            LOG.exception(\u0027Problem saving entity for update\u0027)"},{"line_number":405,"context_line":"            raise exception.NotFound(\"Entity ID %s not found\""}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_64865d67","line":402,"updated":"2014-10-02 02:15:46.000000000","message":"Comment is not needed here.","commit_id":"cdf50321b955db913da1d827c6ea61926da9d97a"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"3d887c59ce7939966c7d4bd4c352158752ecbc84","unresolved":false,"context_lines":[{"line_number":681,"context_line":"            meta_model \u003d models.SecretStoreMetadatum(k, v)"},{"line_number":682,"context_line":"            meta_model.updated_at \u003d now"},{"line_number":683,"context_line":"            meta_model.secret \u003d secret_model"},{"line_number":684,"context_line":"            meta_model.save()  # session\u003dsession)"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"    def get_metadata_for_secret(self, secret_id):"},{"line_number":687,"context_line":"        \"\"\"Returns a dict of SecretStoreMetadatum instances.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_c4c46994","line":684,"updated":"2014-10-02 02:15:46.000000000","message":"Please remove comment.","commit_id":"cdf50321b955db913da1d827c6ea61926da9d97a"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"e6d8cc725ee80140041e3e7e913313cca5c424a2","unresolved":false,"context_lines":[{"line_number":1102,"context_line":"            container.consumers.append(new_consumer)"},{"line_number":1103,"context_line":"            container.save(session\u003dsession)"},{"line_number":1104,"context_line":"        except sqlalchemy.exc.IntegrityError:"},{"line_number":1105,"context_line":"            session.rollback()  # We know consumer already exists."},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"            # This operation is idempotent, so log this and move on"},{"line_number":1108,"context_line":"            LOG.debug(\"Consumer %s already exists for container %s,\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_35bd5d69","line":1105,"updated":"2014-10-02 06:49:21.000000000","message":"Ah, didn\u0027t realize I needed a rollback here. I guess that makes sense -- did not having it possibly cause the transaction to get stuck in a bad state, or is it just a best practice thing?","commit_id":"7dcef77005664b2958fd4e0a4514b5f2d23111d2"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"75e80a2a13472fb91467c70bcb38d49b1608cc10","unresolved":false,"context_lines":[{"line_number":1102,"context_line":"            container.consumers.append(new_consumer)"},{"line_number":1103,"context_line":"            container.save(session\u003dsession)"},{"line_number":1104,"context_line":"        except sqlalchemy.exc.IntegrityError:"},{"line_number":1105,"context_line":"            session.rollback()  # We know consumer already exists."},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"            # This operation is idempotent, so log this and move on"},{"line_number":1108,"context_line":"            LOG.debug(\"Consumer %s already exists for container %s,\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_6b9ffe50","line":1105,"in_reply_to":"baa201ad_35bd5d69","updated":"2014-10-02 15:20:13.000000000","message":"Actually it is a session/transaction thing...if a db issue raises an integrity error, you can\u0027t continue with that session until you rollback. An option could be to use a nested transaction, but not all dbs support that. If there were changes made prior to this that need to hit the database, they would have to be successfully commit()-ed first.","commit_id":"7dcef77005664b2958fd4e0a4514b5f2d23111d2"}]}
