)]}'
{"heat/engine/parser.py":[{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"e31fc8fcbd3de08ad2cdeabc38c77b552cf24013","unresolved":false,"context_lines":[{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        self.action \u003d action"},{"line_number":389,"context_line":"        self.status \u003d status"},{"line_number":390,"context_line":"        self.status_reason \u003d reason and reason[:255] or \u0027\u0027"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        if self.id is None:"},{"line_number":393,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"bad4c104_5d17aca3","line":390,"updated":"2014-04-29 11:12:47.000000000","message":"I think this limit is being enforced in the wrong place, as the 255 character limit is part of the schema/DB model and may not necessarily be fixed forever.\n\nI\u0027d prefer the truncation logic to be encapsulated in the model, e.g create a HeatBaseWithStatus class or something, which as a setter which does the truncation:\n\n    # Use a property to enable silent truncation of status_reason\n    _status_reason \u003d sqlalchemy.Column(\u0027status_reason\u0027, sqlalchemy.String(255))\n    @property\n    def status_reason(self):\n        return self._status_reason\n\n    @status_reason.setter\n    def status_reason(self, reason):\n       self._status_reason \u003d reason and reason[:255] or \u0027\u0027\n\nThis would ensure the truncation happens in the same place as the column sizes are defined in the model, and make it more obvious/explicit that we\u0027re silently truncating data on purpose.","commit_id":"d01150c2f0d1bf6d66172f3d45b67108caae597a"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"30313d78b08a90c27423318e7dbd21593f73149d","unresolved":false,"context_lines":[{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        self.action \u003d action"},{"line_number":389,"context_line":"        self.status \u003d status"},{"line_number":390,"context_line":"        self.status_reason \u003d reason and reason[:255] or \u0027\u0027"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        if self.id is None:"},{"line_number":393,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad9bd40_e5dab216","line":390,"in_reply_to":"bad4c104_5d17aca3","updated":"2014-04-30 00:06:14.000000000","message":"Done","commit_id":"d01150c2f0d1bf6d66172f3d45b67108caae597a"}]}
