)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1f01f015c9841254b055c91fa81d0357e816d8d8","unresolved":false,"context_lines":[{"line_number":15,"context_line":"to make PostgreSQL happy, should someone pass a boolean value for"},{"line_number":16,"context_line":"deleted column."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"In the future, we should probably change the type of deleted field"},{"line_number":19,"context_line":"of NovaPersistentObject to match the type we have in DB schema, i.e."},{"line_number":20,"context_line":"Integer with default of 0 instead of Boolean with default of False."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1644513"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a74a57a_0014be9d","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":67},"updated":"2016-11-28 11:04:46.000000000","message":"No, the object must represent what the code user wants to know.\n\nHow we implement deleted is a nasty implementation detail the user of the object shouldn\u0027t need to worry about.\n\nI would argue, the real problem here is the object abstraction layer has not corrected marked the deleted filed as read_only. Created method should set this to 0, or ideally never pass it in, and always use the default of 0, and the delete method does the usual soft_delete stuff of adding an int into that column.\n\nBasically the bug I believe is allowing deleted to be passed into the create calls in the object (and/or in to the DB layer). Created are not delete, and you call destroy to set that field, and its not manipulated any other way.","commit_id":"71f7870a885e17299aecbc25cd06da1bd1dff210"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0ad916a2960db047d910ef308dfb03b08f9637c5","unresolved":false,"context_lines":[{"line_number":15,"context_line":"to make PostgreSQL happy, should someone pass a boolean value for"},{"line_number":16,"context_line":"deleted column."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"In the future, we should probably change the type of deleted field"},{"line_number":19,"context_line":"of NovaPersistentObject to match the type we have in DB schema, i.e."},{"line_number":20,"context_line":"Integer with default of 0 instead of Boolean with default of False."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1644513"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a74a57a_d6836b54","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":67},"in_reply_to":"5a74a57a_0014be9d","updated":"2016-11-28 13:02:57.000000000","message":"\u003e\u003e\u003e No, the object must represent what the code user wants to know.\nHow we implement deleted is a nasty implementation detail the user of the object shouldn\u0027t need to worry about.\n\nFair enough, I\u0027m totally cool with that - if the intent of the deleted field in the objects was to hide the implementation detail - that\u0027s great, I just did not know that.\n\n\u003e\u003e\u003e Created method should set this to 0, or ideally never pass it in, and always use the default of 0\n\nI haven\u0027t checked the OVO code yet, but my expectation of its API was that marking the field read-only wouldn\u0027t prevent the default value (which is ``False``) to be used when talking to the DB layer.","commit_id":"71f7870a885e17299aecbc25cd06da1bd1dff210"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"87ec49496bbb1d833acf6ed6294494f10cc36ad5","unresolved":false,"context_lines":[{"line_number":15,"context_line":"to make PostgreSQL happy, should someone pass a boolean value for"},{"line_number":16,"context_line":"deleted column."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"In the future, we should probably change the type of deleted field"},{"line_number":19,"context_line":"of NovaPersistentObject to match the type we have in DB schema, i.e."},{"line_number":20,"context_line":"Integer with default of 0 instead of Boolean with default of False."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1644513"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a74a57a_760b772a","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":67},"in_reply_to":"5a74a57a_d6836b54","updated":"2016-11-28 13:11:26.000000000","message":"e.g. when the on initialization of object when the corresponding DB row is created.","commit_id":"71f7870a885e17299aecbc25cd06da1bd1dff210"}],"nova/db/sqlalchemy/models.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0bf5f0cdd5920b8e96a621884b7d63bed9c04923","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class SoftDeleteMixin(models.SoftDeleteMixin):"},{"line_number":51,"context_line":"    deleted \u003d Column(DeletedBooleanType, default\u003d0)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class NovaBase(models.TimestampMixin,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_c84cdfca","line":51,"updated":"2016-11-25 14:13:21.000000000","message":"Instead of modifying the Mixin, why not modifying the BuildRequest object method ?","commit_id":"9b511ad100399f4b92a772b7c9abc894515118cf"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6054dd47e0632d9802f6cbe411ddad7ad222eb88","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class SoftDeleteMixin(models.SoftDeleteMixin):"},{"line_number":51,"context_line":"    deleted \u003d Column(DeletedBooleanType, default\u003d0)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class NovaBase(models.TimestampMixin,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_da53c1e0","line":51,"in_reply_to":"5a74a57a_c84cdfca","updated":"2016-11-25 15:51:26.000000000","message":"I\u0027m afraid that won\u0027t help - we can\u0027t simply assign 0 instead of False, as Boolean field type would automatically coerce the value on assignment - https://github.com/openstack/oslo.versionedobjects/blob/master/oslo_versionedobjects/fields.py#L435-L438","commit_id":"9b511ad100399f4b92a772b7c9abc894515118cf"}]}
