)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"dd56fa214220e67988687b0af222ce63bc05cc1f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch adds \u0027age\u0027 field to subscription resource representation"},{"line_number":16,"context_line":"returned from redis driver."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: 1552845"},{"line_number":19,"context_line":"APIImpact"},{"line_number":20,"context_line":"DocImpact"},{"line_number":21,"context_line":"Change-Id: I18f908b2f137bd4b8e5b3d3275063a1d37942093"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7af24918_bd3bd437","line":18,"updated":"2016-03-06 22:13:18.000000000","message":"Partial-Bug?","commit_id":"d8480cb9f4db5d5330950511c8b7595551702b56"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"0d880d53f27b6b141a3bddf615c4567565874ed1","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch adds \u0027age\u0027 field to subscription resource representation"},{"line_number":16,"context_line":"returned from redis driver."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: 1552845"},{"line_number":19,"context_line":"APIImpact"},{"line_number":20,"context_line":"DocImpact"},{"line_number":21,"context_line":"Change-Id: I18f908b2f137bd4b8e5b3d3275063a1d37942093"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7af24918_dd01803b","line":18,"in_reply_to":"7af24918_bd3bd437","updated":"2016-03-06 22:43:28.000000000","message":"I made my patch to depend on mongodb subscription \u0027age\u0027 patch. So when both of them will be merged, the bug report will be automatically closed. If I choose Partial-Bug, the bug report will not be automatically closed.","commit_id":"d8480cb9f4db5d5330950511c8b7595551702b56"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e219b7ba93385ffba29beb107164fef2df187e26","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This patch adds \u0027age\u0027 field to subscription resource representation"},{"line_number":16,"context_line":"returned from redis driver."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: 1552845"},{"line_number":19,"context_line":"APIImpact"},{"line_number":20,"context_line":"DocImpact"},{"line_number":21,"context_line":"Change-Id: I18f908b2f137bd4b8e5b3d3275063a1d37942093"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a18252c_847959ff","line":18,"in_reply_to":"7af24918_dd01803b","updated":"2016-04-12 22:29:07.000000000","message":"ok, fair enough.","commit_id":"d8480cb9f4db5d5330950511c8b7595551702b56"}],"zaqar/storage/redis/models.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"dd56fa214220e67988687b0af222ce63bc05cc1f","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        \u0027ttl\u0027,"},{"line_number":115,"context_line":"        \u0027expires\u0027,"},{"line_number":116,"context_line":"        \u0027options\u0027,"},{"line_number":117,"context_line":"        \u0027project\u0027,"},{"line_number":118,"context_line":"    ]"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_3d2fc4f7","side":"PARENT","line":117,"updated":"2016-03-06 22:13:18.000000000","message":"Why do we need this change?","commit_id":"3419409cc2e0cb359081c76eaf968c148b27e59f"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"bdbc5a6c170fd265bcec72815a038dc256449503","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        \u0027ttl\u0027,"},{"line_number":115,"context_line":"        \u0027expires\u0027,"},{"line_number":116,"context_line":"        \u0027options\u0027,"},{"line_number":117,"context_line":"        \u0027project\u0027,"},{"line_number":118,"context_line":"    ]"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_e4031775","side":"PARENT","line":117,"in_reply_to":"5a18252c_e4d80df2","updated":"2016-05-06 05:55:24.000000000","message":"This attribute in __slots__ is never filled, so it has no value (not even None, so I called it \u0027error value\u0027). And it is also never used, as I said before. But because it is never used, Zaqar runs fine.\n\nSo when I try to read this attribute, I get this:\n(Pdb) subscription.project\n*** AttributeError: project\n\nEven though Zaqar runs fine, I would like to remove this unused attribute. But yes, you\u0027re right, it\u0027s better to make such unrelated changes in a separate patch. So I\u0027ll revert it.","commit_id":"3419409cc2e0cb359081c76eaf968c148b27e59f"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"0d880d53f27b6b141a3bddf615c4567565874ed1","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        \u0027ttl\u0027,"},{"line_number":115,"context_line":"        \u0027expires\u0027,"},{"line_number":116,"context_line":"        \u0027options\u0027,"},{"line_number":117,"context_line":"        \u0027project\u0027,"},{"line_number":118,"context_line":"    ]"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_9dd098cb","side":"PARENT","line":117,"in_reply_to":"7af24918_3d2fc4f7","updated":"2016-03-06 22:43:28.000000000","message":"While running debugger I noticed that we never fill this attribute. Because of it, the \u0027project\u0027 attribute inside \u0027SubscriptionEnvelope\u0027 object has some error value.\nWe also don\u0027t use this attribute.\n\nI can revert this change.","commit_id":"3419409cc2e0cb359081c76eaf968c148b27e59f"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e219b7ba93385ffba29beb107164fef2df187e26","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        \u0027ttl\u0027,"},{"line_number":115,"context_line":"        \u0027expires\u0027,"},{"line_number":116,"context_line":"        \u0027options\u0027,"},{"line_number":117,"context_line":"        \u0027project\u0027,"},{"line_number":118,"context_line":"    ]"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a18252c_e4d80df2","side":"PARENT","line":117,"in_reply_to":"7af24918_9dd098cb","updated":"2016-04-12 22:29:07.000000000","message":"What do you mean \u0027error value\u0027? Is it a bug?","commit_id":"3419409cc2e0cb359081c76eaf968c148b27e59f"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"dd56fa214220e67988687b0af222ce63bc05cc1f","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        if values[0] is None:"},{"line_number":139,"context_line":"            return None"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        return _hmap_kv_to_subenv(values)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def to_redis(self, pipe):"},{"line_number":144,"context_line":"        hmap \u003d _subenv_to_hmap(self)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_7d394c41","line":141,"updated":"2016-03-06 22:13:18.000000000","message":"Why do we need this change? Just refactoring?","commit_id":"d8480cb9f4db5d5330950511c8b7595551702b56"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"0d880d53f27b6b141a3bddf615c4567565874ed1","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        if values[0] is None:"},{"line_number":139,"context_line":"            return None"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        return _hmap_kv_to_subenv(values)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def to_redis(self, pipe):"},{"line_number":144,"context_line":"        hmap \u003d _subenv_to_hmap(self)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_dd53406b","line":141,"in_reply_to":"7af24918_7d394c41","updated":"2016-03-06 22:43:28.000000000","message":"Not just refactoring. It also fixes a small bug.\n\nSee \u0027from_hmap\u0027 function in the old code at L129. At L130 it passes only \u0027hmap\u0027 to \u0027_hmap_kv_to_subenv\u0027 function instead of providing two arguments. But luckily Zaqar\u0027s code is working without problems, because \u0027from_hmap\u0027 function is never used.\nInstead of making this function provide two arguments, I just refactored a bit \u0027_hmap_kv_to_subenv\u0027 function, because there\u0027s no actual need to pass SUBENV_FIELD_KEYS as parameter - it\u0027s already known.\n\nI just noticed this bug and can\u0027t stand it\u0027s existence. But it is very small and I decided to fix it in the same patch.\n\nI can revert this change.","commit_id":"d8480cb9f4db5d5330950511c8b7595551702b56"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e219b7ba93385ffba29beb107164fef2df187e26","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        if values[0] is None:"},{"line_number":139,"context_line":"            return None"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        return _hmap_kv_to_subenv(values)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def to_redis(self, pipe):"},{"line_number":144,"context_line":"        hmap \u003d _subenv_to_hmap(self)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a18252c_c46d1106","line":141,"in_reply_to":"7af24918_dd53406b","updated":"2016-04-12 22:29:07.000000000","message":"I\u0027m fine to keep it in this patch. But if you\u0027re going to propose another patch as I mentioned in the other comments. Pls move this to there, that would be better. Thanks a lot.","commit_id":"d8480cb9f4db5d5330950511c8b7595551702b56"}],"zaqar/storage/redis/subscriptions.py":[{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"9ef159f6dbb3c07158bb3a6d2e14a4b8ca7b57c4","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        marker_next \u003d {}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        def denormalizer(record, sid):"},{"line_number":75,"context_line":"            now \u003d timeutils.utcnow_ts()"},{"line_number":76,"context_line":"            ttl \u003d int(record[2])"},{"line_number":77,"context_line":"            expires \u003d int(record[3])"},{"line_number":78,"context_line":"            created \u003d expires - ttl"},{"line_number":79,"context_line":"            ret \u003d {"},{"line_number":80,"context_line":"                \u0027id\u0027: sid,"},{"line_number":81,"context_line":"                \u0027source\u0027: record[0],"},{"line_number":82,"context_line":"                \u0027subscriber\u0027: record[1],"},{"line_number":83,"context_line":"                \u0027ttl\u0027: ttl,"},{"line_number":84,"context_line":"                \u0027age\u0027: now - created,"},{"line_number":85,"context_line":"                \u0027options\u0027: self._unpacker(record[4]),"},{"line_number":86,"context_line":"            }"},{"line_number":87,"context_line":"            marker_next[\u0027next\u0027] \u003d sid"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_fda6fc51","line":85,"range":{"start_line":75,"start_character":0,"end_line":85,"end_character":53},"updated":"2016-03-06 23:02:20.000000000","message":"DRY: I don\u0027t like that it repeats zaqar.storage.redis.models.SubscriptionEnvelope#to_basic.\n\nPerhaps, we could rewrite utils.SubscriptionListCursor to just use SubscriptionEnvelope inside.\nBut instantiating SubscriptionEnvelope and running it\u0027s \u0027to_basic\u0027 method is probably sligtly slower.\n\nWould you like me to DRY it in another patch?","commit_id":"d8480cb9f4db5d5330950511c8b7595551702b56"},{"author":{"_account_id":18683,"name":"Eva Balycheva","email":"ubershy@gmail.com","username":"eva"},"change_message_id":"bdbc5a6c170fd265bcec72815a038dc256449503","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        marker_next \u003d {}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        def denormalizer(record, sid):"},{"line_number":75,"context_line":"            now \u003d timeutils.utcnow_ts()"},{"line_number":76,"context_line":"            ttl \u003d int(record[2])"},{"line_number":77,"context_line":"            expires \u003d int(record[3])"},{"line_number":78,"context_line":"            created \u003d expires - ttl"},{"line_number":79,"context_line":"            ret \u003d {"},{"line_number":80,"context_line":"                \u0027id\u0027: sid,"},{"line_number":81,"context_line":"                \u0027source\u0027: record[0],"},{"line_number":82,"context_line":"                \u0027subscriber\u0027: record[1],"},{"line_number":83,"context_line":"                \u0027ttl\u0027: ttl,"},{"line_number":84,"context_line":"                \u0027age\u0027: now - created,"},{"line_number":85,"context_line":"                \u0027options\u0027: self._unpacker(record[4]),"},{"line_number":86,"context_line":"            }"},{"line_number":87,"context_line":"            marker_next[\u0027next\u0027] \u003d sid"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_643f2726","line":85,"range":{"start_line":75,"start_character":0,"end_line":85,"end_character":53},"in_reply_to":"5a18252c_444f41bd","updated":"2016-05-06 05:55:24.000000000","message":"Yes, I\u0027ll propose a separate patch. Maybe I\u0027ll name it \"Cleanup of redis subscription code\".","commit_id":"d8480cb9f4db5d5330950511c8b7595551702b56"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e219b7ba93385ffba29beb107164fef2df187e26","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        marker_next \u003d {}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        def denormalizer(record, sid):"},{"line_number":75,"context_line":"            now \u003d timeutils.utcnow_ts()"},{"line_number":76,"context_line":"            ttl \u003d int(record[2])"},{"line_number":77,"context_line":"            expires \u003d int(record[3])"},{"line_number":78,"context_line":"            created \u003d expires - ttl"},{"line_number":79,"context_line":"            ret \u003d {"},{"line_number":80,"context_line":"                \u0027id\u0027: sid,"},{"line_number":81,"context_line":"                \u0027source\u0027: record[0],"},{"line_number":82,"context_line":"                \u0027subscriber\u0027: record[1],"},{"line_number":83,"context_line":"                \u0027ttl\u0027: ttl,"},{"line_number":84,"context_line":"                \u0027age\u0027: now - created,"},{"line_number":85,"context_line":"                \u0027options\u0027: self._unpacker(record[4]),"},{"line_number":86,"context_line":"            }"},{"line_number":87,"context_line":"            marker_next[\u0027next\u0027] \u003d sid"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a18252c_444f41bd","line":85,"range":{"start_line":75,"start_character":0,"end_line":85,"end_character":53},"in_reply_to":"7af24918_fda6fc51","updated":"2016-04-12 22:29:07.000000000","message":"Generally, we would like to minimize the change for each patch to limit the side effect and regression issue. So it would be nice if you do this in a separated patch. Thanks.","commit_id":"d8480cb9f4db5d5330950511c8b7595551702b56"}]}
