)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":13273,"name":"Lena Novokshonova","email":"enovokshonova@mirantis.com","username":"enovokshonova"},"change_message_id":"8b27ee214c4de704a7e4580e6be97ecd13b5032a","unresolved":false,"context_lines":[{"line_number":2424,"context_line":"        if i.field in evt_model_filter:"},{"line_number":2425,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":2426,"context_line":"        else:"},{"line_number":2427,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":2428,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":2429,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":2430,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_d6a5d4b5","line":2427,"updated":"2015-01-14 16:08:55.000000000","message":"I think it is reasonable to write here trait_type \u003d getattr(i, \u0027type\u0027, \u0027string\u0027) not to catch attribute error","commit_id":"5d871fdcf73b1afbc98b9211aec22d7daf99e7d7"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"373b45fd593259d2c46f1e6ed92f4176a2d0a19e","unresolved":false,"context_lines":[{"line_number":2424,"context_line":"        if i.field in evt_model_filter:"},{"line_number":2425,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":2426,"context_line":"        else:"},{"line_number":2427,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":2428,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":2429,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":2430,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_f1a1c194","line":2427,"in_reply_to":"1a930d6b_f19b6915","updated":"2015-02-05 10:32:26.000000000","message":"thanks for investigate it\n\nI think empty string should be treated as not set as well, see my comment for Nadya Privalova\n\nif we agree that empty string should be not supported, let\u0027s fix in ceilometerclient firstly, and perhaps wait for one or two release, then we can disable empty string\n\nso if things are not getting worse, I\u0027d rather support empty string  here","commit_id":"5d871fdcf73b1afbc98b9211aec22d7daf99e7d7"},{"author":{"_account_id":13273,"name":"Lena Novokshonova","email":"enovokshonova@mirantis.com","username":"enovokshonova"},"change_message_id":"1ee363cc27dda5b22e1d9e5591f04b36626c4196","unresolved":false,"context_lines":[{"line_number":2424,"context_line":"        if i.field in evt_model_filter:"},{"line_number":2425,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":2426,"context_line":"        else:"},{"line_number":2427,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":2428,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":2429,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":2430,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_c9235dbc","line":2427,"in_reply_to":"3a961159_64e9b57e","updated":"2015-01-15 09:03:04.000000000","message":"Ok, thanks for explanation!","commit_id":"5d871fdcf73b1afbc98b9211aec22d7daf99e7d7"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"872a9dd5ec4a33e56a13cabc08266222277df3c6","unresolved":false,"context_lines":[{"line_number":2424,"context_line":"        if i.field in evt_model_filter:"},{"line_number":2425,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":2426,"context_line":"        else:"},{"line_number":2427,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":2428,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":2429,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":2430,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_f19b6915","line":2427,"in_reply_to":"3a961159_c9235dbc","updated":"2015-01-27 12:10:10.000000000","message":"In line 2303 we already have default value for type param, other case when type is set as empty string, but it more like an error type so it could be improved in method _get_value_as_type(line 285)","commit_id":"5d871fdcf73b1afbc98b9211aec22d7daf99e7d7"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"fdb3282efb47df7c4e41d41bbdce9c3b17eeab9f","unresolved":false,"context_lines":[{"line_number":2424,"context_line":"        if i.field in evt_model_filter:"},{"line_number":2425,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":2426,"context_line":"        else:"},{"line_number":2427,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":2428,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":2429,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":2430,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_64e9b57e","line":2427,"in_reply_to":"3a961159_d6a5d4b5","updated":"2015-01-15 04:50:18.000000000","message":"event query will always get that field even it is unset in api query\n\nthe code you suggest cannot handle the case when i.type \u003d\u003d \u0027\u0027 IIUC\n\n    \u003e\u003e\u003e class A(object): pass\n    ... \n    \u003e\u003e\u003e a \u003d A()\n    \u003e\u003e\u003e a.x \u003d \u0027\u0027\n    \u003e\u003e\u003e getattr(a, \u0027x\u0027, \u0027string\u0027)\n    \u0027\u0027","commit_id":"5d871fdcf73b1afbc98b9211aec22d7daf99e7d7"}],"ceilometer/api/controllers/v2/events.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"68c445bfb18f3fa58b2c88f0fdc2d88038a9aa5b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    \"\"\"Query arguments for Event Queries.\"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    _supported_types \u003d [\u0027integer\u0027, \u0027float\u0027, \u0027string\u0027, \u0027datetime\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    type \u003d wsme.wsattr(wtypes.text, default\u003d\u0027string\u0027)"},{"line_number":62,"context_line":"    \"the type of the trait filter, defaults to string\""},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_113ba39d","line":60,"updated":"2015-02-25 20:13:13.000000000","message":"it seems like this already happens?","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"ce9816ddf2e23ba58f8c6f046e55e0ae0f155a67","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    \"\"\"Query arguments for Event Queries.\"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    _supported_types \u003d [\u0027integer\u0027, \u0027float\u0027, \u0027string\u0027, \u0027datetime\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    type \u003d wsme.wsattr(wtypes.text, default\u003d\u0027string\u0027)"},{"line_number":62,"context_line":"    \"the type of the trait filter, defaults to string\""},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_8f8f6474","line":60,"in_reply_to":"ba7be1f8_113ba39d","updated":"2015-02-26 01:56:49.000000000","message":"if q.type is not specified, then it will be string, \n\nbut if it is specified such as q.field\u003dx\u0026q.op\u003deq\u0026q.type\u003d\u0026q.value\u003dy then 500 will be raised, this format is exactly what ceilometerclient calls when I run \"ceilometer event-list -q x\u003dy\"","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"6b2ca7996846d43021d4c50c348a717a5e751107","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    \"\"\"Query arguments for Event Queries.\"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    _supported_types \u003d [\u0027integer\u0027, \u0027float\u0027, \u0027string\u0027, \u0027datetime\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    type \u003d wsme.wsattr(wtypes.text, default\u003d\u0027string\u0027)"},{"line_number":62,"context_line":"    \"the type of the trait filter, defaults to string\""},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_19a9cc7b","line":60,"in_reply_to":"ba7be1f8_318de4d3","updated":"2015-02-27 01:44:11.000000000","message":"the problem is that user may construct such query too, no matter intend or not, then he will get a 500 without properly explanation\n\nceilometerclient use some common code to parse the cli query format, it can be improved for no type is specified scenario, but I think it is better to fix in ceilometer side to improve the robust","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"3775176cb51e5906f2871dcc2814c3ae26902df2","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    \"\"\"Query arguments for Event Queries.\"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    _supported_types \u003d [\u0027integer\u0027, \u0027float\u0027, \u0027string\u0027, \u0027datetime\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    type \u003d wsme.wsattr(wtypes.text, default\u003d\u0027string\u0027)"},{"line_number":62,"context_line":"    \"the type of the trait filter, defaults to string\""},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_318de4d3","line":60,"in_reply_to":"ba7be1f8_8f8f6474","updated":"2015-02-26 14:23:29.000000000","message":"i see... so i guess just for debate. should we be fixing this in ceilometerclient? as it seems like the query passed in is purposely un-setting the default.","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"68c445bfb18f3fa58b2c88f0fdc2d88038a9aa5b","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        if i.field in evt_model_filter:"},{"line_number":171,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":174,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":175,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":176,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_1162c3ad","line":173,"updated":"2015-02-25 20:13:13.000000000","message":"i don\u0027t think this does what you think. if type does not exist, getattr(i, \u0027type\u0027) will throw an error since there\u0027s no default.\n\nhttps://docs.python.org/2/library/functions.html#getattr","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"ce9816ddf2e23ba58f8c6f046e55e0ae0f155a67","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        if i.field in evt_model_filter:"},{"line_number":171,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":174,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":175,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":176,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_8fe68442","line":173,"in_reply_to":"ba7be1f8_1162c3ad","updated":"2015-02-26 01:56:49.000000000","message":"if type is not specified, then it will be \u0027string\u0027, see L61, so it always gets something\n\ntest with \n\n    curl -i -X GET -H \"X-Auth-Token: $(keystone token-get | awk \u0027NR\u003d\u003d5{print $4}\u0027)\" -H \u0027Content-Type: application/json\u0027 -H \u0027Accept: application/json\u0027 -H \u0027User-Agent: python-ceilometerclient\u0027 \u0027http://127.0.0.1:8777/v2/events?q.field\u003dx\u0026q.op\u003deq\u0026q.value\u003dy\u0027 \n\nreturns [], no 500 raised","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e9e4180d6c2881cda6b5e90b165348886005bc6d","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        if i.field in evt_model_filter:"},{"line_number":171,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":174,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":175,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":176,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_1d48d5cb","line":173,"in_reply_to":"ba7be1f8_19f8ec48","updated":"2015-02-27 03:33:12.000000000","message":"errr. what i mean is it can be:\n\n  trait_type \u003d i.type or \u0027string\u0027\n\nthe getattr part isn\u0027t useful.","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"0f2360f0e3c646863f6e7f8b4ea7a993937f9808","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        if i.field in evt_model_filter:"},{"line_number":171,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":174,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":175,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":176,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_e0cc388d","line":173,"in_reply_to":"ba7be1f8_1d48d5cb","updated":"2015-02-27 04:00:00.000000000","message":"Done","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"6b2ca7996846d43021d4c50c348a717a5e751107","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        if i.field in evt_model_filter:"},{"line_number":171,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":174,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":175,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":176,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_19f8ec48","line":173,"in_reply_to":"ba7be1f8_314884b2","updated":"2015-02-27 01:44:11.000000000","message":"no, if q.type is specified to None or \u0027\u0027, then i.type will not be a valid type, which cause 500 key error, this is exactly why this bug is reported: https://bugs.launchpad.net/ceilometer/+bug/1407374 \n\nsee current code in sql https://github.com/openstack/ceilometer/blob/master/ceilometer/event/storage/impl_sqlalchemy.py#L64","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"3775176cb51e5906f2871dcc2814c3ae26902df2","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        if i.field in evt_model_filter:"},{"line_number":171,"context_line":"            evt_model_filter[i.field] \u003d i.value"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            trait_type \u003d getattr(i, \u0027type\u0027) or \u0027string\u0027"},{"line_number":174,"context_line":"            traits_filter.append({\"key\": i.field,"},{"line_number":175,"context_line":"                                  trait_type: i._get_value_as_type(),"},{"line_number":176,"context_line":"                                  \"op\": i.op})"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_314884b2","line":173,"in_reply_to":"ba7be1f8_8fe68442","updated":"2015-02-26 14:23:29.000000000","message":"right so my point is you can use i.type... there is no need for getattr correct?","commit_id":"67ae0a77ad06dc6d76c636caa9b7470296b45fb0"}],"ceilometer/tests/api/v2/test_event_scenarios.py":[{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"d979c42dc23006ff0056fb4eb2aecee05e507c0a","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    def test_get_events_filter_trait_empty_type(self):"},{"line_number":187,"context_line":"        data \u003d self.get_json(self.PATH, headers\u003dheaders,"},{"line_number":188,"context_line":"                             q\u003d[{\u0027field\u0027: \u0027trait_A\u0027,"},{"line_number":189,"context_line":"                                 \u0027value\u0027: \u0027my_Foo_text\u0027,"},{"line_number":190,"context_line":"                                 \u0027type\u0027: \u0027\u0027}])"},{"line_number":191,"context_line":"        self.assertEqual(1, len(data))"},{"line_number":192,"context_line":"        self.assertEqual(\u0027Foo\u0027, data[0][\u0027event_type\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_b245f618","line":189,"updated":"2015-01-22 13:24:24.000000000","message":"is it ok to allow \u0027\u0027 type? I see from the code that it will be set to string but user wants \u0027\u0027... Maybe \u0027The data type is not supported\u0027 would be more appropriate, what do you think?","commit_id":"5d871fdcf73b1afbc98b9211aec22d7daf99e7d7"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"373b45fd593259d2c46f1e6ed92f4176a2d0a19e","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    def test_get_events_filter_trait_empty_type(self):"},{"line_number":187,"context_line":"        data \u003d self.get_json(self.PATH, headers\u003dheaders,"},{"line_number":188,"context_line":"                             q\u003d[{\u0027field\u0027: \u0027trait_A\u0027,"},{"line_number":189,"context_line":"                                 \u0027value\u0027: \u0027my_Foo_text\u0027,"},{"line_number":190,"context_line":"                                 \u0027type\u0027: \u0027\u0027}])"},{"line_number":191,"context_line":"        self.assertEqual(1, len(data))"},{"line_number":192,"context_line":"        self.assertEqual(\u0027Foo\u0027, data[0][\u0027event_type\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_b1b749f4","line":189,"in_reply_to":"1a930d6b_b245f618","updated":"2015-02-05 10:32:26.000000000","message":"the ceilometerclient use \u0027\u0027 if user doesn\u0027t specify query type,\n\nfor i.e.\n\nceilometer -d event-list -q x\u003dy\n\n/v2/events?q.field\u003dx\u0026q.op\u003deq\u0026q.type\u003d\u0026q.value\u003dy\n\nif we change this in api, then end user will be affected, they need to specify the type even it is default string\n\nI think we\u0027d better keep current situation as long as ceilometerclient is not fixed\n\nwhat\u0027s your opinion ?","commit_id":"5d871fdcf73b1afbc98b9211aec22d7daf99e7d7"}]}
