)]}'
{"glance/cmd/manage.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"571ec261c2fd8079e8eaac9d90ad1719fc7aaf4c","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            self.migrate()"},{"line_number":121,"context_line":"            self.contract()"},{"line_number":122,"context_line":"        finally:"},{"line_number":123,"context_line":"            print(_(\u0027Database is synced using EMC.\u0027))"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _sync(self, version):"},{"line_number":126,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_6e95d43f","line":123,"updated":"2018-01-24 15:16:09.000000000","message":"This will print even if one of the steps raises an exception. Should we be stating \"Database is synced\" if we failed to actually complete the operation?","commit_id":"f6bfd9fbd8dcc9c0306d9c08e2e2c11a6dea2884"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a207d30a7cc50283444a8b74cd0c5bf71c824f9b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def expand(self):"},{"line_number":146,"context_line":"        \"\"\"Run the expansion phase of a rolling upgrade procedure.\"\"\""},{"line_number":147,"context_line":"        engine \u003d db_api.get_engine()"},{"line_number":148,"context_line":"        # Adding sqlite as engine to support existing functional test cases."},{"line_number":149,"context_line":"        if engine.engine.name not in [\u0027mysql\u0027, \u0027sqlite\u0027]:"},{"line_number":150,"context_line":"            sys.exit(_(\u0027Rolling upgrades are currently supported only for \u0027"},{"line_number":151,"context_line":"                       \u0027MySQL and Sqlite\u0027))"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        curr_heads \u003d alembic_migrations.get_current_alembic_heads()"},{"line_number":154,"context_line":"        expand_head \u003d alembic_migrations.get_alembic_branch_head("}],"source_content_type":"text/x-python","patch_set":8,"id":"5f93b717_39bdda01","line":151,"range":{"start_line":148,"start_character":8,"end_line":151,"end_character":43},"updated":"2018-01-30 09:19:46.000000000","message":"you can extract this to a function instead of repeating this in all e-m-c functions.","commit_id":"85ada5a8e741f63efa313cba849c19571d8be742"},{"author":{"_account_id":1955,"name":"Alan Pevec","email":"alan.pevec@redhat.com","username":"apevec"},"change_message_id":"5def05596329063e88eaa80b2dd4efc0aa393e46","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            db_migration.CONTRACT_BRANCH)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        if (contract in curr_heads):"},{"line_number":116,"context_line":"            sys.exit(_(\u0027Database is up to date. No migrations needed.\u0027))"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        try:"},{"line_number":119,"context_line":"            self.expand()"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa0c359_7ee39034","line":116,"updated":"2018-02-06 23:57:04.000000000","message":"This exits with status 1 and breaks earlier assumptions: https://bugs.launchpad.net/tripleo/+bug/1747690\n\nsys.exit \u003d exit(...)\n    exit([status])\n    \n    Exit the interpreter by raising SystemExit(status).\n    If the status is omitted or None, it defaults to zero (i.e., success).\n    If the status is an integer, it will be used as the system exit status.\n    If it is another kind of object, it will be printed and the system\n    exit status will be one (i.e., failure).","commit_id":"f268df1cbc3c356c472ace04bd4f2d4b3da6c026"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97760358e7fcae08fc82d84a13f840ac64bcc065","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        :param engine: database engine name"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        if engine.engine.name not in [\u0027mysql\u0027, \u0027sqlite\u0027]:"},{"line_number":154,"context_line":"            sys.exit(_(\u0027Rolling upgrades are currently supported only for \u0027"},{"line_number":155,"context_line":"                       \u0027MySQL and Sqlite\u0027))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def expand(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa0c359_02584a53","line":154,"updated":"2018-02-13 17:47:03.000000000","message":"What if I don\u0027t care about rolling upgrades and I\u0027m using postgresql? This totally breaks my ability to do upgrades *at all* for glance.","commit_id":"f268df1cbc3c356c472ace04bd4f2d4b3da6c026"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"6a8c492b56b04847d03ad4ca5a35871381b98edc","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        :param engine: database engine name"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        if engine.engine.name not in [\u0027mysql\u0027, \u0027sqlite\u0027]:"},{"line_number":154,"context_line":"            sys.exit(_(\u0027Rolling upgrades are currently supported only for \u0027"},{"line_number":155,"context_line":"                       \u0027MySQL and Sqlite\u0027))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def expand(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa0c359_dd8fa327","line":154,"in_reply_to":"3fa0c359_02584a53","updated":"2018-02-13 18:11:51.000000000","message":"\u003e What if I don\u0027t care about rolling upgrades and I\u0027m using\n \u003e postgresql? This totally breaks my ability to do upgrades *at all*\n \u003e for glance.\n\nWe\u0027re in the same boat.  Currently using postgres with Pike, would be a shame to have to have to hack the code to make it work with Queens.\n\nWeren\u0027t we supposed to avoid actively breaking alternate DBs?","commit_id":"f268df1cbc3c356c472ace04bd4f2d4b3da6c026"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"1649e1e2651fc74998c29694a17f6d340e4ba4a8","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        :param engine: database engine name"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        if engine.engine.name not in [\u0027mysql\u0027, \u0027sqlite\u0027]:"},{"line_number":154,"context_line":"            sys.exit(_(\u0027Rolling upgrades are currently supported only for \u0027"},{"line_number":155,"context_line":"                       \u0027MySQL and Sqlite\u0027))"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def expand(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa0c359_c50029ae","line":154,"in_reply_to":"3fa0c359_dd8fa327","updated":"2018-02-13 19:54:22.000000000","message":"Replying to myself in case others see this...it appears that support for offline migrations was restored in https://review.openstack.org/#/c/542756/","commit_id":"f268df1cbc3c356c472ace04bd4f2d4b3da6c026"}],"glance/db/sqlalchemy/alembic_migrations/__init__.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"0fc40574f520d0458d781732f1d436748037ae45","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    with engine.connect() as conn:"},{"line_number":46,"context_line":"        context \u003d alembic_migration.MigrationContext.configure(conn)"},{"line_number":47,"context_line":"        heads \u003d context.get_current_heads()"},{"line_number":48,"context_line":"        if (\"pike01\" in heads):"},{"line_number":49,"context_line":"            meta \u003d MetaData(engine)"},{"line_number":50,"context_line":"            alembic_version \u003d Table(\u0027alembic_version\u0027, meta, autoload\u003dTrue)"},{"line_number":51,"context_line":"            alembic_version.update().values("},{"line_number":52,"context_line":"                version_num\u003d\u0027pike_contract01\u0027).where("},{"line_number":53,"context_line":"                alembic_version.c.version_num \u003d\u003d \u0027pike01\u0027).execute()"},{"line_number":54,"context_line":"            heads \u003d context.get_current_heads()"},{"line_number":55,"context_line":"        elif (\"ocata01\" in heads):"},{"line_number":56,"context_line":"            meta \u003d MetaData(engine)"},{"line_number":57,"context_line":"            alembic_version \u003d Table(\u0027alembic_version\u0027, meta, autoload\u003dTrue)"},{"line_number":58,"context_line":"            alembic_version.update().values("},{"line_number":59,"context_line":"                version_num\u003d\u0027ocata_contract01\u0027).where("},{"line_number":60,"context_line":"                alembic_version.c.version_num \u003d\u003d \u0027ocata01\u0027).execute()"},{"line_number":61,"context_line":"            heads \u003d context.get_current_heads()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        return heads"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_236db397","line":61,"range":{"start_line":48,"start_character":8,"end_line":61,"end_character":47},"updated":"2018-01-24 05:49:37.000000000","message":"Can we refactor it to something like:\ndef update_alembic_version(old, new):\n    meta \u003d MetaData(engine)\n    alembic_version \u003d Table(\u0027alembic_version\u0027, meta, autoload\u003dTrue)\n    alembic_version.update().values(\n        version_num\u003dnew).where(\n        alembic_version.c.version_num \u003d\u003d old).execute()\n\nif (\"pike01\" in heads):\n    update_alembic_version(\"pike01\", \"pike_contract01\")\nelif (\"ocata01\" in heads):\n    update_alembic_version(\"ocata01\", \"ocata_contract01\")\nheads \u003d context.get_current_heads()\n\nAlso add comment why are you doing this change which will help reviewers to understand the motive.","commit_id":"13d90bb0b1ad61a7d6e5c836adc00ec317f0b2dd"}],"glance/db/sqlalchemy/alembic_migrations/data_migrations/queens_migrate01_empty.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"0fc40574f520d0458d781732f1d436748037ae45","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain\r"},{"line_number":3,"context_line":"#    a copy of the License at\r"},{"line_number":4,"context_line":"#\r"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_831cc713","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":11},"updated":"2018-01-24 05:49:37.000000000","message":"Add copyright statement","commit_id":"13d90bb0b1ad61a7d6e5c836adc00ec317f0b2dd"}],"glance/db/sqlalchemy/alembic_migrations/versions/queens_contract01_empty.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"0fc40574f520d0458d781732f1d436748037ae45","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain\r"},{"line_number":3,"context_line":"#    a copy of the License at\r"},{"line_number":4,"context_line":"#\r"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_63e65b19","line":1,"range":{"start_line":1,"start_character":1,"end_line":1,"end_character":8},"updated":"2018-01-24 05:49:37.000000000","message":"ditto","commit_id":"13d90bb0b1ad61a7d6e5c836adc00ec317f0b2dd"}],"glance/db/sqlalchemy/alembic_migrations/versions/queens_expand01_empty.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"0fc40574f520d0458d781732f1d436748037ae45","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain\r"},{"line_number":3,"context_line":"#    a copy of the License at\r"},{"line_number":4,"context_line":"#\r"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_83e127ff","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":5},"updated":"2018-01-24 05:49:37.000000000","message":"ditto","commit_id":"13d90bb0b1ad61a7d6e5c836adc00ec317f0b2dd"}]}
