)]}'
{"gnocchi/indexer/sqlalchemy.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"35c5b1de8027bb89218b94ac3d64bc5c410315b7","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                    raise indexer.NoSuchResource(resource_id)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"                # Build history"},{"line_number":307,"context_line":"                rh \u003d resource_history_cls()"},{"line_number":308,"context_line":"                for col in sqlalchemy.inspect(resource_cls).columns:"},{"line_number":309,"context_line":"                    setattr(rh, col.name, getattr(r, col.name))"},{"line_number":310,"context_line":"                rh.revision_end \u003d now"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_204da672","side":"PARENT","line":307,"updated":"2015-12-22 20:59:54.000000000","message":"i think we should skip all the resource/","commit_id":"09dad20347f3d5362b015a6351d041f46585815e"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"35c5b1de8027bb89218b94ac3d64bc5c410315b7","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                    raise indexer.NoSuchResource(resource_id)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"                # Build history"},{"line_number":307,"context_line":"                rh \u003d resource_history_cls()"},{"line_number":308,"context_line":"                for col in sqlalchemy.inspect(resource_cls).columns:"},{"line_number":309,"context_line":"                    setattr(rh, col.name, getattr(r, col.name))"},{"line_number":310,"context_line":"                rh.revision_end \u003d now"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_60908e96","side":"PARENT","line":307,"updated":"2015-12-22 20:59:54.000000000","message":"we already check resource in api[1]. i think we should just add a param for metric_only that skips history.\n\n[1] https://github.com/openstack/gnocchi/blob/master/gnocchi/rest/__init__.py#L811","commit_id":"09dad20347f3d5362b015a6351d041f46585815e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e521f976efa386ca919adeabe21049ec4d855f08","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                    raise indexer.NoSuchResource(resource_id)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"                # Build history"},{"line_number":307,"context_line":"                rh \u003d resource_history_cls()"},{"line_number":308,"context_line":"                for col in sqlalchemy.inspect(resource_cls).columns:"},{"line_number":309,"context_line":"                    setattr(rh, col.name, getattr(r, col.name))"},{"line_number":310,"context_line":"                rh.revision_end \u003d now"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_c36aac1a","side":"PARENT","line":307,"in_reply_to":"1a7b0d38_60908e96","updated":"2015-12-22 21:40:19.000000000","message":"Right, I missed that part, so we double-check with that patch. I guess we can put the logic of create-or-not-a-revision in the API. I\u0027ll change that.","commit_id":"09dad20347f3d5362b015a6351d041f46585815e"}],"gnocchi/rest/__init__.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"aea407c1ff239ee43189cc89ce9bdbb790aef118","unresolved":false,"context_lines":[{"line_number":675,"context_line":"        metrics \u003d deserialize_and_validate(MetricsSchema)"},{"line_number":676,"context_line":"        try:"},{"line_number":677,"context_line":"            pecan.request.indexer.update_resource("},{"line_number":678,"context_line":"                self.resource_type, self.resource_id, metrics\u003dmetrics,"},{"line_number":679,"context_line":"                append_metrics\u003dTrue)"},{"line_number":680,"context_line":"        except (indexer.NoSuchMetric,"},{"line_number":681,"context_line":"                indexer.NoSuchArchivePolicy,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_5d2bdaeb","line":678,"updated":"2015-12-23 13:58:42.000000000","message":"i think this is the update_resource call we should be dealing with. this should be set to create_revision\u003dfalse","commit_id":"7ab022a57694a26fb6782a61006d8dce683e54a9"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"ab9133288a8c097c25e3c87186841fadabe65633","unresolved":false,"context_lines":[{"line_number":675,"context_line":"        metrics \u003d deserialize_and_validate(MetricsSchema)"},{"line_number":676,"context_line":"        try:"},{"line_number":677,"context_line":"            pecan.request.indexer.update_resource("},{"line_number":678,"context_line":"                self.resource_type, self.resource_id, metrics\u003dmetrics,"},{"line_number":679,"context_line":"                append_metrics\u003dTrue)"},{"line_number":680,"context_line":"        except (indexer.NoSuchMetric,"},{"line_number":681,"context_line":"                indexer.NoSuchArchivePolicy,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_019410e0","line":678,"in_reply_to":"1a7b0d38_5d2bdaeb","updated":"2015-12-23 14:14:13.000000000","message":"Right. I need to add test for this.","commit_id":"7ab022a57694a26fb6782a61006d8dce683e54a9"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"aea407c1ff239ee43189cc89ce9bdbb790aef118","unresolved":false,"context_lines":[{"line_number":817,"context_line":"                create_revision \u003d True"},{"line_number":818,"context_line":"                break"},{"line_number":819,"context_line":"        else:"},{"line_number":820,"context_line":"            if \u0027metrics\u0027 not in body:"},{"line_number":821,"context_line":"                # No need to go further, we assume the db resource"},{"line_number":822,"context_line":"                # doesn\u0027t change between the get and update"},{"line_number":823,"context_line":"                return resource"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_fd6ac619","line":820,"updated":"2015-12-23 13:58:42.000000000","message":"i don\u0027t think we need any changes to this patch method.\n\ni\u0027m not sure this check does anything if we already ran though entire body above. if metrics exist, it will always overwrite the existing metrics.","commit_id":"7ab022a57694a26fb6782a61006d8dce683e54a9"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"68fb54d64f57adc0be6055668d812c23caaa48f3","unresolved":false,"context_lines":[{"line_number":817,"context_line":"                create_revision \u003d True"},{"line_number":818,"context_line":"                break"},{"line_number":819,"context_line":"        else:"},{"line_number":820,"context_line":"            if \u0027metrics\u0027 not in body:"},{"line_number":821,"context_line":"                # No need to go further, we assume the db resource"},{"line_number":822,"context_line":"                # doesn\u0027t change between the get and update"},{"line_number":823,"context_line":"                return resource"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_aab071f5","line":820,"in_reply_to":"1a7b0d38_64f722d4","updated":"2015-12-23 15:12:29.000000000","message":"This is in a else, it\u0027s only executed if the loop did not break.","commit_id":"7ab022a57694a26fb6782a61006d8dce683e54a9"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"62d4c903a23067b37152ead12b759d0f8c494fbb","unresolved":false,"context_lines":[{"line_number":817,"context_line":"                create_revision \u003d True"},{"line_number":818,"context_line":"                break"},{"line_number":819,"context_line":"        else:"},{"line_number":820,"context_line":"            if \u0027metrics\u0027 not in body:"},{"line_number":821,"context_line":"                # No need to go further, we assume the db resource"},{"line_number":822,"context_line":"                # doesn\u0027t change between the get and update"},{"line_number":823,"context_line":"                return resource"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_64f722d4","line":820,"in_reply_to":"1a7b0d38_816d6006","updated":"2015-12-23 14:29:34.000000000","message":"but the loop above, through body, would create revision if we change metrics.","commit_id":"7ab022a57694a26fb6782a61006d8dce683e54a9"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"7186bfac01c0db79b7287bbb8d08fbf6c1318c9b","unresolved":false,"context_lines":[{"line_number":817,"context_line":"                create_revision \u003d True"},{"line_number":818,"context_line":"                break"},{"line_number":819,"context_line":"        else:"},{"line_number":820,"context_line":"            if \u0027metrics\u0027 not in body:"},{"line_number":821,"context_line":"                # No need to go further, we assume the db resource"},{"line_number":822,"context_line":"                # doesn\u0027t change between the get and update"},{"line_number":823,"context_line":"                return resource"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_b55e92e7","line":820,"in_reply_to":"1a7b0d38_aab071f5","updated":"2015-12-23 15:35:33.000000000","message":"I see what you mean. yeah this is wrong actually!","commit_id":"7ab022a57694a26fb6782a61006d8dce683e54a9"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"ab9133288a8c097c25e3c87186841fadabe65633","unresolved":false,"context_lines":[{"line_number":817,"context_line":"                create_revision \u003d True"},{"line_number":818,"context_line":"                break"},{"line_number":819,"context_line":"        else:"},{"line_number":820,"context_line":"            if \u0027metrics\u0027 not in body:"},{"line_number":821,"context_line":"                # No need to go further, we assume the db resource"},{"line_number":822,"context_line":"                # doesn\u0027t change between the get and update"},{"line_number":823,"context_line":"                return resource"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a7b0d38_816d6006","line":820,"in_reply_to":"1a7b0d38_fd6ac619","updated":"2015-12-23 14:14:13.000000000","message":"We do, if you change only metrics, you need to update without creating revision.","commit_id":"7ab022a57694a26fb6782a61006d8dce683e54a9"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"efce56c23174feae57243349d328b1911c7a1406","unresolved":false,"context_lines":[{"line_number":816,"context_line":"        changes \u003d False"},{"line_number":817,"context_line":"        create_revision \u003d False"},{"line_number":818,"context_line":"        for k, v in six.iteritems(body):"},{"line_number":819,"context_line":"            if getattr(resource, k) !\u003d v:"},{"line_number":820,"context_line":"                changes \u003d True"},{"line_number":821,"context_line":"                if k !\u003d \"metrics\":"},{"line_number":822,"context_line":"                    create_revision \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_195f9842","line":819,"updated":"2015-12-23 21:56:28.000000000","message":"i have a preference to just skip metrics comparison because the incoming metrics in body (dict) vs resource.metrics (Metric obj) will never be equal.\n\ni think we should just avoid querying with_metrics above and just assume any body with metrics is a change as we did before.","commit_id":"b723a2228a133e8efebca2a80ba214f96561a07f"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"23be721feab91e969cd3e9e3724a6be6805f49fe","unresolved":false,"context_lines":[{"line_number":816,"context_line":"        changes \u003d False"},{"line_number":817,"context_line":"        create_revision \u003d False"},{"line_number":818,"context_line":"        for k, v in six.iteritems(body):"},{"line_number":819,"context_line":"            if getattr(resource, k) !\u003d v:"},{"line_number":820,"context_line":"                changes \u003d True"},{"line_number":821,"context_line":"                if k !\u003d \"metrics\":"},{"line_number":822,"context_line":"                    create_revision \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_ef92e74a","line":819,"in_reply_to":"1a7b0d38_195f9842","updated":"2015-12-24 15:50:33.000000000","message":"I thought about skipping metric but was not sure. But you\u0027re right, it\u0027ll never be equal, so let\u0027s assume if it is it\u0027s a change.","commit_id":"b723a2228a133e8efebca2a80ba214f96561a07f"}]}
