)]}'
{"neutron/db/agents_db.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"fd1707ccce3802e7e08be480407248e0066f57dc","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":90,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":91,"context_line":"    # load - number of resources hosted by the agent"},{"line_number":92,"context_line":"    load \u003d sa.Column(sa.Integer, default\u003d0, server_default\u003d\u00270\u0027, nullable\u003dFalse)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @property"},{"line_number":95,"context_line":"    def is_active(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_64f3f673","line":92,"updated":"2015-03-23 09:42:31.000000000","message":"what is the result if we have not default \u003d0 here?","commit_id":"6527d9a7eb36473cf406046f8f4897437b17f5ee"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"44ce7edb731f7ba78e82b39e9342856837446b21","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":90,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":91,"context_line":"    # load - number of resources hosted by the agent"},{"line_number":92,"context_line":"    load \u003d sa.Column(sa.Integer, default\u003d0, server_default\u003d\u00270\u0027, nullable\u003dFalse)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @property"},{"line_number":95,"context_line":"    def is_active(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_1ee33406","line":92,"in_reply_to":"1a6ced46_1f2512c2","updated":"2015-03-24 12:03:14.000000000","message":"Thanks for pointing this. As seems that can leave this without reverting.\n\nThat is a good idea about adding information about in devref. I\u0027ll work on it.","commit_id":"6527d9a7eb36473cf406046f8f4897437b17f5ee"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"d25d69d3bd4880898aeae9dc66257362c9ed007b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":90,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":91,"context_line":"    # load - number of resources hosted by the agent"},{"line_number":92,"context_line":"    load \u003d sa.Column(sa.Integer, default\u003d0, server_default\u003d\u00270\u0027, nullable\u003dFalse)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @property"},{"line_number":95,"context_line":"    def is_active(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_b77c3974","line":92,"in_reply_to":"1a6ced46_64f3f673","updated":"2015-03-23 11:45:32.000000000","message":"default is used via code. server_default is set in db. So server_default is not equivalent of default here.","commit_id":"6527d9a7eb36473cf406046f8f4897437b17f5ee"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c12904865daea6f1fe728e47ba925dce5165c8dd","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":90,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":91,"context_line":"    # load - number of resources hosted by the agent"},{"line_number":92,"context_line":"    load \u003d sa.Column(sa.Integer, default\u003d0, server_default\u003d\u00270\u0027, nullable\u003dFalse)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    @property"},{"line_number":95,"context_line":"    def is_active(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6ced46_1f2512c2","line":92,"in_reply_to":"1a6ced46_b77c3974","updated":"2015-03-23 17:44:39.000000000","message":"This should be fine, as the default is set via other logic [1,2]. That said, I\u0027d like to understand if we can provide guidelines to DB models and migrations, as I have seen these types of mistakes time and time again. If we document these gotchas, we can stop them from happening, or at least mitigate them\n\n [1] https://github.com/openstack/neutron/blob/master/neutron/db/agents_db.py#L142\n [2] https://github.com/openstack/neutron/blob/master/neutron/db/agents_db.py#L213\n [3] http://docs.openstack.org/developer/neutron/devref/","commit_id":"6527d9a7eb36473cf406046f8f4897437b17f5ee"}]}
