)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5b3dcff27e0b4832870fee9bf1e3becfc4aaa96a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"fails."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"For example, for volume, if attach_status is nullable in"},{"line_number":14,"context_line":"db schedma, but is not nullable in object schema."},{"line_number":15,"context_line":"When writting data to db using db interface, the attach_status"},{"line_number":16,"context_line":"can be null. But later when reading data from db to construct"},{"line_number":17,"context_line":"volume object, it raises exception. As a result, all the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aed3d3a_275fac42","line":14,"range":{"start_line":14,"start_character":3,"end_line":14,"end_character":10},"updated":"2016-02-26 12:42:08.000000000","message":"s/schedma/schema","commit_id":"20e1e7b631b9c40eb97c476b47d7648d992819ba"}],"cinder/objects/base.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5b3dcff27e0b4832870fee9bf1e3becfc4aaa96a","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        \u0027created_at\u0027: fields.DateTimeField(nullable\u003dTrue),"},{"line_number":360,"context_line":"        \u0027updated_at\u0027: fields.DateTimeField(nullable\u003dTrue),"},{"line_number":361,"context_line":"        \u0027deleted_at\u0027: fields.DateTimeField(nullable\u003dTrue),"},{"line_number":362,"context_line":"        \u0027deleted\u0027: fields.BooleanField(nullable\u003dTrue),"},{"line_number":363,"context_line":"    }"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    @contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_e26e52c8","line":362,"range":{"start_line":362,"start_character":9,"end_line":362,"end_character":54},"updated":"2016-02-26 12:42:08.000000000","message":"You should leave default\u003dFalse here even if column itself is nullable.","commit_id":"20e1e7b631b9c40eb97c476b47d7648d992819ba"}],"cinder/tests/unit/objects/test_objects.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5b3dcff27e0b4832870fee9bf1e3becfc4aaa96a","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# NOTE: The hashes in this list should only be changed if they come with a"},{"line_number":23,"context_line":"# corresponding version bump in the affected objects."},{"line_number":24,"context_line":"object_data \u003d {"},{"line_number":25,"context_line":"    \u0027Backup\u0027: \u00271.5-ea3e033f25e8b3ede9211184863040a9\u0027,"},{"line_number":26,"context_line":"    \u0027BackupImport\u0027: \u00271.5-ea3e033f25e8b3ede9211184863040a9\u0027,"},{"line_number":27,"context_line":"    \u0027BackupList\u0027: \u00271.0-24591dabe26d920ce0756fe64cd5f3aa\u0027,"},{"line_number":28,"context_line":"    \u0027CGSnapshot\u0027: \u00271.0-39f31a4df02e15620dae7544a71b911f\u0027,"},{"line_number":29,"context_line":"    \u0027CGSnapshotList\u0027: \u00271.0-e8c3f4078cd0ee23487b34d173eec776\u0027,"},{"line_number":30,"context_line":"    \u0027ConsistencyGroup\u0027: \u00271.2-a4c6ee111d2d4b463c3331d1e8b82ed7\u0027,"},{"line_number":31,"context_line":"    \u0027ConsistencyGroupList\u0027: \u00271.1-73916823b697dfa0c7f02508d87e0f28\u0027,"},{"line_number":32,"context_line":"    \u0027Service\u0027: \u00271.3-0266ef188768e4893837a572f877ea23\u0027,"},{"line_number":33,"context_line":"    \u0027ServiceList\u0027: \u00271.2-7a6c4930dfadeb25d6f848851e99b547\u0027,"},{"line_number":34,"context_line":"    \u0027Snapshot\u0027: \u00271.1-04bf0d4d362e035897c8135c5c08f3a3\u0027,"},{"line_number":35,"context_line":"    \u0027SnapshotList\u0027: \u00271.1-42c5947d7479ef9bccba5c91ba05af32\u0027,"},{"line_number":36,"context_line":"    \u0027Volume\u0027: \u00271.4-264388ec57bc4c3353c89f93bebf9482\u0027,"},{"line_number":37,"context_line":"    \u0027VolumeAttachment\u0027: \u00271.0-b65ea2547ea212f9276770ffa9b334d4\u0027,"},{"line_number":38,"context_line":"    \u0027VolumeAttachmentList\u0027: \u00271.0-307d2b6c8dd55ef854f6386898e9e98e\u0027,"},{"line_number":39,"context_line":"    \u0027VolumeList\u0027: \u00271.2-4cae7b9354df64c4792fd87abad97ef3\u0027,"},{"line_number":40,"context_line":"    \u0027VolumeType\u0027: \u00271.1-87fdf2a982623fc4548cc67b9fe0d06e\u0027,"},{"line_number":41,"context_line":"    \u0027VolumeTypeList\u0027: \u00271.2-f5afbe2a6218914668d20bfaa799c7e7\u0027,"},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_f6e4530e","line":41,"range":{"start_line":25,"start_character":0,"end_line":41,"end_character":61},"updated":"2016-02-26 12:42:08.000000000","message":"In some cases you\u0027re not changing the versions. I\u0027m a little torn up here… :(\n\nIf we change the version, then we should to provide backward compatible object in obj_make_compat. Unfortunately there\u0027s no way to do so - we simply don\u0027t have the data to fill when there\u0027s NULL in the field.\n\nWe can leave the version as is (we\u0027re always switching NOT NULL to NULLABLE, so what\u0027s already in the DB will not break), but then when sending the object to Liberty it may happen that Liberty will fail, as field was set to NULL, and it breaks the NOT NULL constraint Liberty has…\n\nI lean to do #2 - let\u0027s not bump the objects version. I believe there weren\u0027t any cases when we\u0027ve set these fields to NULL (besides related bug here), otherwise there would be bugs in Liberty. Liberty should be fine then (fingers crossed).","commit_id":"20e1e7b631b9c40eb97c476b47d7648d992819ba"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"823d298b494363d35be81632c4a757f8fa749b27","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# NOTE: The hashes in this list should only be changed if they come with a"},{"line_number":23,"context_line":"# corresponding version bump in the affected objects."},{"line_number":24,"context_line":"object_data \u003d {"},{"line_number":25,"context_line":"    \u0027Backup\u0027: \u00271.5-ea3e033f25e8b3ede9211184863040a9\u0027,"},{"line_number":26,"context_line":"    \u0027BackupImport\u0027: \u00271.5-ea3e033f25e8b3ede9211184863040a9\u0027,"},{"line_number":27,"context_line":"    \u0027BackupList\u0027: \u00271.0-24591dabe26d920ce0756fe64cd5f3aa\u0027,"},{"line_number":28,"context_line":"    \u0027CGSnapshot\u0027: \u00271.0-39f31a4df02e15620dae7544a71b911f\u0027,"},{"line_number":29,"context_line":"    \u0027CGSnapshotList\u0027: \u00271.0-e8c3f4078cd0ee23487b34d173eec776\u0027,"},{"line_number":30,"context_line":"    \u0027ConsistencyGroup\u0027: \u00271.2-a4c6ee111d2d4b463c3331d1e8b82ed7\u0027,"},{"line_number":31,"context_line":"    \u0027ConsistencyGroupList\u0027: \u00271.1-73916823b697dfa0c7f02508d87e0f28\u0027,"},{"line_number":32,"context_line":"    \u0027Service\u0027: \u00271.3-0266ef188768e4893837a572f877ea23\u0027,"},{"line_number":33,"context_line":"    \u0027ServiceList\u0027: \u00271.2-7a6c4930dfadeb25d6f848851e99b547\u0027,"},{"line_number":34,"context_line":"    \u0027Snapshot\u0027: \u00271.1-04bf0d4d362e035897c8135c5c08f3a3\u0027,"},{"line_number":35,"context_line":"    \u0027SnapshotList\u0027: \u00271.1-42c5947d7479ef9bccba5c91ba05af32\u0027,"},{"line_number":36,"context_line":"    \u0027Volume\u0027: \u00271.4-264388ec57bc4c3353c89f93bebf9482\u0027,"},{"line_number":37,"context_line":"    \u0027VolumeAttachment\u0027: \u00271.0-b65ea2547ea212f9276770ffa9b334d4\u0027,"},{"line_number":38,"context_line":"    \u0027VolumeAttachmentList\u0027: \u00271.0-307d2b6c8dd55ef854f6386898e9e98e\u0027,"},{"line_number":39,"context_line":"    \u0027VolumeList\u0027: \u00271.2-4cae7b9354df64c4792fd87abad97ef3\u0027,"},{"line_number":40,"context_line":"    \u0027VolumeType\u0027: \u00271.1-87fdf2a982623fc4548cc67b9fe0d06e\u0027,"},{"line_number":41,"context_line":"    \u0027VolumeTypeList\u0027: \u00271.2-f5afbe2a6218914668d20bfaa799c7e7\u0027,"},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_84f10404","line":41,"range":{"start_line":25,"start_character":0,"end_line":41,"end_character":61},"in_reply_to":"9aed3d3a_f6e4530e","updated":"2016-02-29 08:13:26.000000000","message":"I keep versions unchanged.","commit_id":"20e1e7b631b9c40eb97c476b47d7648d992819ba"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"5b3dcff27e0b4832870fee9bf1e3becfc4aaa96a","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                         \u0027sure a new objects history version was added in \u0027"},{"line_number":71,"context_line":"                         \u0027cinder.objects.base.OBJ_VERSIONS.\u0027)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_object_nullable_match_db(self):"},{"line_number":74,"context_line":"        # This test is to keep nullable of every field in corresponding"},{"line_number":75,"context_line":"        # db model and object match."},{"line_number":76,"context_line":"        classes \u003d base.CinderObjectRegistry.obj_classes()"},{"line_number":77,"context_line":"        for name, cls in classes.items():"},{"line_number":78,"context_line":"            if not issubclass(cls[0], base.ObjectListBase):"},{"line_number":79,"context_line":"                db_model \u003d db.get_model_for_versioned_object(cls[0])"},{"line_number":80,"context_line":"                for column in db_model.__table__.columns:"},{"line_number":81,"context_line":"                    if column.name in cls[0].fields:"},{"line_number":82,"context_line":"                        self.assertEqual("},{"line_number":83,"context_line":"                            column.nullable,"},{"line_number":84,"context_line":"                            cls[0].fields[column.name].nullable,"},{"line_number":85,"context_line":"                            \u0027column %(c)s in table %(t)s not match.\u0027"},{"line_number":86,"context_line":"                            % {\u0027c\u0027: column.name,"},{"line_number":87,"context_line":"                               \u0027t\u0027: name})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_477f50aa","line":87,"range":{"start_line":73,"start_character":0,"end_line":87,"end_character":42},"updated":"2016-02-26 12:42:08.000000000","message":"Maybe you can get inner for into a private method to save on indentation? That\u0027s nothing critical of course.","commit_id":"20e1e7b631b9c40eb97c476b47d7648d992819ba"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"823d298b494363d35be81632c4a757f8fa749b27","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                         \u0027sure a new objects history version was added in \u0027"},{"line_number":71,"context_line":"                         \u0027cinder.objects.base.OBJ_VERSIONS.\u0027)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_object_nullable_match_db(self):"},{"line_number":74,"context_line":"        # This test is to keep nullable of every field in corresponding"},{"line_number":75,"context_line":"        # db model and object match."},{"line_number":76,"context_line":"        classes \u003d base.CinderObjectRegistry.obj_classes()"},{"line_number":77,"context_line":"        for name, cls in classes.items():"},{"line_number":78,"context_line":"            if not issubclass(cls[0], base.ObjectListBase):"},{"line_number":79,"context_line":"                db_model \u003d db.get_model_for_versioned_object(cls[0])"},{"line_number":80,"context_line":"                for column in db_model.__table__.columns:"},{"line_number":81,"context_line":"                    if column.name in cls[0].fields:"},{"line_number":82,"context_line":"                        self.assertEqual("},{"line_number":83,"context_line":"                            column.nullable,"},{"line_number":84,"context_line":"                            cls[0].fields[column.name].nullable,"},{"line_number":85,"context_line":"                            \u0027column %(c)s in table %(t)s not match.\u0027"},{"line_number":86,"context_line":"                            % {\u0027c\u0027: column.name,"},{"line_number":87,"context_line":"                               \u0027t\u0027: name})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_44841c5d","line":87,"range":{"start_line":73,"start_character":0,"end_line":87,"end_character":42},"in_reply_to":"9aed3d3a_477f50aa","updated":"2016-02-29 08:13:26.000000000","message":"Done","commit_id":"20e1e7b631b9c40eb97c476b47d7648d992819ba"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f957dd6655b59d04b74386ec1010dca584280ad4","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# NOTE: The hashes in this list should only be changed if they come with a"},{"line_number":23,"context_line":"# corresponding version bump in the affected objects."},{"line_number":24,"context_line":"object_data \u003d {"},{"line_number":25,"context_line":"    \u0027Backup\u0027: \u00271.4-cae44fe34d5a870110ba93adebc1edca\u0027,"},{"line_number":26,"context_line":"    \u0027BackupImport\u0027: \u00271.4-cae44fe34d5a870110ba93adebc1edca\u0027,"},{"line_number":27,"context_line":"    \u0027BackupList\u0027: \u00271.0-24591dabe26d920ce0756fe64cd5f3aa\u0027,"},{"line_number":28,"context_line":"    \u0027CGSnapshot\u0027: \u00271.0-78b91e76cb4c56e9cf5c9c41e208c05a\u0027,"},{"line_number":29,"context_line":"    \u0027CGSnapshotList\u0027: \u00271.0-e8c3f4078cd0ee23487b34d173eec776\u0027,"},{"line_number":30,"context_line":"    \u0027ConsistencyGroup\u0027: \u00271.2-3aeb6b25664057e8078bd6d45bf23e0a\u0027,"},{"line_number":31,"context_line":"    \u0027ConsistencyGroupList\u0027: \u00271.1-73916823b697dfa0c7f02508d87e0f28\u0027,"},{"line_number":32,"context_line":"    \u0027Service\u0027: \u00271.3-66c8e1683f58546c54551e9ff0a3b111\u0027,"},{"line_number":33,"context_line":"    \u0027ServiceList\u0027: \u00271.1-cb758b200f0a3a90efabfc5aa2ffb627\u0027,"},{"line_number":34,"context_line":"    \u0027Snapshot\u0027: \u00271.0-404c1a8b48a808aa0b7cc92cd3ec1e57\u0027,"},{"line_number":35,"context_line":"    \u0027SnapshotList\u0027: \u00271.0-71661e7180ef6cc51501704a9bea4bf1\u0027,"},{"line_number":36,"context_line":"    \u0027Volume\u0027: \u00271.3-264388ec57bc4c3353c89f93bebf9482\u0027,"},{"line_number":37,"context_line":"    \u0027VolumeAttachment\u0027: \u00271.0-8fc9a9ac6f554fdf2a194d25dbf28a3b\u0027,"},{"line_number":38,"context_line":"    \u0027VolumeAttachmentList\u0027: \u00271.0-307d2b6c8dd55ef854f6386898e9e98e\u0027,"},{"line_number":39,"context_line":"    \u0027VolumeList\u0027: \u00271.1-03ba6cb8c546683e64e15c50042cb1a3\u0027,"},{"line_number":40,"context_line":"    \u0027VolumeType\u0027: \u00271.0-dd980cfd1eef2dcce941a981eb469fc8\u0027,"},{"line_number":41,"context_line":"    \u0027VolumeTypeList\u0027: \u00271.1-8a1016c03570dc13b9a33fe04a6acb2c\u0027,"},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_b92378a6","line":41,"range":{"start_line":25,"start_character":0,"end_line":41,"end_character":61},"updated":"2016-02-29 14:10:41.000000000","message":"Note for reviewers: It is a conscious decision that we don\u0027t bump objects versions. See my comment from previous patchset:\n\n\"If we change the version, then we should to provide backward compatible object in obj_make_compat. Unfortunately there\u0027s no way to do so - we simply don\u0027t have the data to fill when there\u0027s NULL in the field.\n\nWe can leave the version as is (we\u0027re always switching NOT NULL to NULLABLE, so what\u0027s already in the DB will not break), but then when sending the object to Liberty it may happen that Liberty will fail, as field was set to NULL, and it breaks the NOT NULL constraint Liberty has…\n\nI lean to do #2 - let\u0027s not bump the objects version. I believe there weren\u0027t any cases when we\u0027ve set these fields to NULL (besides related bug here), otherwise there would be bugs in Liberty. Liberty should be fine then (fingers crossed).\"","commit_id":"7a158ac4488ac86c742e15c714dda7dd76772366"}]}
