)]}'
{"refstack/api/controllers/results.py":[{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"78c5323f7aa1c9a8058f9043c1bb7069d2d70d84","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                test_[\u0027meta\u0027] \u003d {}"},{"line_number":104,"context_line":"            pubkey \u003d db.get_pubkey_from_hash(md5_hash)"},{"line_number":105,"context_line":"            if pubkey is None:"},{"line_number":106,"context_line":"                pecan.abort(400, \u0027User with specified key not found.\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"            test_[\u0027meta\u0027][const.USER] \u003d pubkey.openid"},{"line_number":109,"context_line":"        test_id \u003d db.store_results(test_)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba8a016a_6c5f1f76","line":106,"updated":"2015-11-20 21:12:47.000000000","message":"How about:\n\u0027User with specified key not found.  Please log into RefStack server to upload key.\"","commit_id":"1a1f29fce20c17e3ddf0e0858ce28f96800d8511"},{"author":{"_account_id":9377,"name":"Sergey Slipushenko","email":"slipushenko@gmail.com","username":"sslypushenko"},"change_message_id":"df341c426a03697334c97fa7d4e45088f3cdd8b6","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            if \u0027meta\u0027 not in test_:"},{"line_number":103,"context_line":"                test_[\u0027meta\u0027] \u003d {}"},{"line_number":104,"context_line":"            pubkey \u003d db.get_pubkey_from_hash(md5_hash)"},{"line_number":105,"context_line":"            if pubkey is None:"},{"line_number":106,"context_line":"                pecan.abort(400, \u0027User with specified key not found. \u0027"},{"line_number":107,"context_line":"                                 \u0027Please log into the RefStack server to \u0027"},{"line_number":108,"context_line":"                                 \u0027upload your key.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_c6652445","line":105,"updated":"2015-12-03 14:00:56.000000000","message":"Additional check \nkey in db.get_pubkeys_from_hash(md5_hash)\nis needed.\n\ndb.get_pubkeys_from_hash(md5_hash) should return all found keys, not the first one","commit_id":"fcbaccfdceee3019a8ed202c0cd111784eaf0fe4"}],"refstack/db/migrations/alembic/versions/428e5aef5534_associate_test_result.py":[{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"78c5323f7aa1c9a8058f9043c1bb7069d2d70d84","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    res \u003d conn.execute(\"select test_id,value from meta where \""},{"line_number":30,"context_line":"                       \"meta_key\u003d\u0027public_key\u0027\")"},{"line_number":31,"context_line":"    results \u003d res.fetchall"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    for result in results:"},{"line_number":34,"context_line":"        test_id \u003d result[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba8a016a_6cc63f18","line":31,"updated":"2015-11-20 21:12:47.000000000","message":"results \u003d res.fetchall  --\u003e results \u003d res.fetchall()","commit_id":"1a1f29fce20c17e3ddf0e0858ce28f96800d8511"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"762914601a150889edbd4f2a3bdf96597a9346fe","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    for result in results:"},{"line_number":34,"context_line":"        test_id \u003d result[0]"},{"line_number":35,"context_line":"        openid \u003d pubkeys[result[1]]"},{"line_number":36,"context_line":"        conn.execute(sa.text(\"update meta set meta_key\u003d\u0027user\u0027, \""},{"line_number":37,"context_line":"                             \"value\u003d:value where \""},{"line_number":38,"context_line":"                             \"test_id\u003d:testid and meta_key\u003d\u0027public_key\u0027\""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba8a016a_7b734fb5","line":35,"updated":"2015-11-20 23:08:35.000000000","message":"Also need to check whether the key exists in pubkeys because data may have been uploaded with keys which do not belong to any user.\n\nif  result[1] in pubkeys:\n         openid \u003d pubkeys[result[1]]","commit_id":"1a1f29fce20c17e3ddf0e0858ce28f96800d8511"}],"refstack/db/sqlalchemy/api.py":[{"author":{"_account_id":9377,"name":"Sergey Slipushenko","email":"slipushenko@gmail.com","username":"sslypushenko"},"change_message_id":"df341c426a03697334c97fa7d4e45088f3cdd8b6","unresolved":false,"context_lines":[{"line_number":283,"context_line":"def get_pubkey_from_hash(md5_hash):"},{"line_number":284,"context_line":"    \"\"\"Get the pubkey info corresponding to the given public key md5 hash.\"\"\""},{"line_number":285,"context_line":"    session \u003d get_session()"},{"line_number":286,"context_line":"    pubkey \u003d session.query(models.PubKey).filter_by(md5_hash\u003dmd5_hash).first()"},{"line_number":287,"context_line":"    return pubkey"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_26d430ea","line":286,"updated":"2015-12-03 14:00:56.000000000","message":"You should return all found pubkeys here. \nmd5 collisions are *very* rare but can happend","commit_id":"fcbaccfdceee3019a8ed202c0cd111784eaf0fe4"},{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"ae6c2e0fc1ee16a49e898bd8b6dcb53f1011a1ac","unresolved":false,"context_lines":[{"line_number":283,"context_line":"def get_pubkey_from_hash(md5_hash):"},{"line_number":284,"context_line":"    \"\"\"Get the pubkey info corresponding to the given public key md5 hash.\"\"\""},{"line_number":285,"context_line":"    session \u003d get_session()"},{"line_number":286,"context_line":"    pubkey \u003d session.query(models.PubKey).filter_by(md5_hash\u003dmd5_hash).first()"},{"line_number":287,"context_line":"    return pubkey"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_86ca50a0","line":286,"in_reply_to":"9a8ffd7b_26d430ea","updated":"2015-12-04 10:38:51.000000000","message":"Thanks. I converted this function to handle collisions.","commit_id":"fcbaccfdceee3019a8ed202c0cd111784eaf0fe4"}]}
