)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f5c94be03fc48ee156cb417fe4d18ea25ab5797f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add microsecond columns to the test_runs table"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit adds a migration to add 2 tables to the test_runs table to"},{"line_number":10,"context_line":"store microseconds for the start and stop time stamps for each test_run"},{"line_number":11,"context_line":"row. Previously we were relying on the microseconds to be caried over"},{"line_number":12,"context_line":"from the datetime object passed into the sqlalchemy object, however in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba7be1f8_a12110fe","line":9,"updated":"2015-03-02 11:54:31.000000000","message":"to add 2 columns","commit_id":"27e353f1febd0abd92cdfa2a80991db0d1e4168e"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"ff7be2f1ae0ed12c319cfdb907464d8cc44c7daa","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add microsecond columns to the test_runs table"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit adds a migration to add 2 tables to the test_runs table to"},{"line_number":10,"context_line":"store microseconds for the start and stop time stamps for each test_run"},{"line_number":11,"context_line":"row. Previously we were relying on the microseconds to be caried over"},{"line_number":12,"context_line":"from the datetime object passed into the sqlalchemy object, however in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba7be1f8_721d1a66","line":9,"in_reply_to":"ba7be1f8_a12110fe","updated":"2015-03-02 15:53:18.000000000","message":"Oops, done","commit_id":"27e353f1febd0abd92cdfa2a80991db0d1e4168e"}],"subunit2sql/migrations/versions/1679b5bc102c_add_subsecond_columns_to_test_runs_table.py":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f5c94be03fc48ee156cb417fe4d18ea25ab5797f","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    session \u003d db_api.get_session()"},{"line_number":41,"context_line":"    query \u003d db_utils.model_query(models.TestRun, session).values("},{"line_number":42,"context_line":"        models.TestRun.id, models.TestRun.start_time, models.TestRun.stop_time)"},{"line_number":43,"context_line":"    for test_run in query:"},{"line_number":44,"context_line":"        start_micro \u003d test_run[1].microsecond"},{"line_number":45,"context_line":"        stop_micro \u003d test_run[2].microsecond"},{"line_number":46,"context_line":"        values \u003d {\u0027start_time_microsecond\u0027: start_micro,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_53202749","line":43,"range":{"start_line":43,"start_character":8,"end_line":43,"end_character":26},"updated":"2015-03-02 11:54:31.000000000","message":"Is there any way we can detect here whether microseconds are supported or not, and avoid the migration step below if not?","commit_id":"27e353f1febd0abd92cdfa2a80991db0d1e4168e"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"ff7be2f1ae0ed12c319cfdb907464d8cc44c7daa","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    session \u003d db_api.get_session()"},{"line_number":41,"context_line":"    query \u003d db_utils.model_query(models.TestRun, session).values("},{"line_number":42,"context_line":"        models.TestRun.id, models.TestRun.start_time, models.TestRun.stop_time)"},{"line_number":43,"context_line":"    for test_run in query:"},{"line_number":44,"context_line":"        start_micro \u003d test_run[1].microsecond"},{"line_number":45,"context_line":"        stop_micro \u003d test_run[2].microsecond"},{"line_number":46,"context_line":"        values \u003d {\u0027start_time_microsecond\u0027: start_micro,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_a77cb6b6","line":43,"in_reply_to":"ba7be1f8_53202749","updated":"2015-03-02 15:53:18.000000000","message":"Well, I thought about that, but my concern was short of creating a row and checking the microseconds get stripped I wasn\u0027t sure there was a way to check from the migration. Even if a row has microseconds of 0 for both timestamps that\u0027s not a guarantee the db doesn\u0027t support it. (even extended to the entire db with that check there\u0027s no guarantee, it could have all just been 0 micro from the streams)\n\nWhat I was thinking as maybe an alternative is having a config flag to just fast path this and skip the loop. I\u0027d have to look into how to expose that to subunit2sql-db-manage, but I think that\u0027s doable. What do you think?","commit_id":"27e353f1febd0abd92cdfa2a80991db0d1e4168e"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f5c94be03fc48ee156cb417fe4d18ea25ab5797f","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        start_micro \u003d test_run[1].microsecond"},{"line_number":45,"context_line":"        stop_micro \u003d test_run[2].microsecond"},{"line_number":46,"context_line":"        values \u003d {\u0027start_time_microsecond\u0027: start_micro,"},{"line_number":47,"context_line":"                  \u0027stop_time_microsecond\u0027: stop_micro}"},{"line_number":48,"context_line":"        db_api.update_test_run(values, test_run[0], session)"},{"line_number":49,"context_line":"    session.close()"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_4145b46e","line":47,"updated":"2015-03-02 11:54:31.000000000","message":"Because the new code overrides microseconds with the value from the microseconds table, there\u0027s no need to update the start/stop_time columns, right?","commit_id":"27e353f1febd0abd92cdfa2a80991db0d1e4168e"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"ff7be2f1ae0ed12c319cfdb907464d8cc44c7daa","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        start_micro \u003d test_run[1].microsecond"},{"line_number":45,"context_line":"        stop_micro \u003d test_run[2].microsecond"},{"line_number":46,"context_line":"        values \u003d {\u0027start_time_microsecond\u0027: start_micro,"},{"line_number":47,"context_line":"                  \u0027stop_time_microsecond\u0027: stop_micro}"},{"line_number":48,"context_line":"        db_api.update_test_run(values, test_run[0], session)"},{"line_number":49,"context_line":"    session.close()"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_27d526b9","line":47,"in_reply_to":"ba7be1f8_4145b46e","updated":"2015-03-02 15:53:18.000000000","message":"Yeah that\u0027s what I was thinking there was no need to strip the microseconds from any existing timestamps because any future uses will be using the new columns","commit_id":"27e353f1febd0abd92cdfa2a80991db0d1e4168e"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"ef041b5a1c1305ed584564df1e8ef2e780d69a30","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    session \u003d db_api.get_session()"},{"line_number":45,"context_line":"    query \u003d db_utils.model_query(models.TestRun, session).values("},{"line_number":46,"context_line":"        models.TestRun.id, models.TestRun.start_time, models.TestRun.stop_time)"},{"line_number":47,"context_line":"    if not CONF.disable_data_migrations:"},{"line_number":48,"context_line":"        for test_run in query:"},{"line_number":49,"context_line":"            start_micro \u003d test_run[1].microsecond"},{"line_number":50,"context_line":"            stop_micro \u003d test_run[2].microsecond"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_d568a4bc","line":47,"updated":"2015-03-05 10:21:57.000000000","message":"CONF.disable_microsecond_data_migration ?","commit_id":"2999580449f60428aa7630f2e6b4047370f199d6"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"804bc9a076aa9497f79da9889cdaa22093a48f83","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    session \u003d db_api.get_session()"},{"line_number":45,"context_line":"    query \u003d db_utils.model_query(models.TestRun, session).values("},{"line_number":46,"context_line":"        models.TestRun.id, models.TestRun.start_time, models.TestRun.stop_time)"},{"line_number":47,"context_line":"    if not CONF.disable_data_migrations:"},{"line_number":48,"context_line":"        for test_run in query:"},{"line_number":49,"context_line":"            start_micro \u003d test_run[1].microsecond"},{"line_number":50,"context_line":"            stop_micro \u003d test_run[2].microsecond"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_f015a4e5","line":47,"in_reply_to":"9a80dd14_d568a4bc","updated":"2015-03-05 15:45:13.000000000","message":"Oops, nice catch. Done","commit_id":"2999580449f60428aa7630f2e6b4047370f199d6"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"9a3e228d0a2f29c8f9e6baf434aafa5e07824091","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    session \u003d db_api.get_session()"},{"line_number":45,"context_line":"    query \u003d db_utils.model_query(models.TestRun, session).values("},{"line_number":46,"context_line":"        models.TestRun.id, models.TestRun.start_time, models.TestRun.stop_time)"},{"line_number":47,"context_line":"    if not CONF.disable_microsecond_data_migration:"},{"line_number":48,"context_line":"        for test_run in query:"},{"line_number":49,"context_line":"            start_micro \u003d test_run[1].microsecond"},{"line_number":50,"context_line":"            stop_micro \u003d test_run[2].microsecond"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_36673427","line":47,"updated":"2015-03-05 16:29:00.000000000","message":"Any reason why this is not before L44?","commit_id":"9efbe383e0becafabd9ed5665e38199b987fbe7d"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"08fa886b05f7e9c534245e8170d8f81f3f0273b1","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    session \u003d db_api.get_session()"},{"line_number":45,"context_line":"    query \u003d db_utils.model_query(models.TestRun, session).values("},{"line_number":46,"context_line":"        models.TestRun.id, models.TestRun.start_time, models.TestRun.stop_time)"},{"line_number":47,"context_line":"    if not CONF.disable_microsecond_data_migration:"},{"line_number":48,"context_line":"        for test_run in query:"},{"line_number":49,"context_line":"            start_micro \u003d test_run[1].microsecond"},{"line_number":50,"context_line":"            stop_micro \u003d test_run[2].microsecond"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_aa481888","line":47,"in_reply_to":"9a80dd14_36673427","updated":"2015-03-05 16:46:54.000000000","message":"Good catch, there is no reason to query all of the timestamps if we\u0027re not going to do the data migration.","commit_id":"9efbe383e0becafabd9ed5665e38199b987fbe7d"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"9a3e228d0a2f29c8f9e6baf434aafa5e07824091","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            stop_micro \u003d test_run[2].microsecond"},{"line_number":51,"context_line":"            values \u003d {\u0027start_time_microsecond\u0027: start_micro,"},{"line_number":52,"context_line":"                      \u0027stop_time_microsecond\u0027: stop_micro}"},{"line_number":53,"context_line":"            db_api.update_test_run(values, test_run[0], session)"},{"line_number":54,"context_line":"        session.close()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_563ca8e2","line":53,"updated":"2015-03-05 16:29:00.000000000","message":"Should this be outsite of the if?","commit_id":"9efbe383e0becafabd9ed5665e38199b987fbe7d"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"08fa886b05f7e9c534245e8170d8f81f3f0273b1","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            stop_micro \u003d test_run[2].microsecond"},{"line_number":51,"context_line":"            values \u003d {\u0027start_time_microsecond\u0027: start_micro,"},{"line_number":52,"context_line":"                      \u0027stop_time_microsecond\u0027: stop_micro}"},{"line_number":53,"context_line":"            db_api.update_test_run(values, test_run[0], session)"},{"line_number":54,"context_line":"        session.close()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_6d039a0d","line":53,"in_reply_to":"9a80dd14_563ca8e2","updated":"2015-03-05 16:46:54.000000000","message":"Do you mean the session close on L54? Right, that should be outside the if given that session is always created. When I move the if to include the session creation this will be correct.","commit_id":"9efbe383e0becafabd9ed5665e38199b987fbe7d"}],"subunit2sql/tests/migrations/test_migrations.py":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f5c94be03fc48ee156cb417fe4d18ea25ab5797f","unresolved":false,"context_lines":[{"line_number":524,"context_line":"            pass"},{"line_number":525,"context_line":"        else:"},{"line_number":526,"context_line":"            self.assertEqual(start_micro, row.start_time_microsecond)"},{"line_number":527,"context_line":"            self.assertEqual(row.stop_time_microsecond, stop_micro)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_7391ab99","line":527,"updated":"2015-03-02 11:54:31.000000000","message":"reverse order in the assert?","commit_id":"27e353f1febd0abd92cdfa2a80991db0d1e4168e"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"ff7be2f1ae0ed12c319cfdb907464d8cc44c7daa","unresolved":false,"context_lines":[{"line_number":524,"context_line":"            pass"},{"line_number":525,"context_line":"        else:"},{"line_number":526,"context_line":"            self.assertEqual(start_micro, row.start_time_microsecond)"},{"line_number":527,"context_line":"            self.assertEqual(row.stop_time_microsecond, stop_micro)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_0745826f","line":527,"in_reply_to":"ba7be1f8_7391ab99","updated":"2015-03-02 15:53:18.000000000","message":"doesn\u0027t matter does it?","commit_id":"27e353f1febd0abd92cdfa2a80991db0d1e4168e"}]}
