)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"08917799ef5ca78c4fb814c6c95b5616fc45b5da","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fixes password created_at errors due to the server_default"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Migration 002 sets the password created_at column to a TIMESTAMP type"},{"line_number":10,"context_line":"with a server_default\u003dsql.func.now(). There a a couple problems that"},{"line_number":11,"context_line":"have been uncovered with this:"},{"line_number":12,"context_line":"* We cannot guarantee that func.now() will generate a UTC timestamp."},{"line_number":13,"context_line":"* For older versions of MySQL, the TIMESTAMP default will automatically"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"7a8ec9b2_1d09ecdd","line":10,"range":{"start_line":10,"start_character":44,"end_line":10,"end_character":45},"updated":"2016-09-14 17:47:01.000000000","message":"*are","commit_id":"d520b4105a902a74be3236efa48f49446f1987f5"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"4274cbf42ffde00546301ee26ac3bce19d1c90d1","unresolved":false,"context_lines":[{"line_number":14,"context_line":"automatically be updated when other columns are updated:"},{"line_number":15,"context_line":"https://dev.mysql.com/doc/refman/5.5/en/timestamp-initialization.html"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patche fixes the problem by recreating the password created_at"},{"line_number":18,"context_line":"column back to a DateTime type without a server_default:"},{"line_number":19,"context_line":"1) Drop and recreate the created_at column"},{"line_number":20,"context_line":"2) Update the created_at value"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"7a8ec9b2_75c91178","line":17,"range":{"start_line":17,"start_character":5,"end_line":17,"end_character":11},"updated":"2016-09-15 05:04:34.000000000","message":"patch*","commit_id":"83dab523c161d705feb3f4c0eb4496ec6540b02c"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"0b392b32b603670b0f9af7430ad6f501f1e7c833","unresolved":false,"context_lines":[{"line_number":14,"context_line":"automatically be updated when other columns are updated:"},{"line_number":15,"context_line":"https://dev.mysql.com/doc/refman/5.5/en/timestamp-initialization.html"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patche fixes the problem by recreating the password created_at"},{"line_number":18,"context_line":"column back to a DateTime type without a server_default:"},{"line_number":19,"context_line":"1) Drop and recreate the created_at column"},{"line_number":20,"context_line":"2) Update the created_at value"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"7a8ec9b2_0205d8ba","line":17,"range":{"start_line":17,"start_character":5,"end_line":17,"end_character":11},"in_reply_to":"7a8ec9b2_75c91178","updated":"2016-09-15 13:37:59.000000000","message":"Done","commit_id":"83dab523c161d705feb3f4c0eb4496ec6540b02c"}],"keystone/common/sql/contract_repo/versions/004_reset_password_created_at.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"4274cbf42ffde00546301ee26ac3bce19d1c90d1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"7a8ec9b2_95edbdf1","updated":"2016-09-15 05:04:34.000000000","message":"why is this in the contract repo?","commit_id":"83dab523c161d705feb3f4c0eb4496ec6540b02c"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"c84440b7110ee8e9bb28f18d87cd5e60d56c4783","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"7a8ec9b2_dc475b1b","in_reply_to":"7a8ec9b2_95edbdf1","updated":"2016-09-15 13:09:03.000000000","message":"It\u0027s in the contract repo because I\u0027m dropping the column and then setting it to be not nullable (both contract operations). In addition, the contract repo is executed once the code has been updated; thus the created_at column would be populated for any password changes; supporting a rolling upgrade.","commit_id":"83dab523c161d705feb3f4c0eb4496ec6540b02c"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"4b3588545c0558968c076131e48a24188cff7f30","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    password.c.created_at.drop()"},{"line_number":26,"context_line":"    created_at \u003d sql.Column(\u0027created_at\u0027, sql.DateTime(),"},{"line_number":27,"context_line":"                            nullable\u003dTrue,"},{"line_number":28,"context_line":"                            default\u003ddatetime.datetime.utcnow)"},{"line_number":29,"context_line":"    password.create_column(created_at)"},{"line_number":30,"context_line":"    # update created_at value"},{"line_number":31,"context_line":"    now \u003d datetime.datetime.utcnow()"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a8ec9b2_1a06e31c","line":28,"range":{"start_line":28,"start_character":28,"end_line":28,"end_character":60},"updated":"2016-09-16 14:07:36.000000000","message":"This is going to have the same problem that was fixed at [1], but I guess the granularity here is not much important.\n\n[1] https://review.openstack.org/#/c/368244/","commit_id":"32328de6e37e1f9f55d563f8a55087dc7d6f46e1"}],"keystone/common/sql/data_migration_repo/versions/004_reset_password_created_at.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"32a2a70d7112d687342729bec1aab3c0aedfe719","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# A null initial migration to open this repo. Do not re-use replace this with"},{"line_number":14,"context_line":"# a real migration, add additional ones in subsequent version scripts."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import datetime"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"7a8ec9b2_216eb2c9","line":14,"range":{"start_line":13,"start_character":0,"end_line":14,"end_character":70},"updated":"2016-09-14 04:50:31.000000000","message":"not applicable","commit_id":"e72757520b9d90153ffea2ab33457d73a2d150e6"}],"keystone/tests/unit/test_sql_upgrade.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"4274cbf42ffde00546301ee26ac3bce19d1c90d1","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"        self.migrate(4)"},{"line_number":1782,"context_line":"        self.contract(4)"},{"line_number":1783,"context_line":"        password \u003d sqlalchemy.Table(\u0027password\u0027, self.metadata, autoload\u003dTrue)"},{"line_number":1784,"context_line":"        # type would still be TIMESTAMP with postgresql"},{"line_number":1785,"context_line":"        if self.engine.name !\u003d \u0027postgresql\u0027:"},{"line_number":1786,"context_line":"            self.assertEqual(\u0027DATETIME\u0027, str(password.c.created_at.type))"},{"line_number":1787,"context_line":"        self.assertFalse(password.c.created_at.nullable)"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a8ec9b2_35cf8980","line":1784,"range":{"start_line":1784,"start_character":10,"end_line":1784,"end_character":55},"updated":"2016-09-15 05:04:34.000000000","message":"re-verify it then","commit_id":"83dab523c161d705feb3f4c0eb4496ec6540b02c"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"3f1df4a1825fd6168c5890ec5bbd2a0a7d35eeef","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"        self.migrate(4)"},{"line_number":1782,"context_line":"        self.contract(4)"},{"line_number":1783,"context_line":"        password \u003d sqlalchemy.Table(\u0027password\u0027, self.metadata, autoload\u003dTrue)"},{"line_number":1784,"context_line":"        # type would still be TIMESTAMP with postgresql"},{"line_number":1785,"context_line":"        if self.engine.name !\u003d \u0027postgresql\u0027:"},{"line_number":1786,"context_line":"            self.assertEqual(\u0027DATETIME\u0027, str(password.c.created_at.type))"},{"line_number":1787,"context_line":"        self.assertFalse(password.c.created_at.nullable)"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a8ec9b2_77366053","line":1784,"range":{"start_line":1784,"start_character":10,"end_line":1784,"end_character":55},"in_reply_to":"7a8ec9b2_35cf8980","updated":"2016-09-15 13:27:30.000000000","message":"What do you mean? The migration changes the type from a sqlalchemcy TIMESTAMP to a DateTime, which addresses the MySQL issue. However, with posgresql, the column type will be a \u0027TIMESTAMP WITHOUT TIME ZONE\u0027 either way.","commit_id":"83dab523c161d705feb3f4c0eb4496ec6540b02c"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"0b392b32b603670b0f9af7430ad6f501f1e7c833","unresolved":false,"context_lines":[{"line_number":1781,"context_line":"        self.migrate(4)"},{"line_number":1782,"context_line":"        self.contract(4)"},{"line_number":1783,"context_line":"        password \u003d sqlalchemy.Table(\u0027password\u0027, self.metadata, autoload\u003dTrue)"},{"line_number":1784,"context_line":"        # type would still be TIMESTAMP with postgresql"},{"line_number":1785,"context_line":"        if self.engine.name !\u003d \u0027postgresql\u0027:"},{"line_number":1786,"context_line":"            self.assertEqual(\u0027DATETIME\u0027, str(password.c.created_at.type))"},{"line_number":1787,"context_line":"        self.assertFalse(password.c.created_at.nullable)"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a8ec9b2_a22a642a","line":1784,"range":{"start_line":1784,"start_character":10,"end_line":1784,"end_character":55},"in_reply_to":"7a8ec9b2_77366053","updated":"2016-09-15 13:37:59.000000000","message":"Done","commit_id":"83dab523c161d705feb3f4c0eb4496ec6540b02c"}]}
