)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"84efa5d5c7fa0b7e6d862be62c3be11f39fa4397","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_9f8ca381","line":67,"updated":"2014-12-16 16:12:12.000000000","message":"now we have lib ceilometer.tests.constants it seems that MAX_INT should be moved there and lib in there turn should be set upper layer: ceilometer.constants for ex. WDYT?","commit_id":"1d6d404327cb5360e0e99b87f65151a9dcb98202"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"4df604ad8a12633d665bb9841a17cb32b36818a1","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_ee19db88","line":67,"in_reply_to":"3a961159_38a80977","updated":"2015-01-07 17:46:50.000000000","message":"@Igor Degtiarov\t\n\nI think it is ok to put it here, since this value is used only in this file. The tests/constants.py contains values used across files, to avoid duplicate, they are put in a specific file","commit_id":"1d6d404327cb5360e0e99b87f65151a9dcb98202"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"f3d0558af6c84daced12863e23a447c511b39f83","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_b8479976","line":67,"in_reply_to":"3a961159_38a80977","updated":"2014-12-17 11:02:32.000000000","message":"I found it!, sorry for my carelessness. I got it, did you plan to add constants like int maximum to the \"ceilometer.constants\" ? if so, feel free to abandon this :), is there any spec or patch for your proposal?","commit_id":"1d6d404327cb5360e0e99b87f65151a9dcb98202"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"d81fd9af518401c9a3b4650beba28eda9dab73dc","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_38a80977","line":67,"in_reply_to":"3a961159_5394dd43","updated":"2014-12-17 10:42:42.000000000","message":"lib ceilometer.tests.constans is in our master branch. You find it, don\u0027t you? ceilometer.constants is not exist now I\u0027ve proposed to move constants lib from dir tests to ceilometer root and use it for any constants that ceilometer proj will need.","commit_id":"1d6d404327cb5360e0e99b87f65151a9dcb98202"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"86b6fcc44eed2523b4a354992a89217c604f335e","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_5394dd43","line":67,"in_reply_to":"3a961159_9f8ca381","updated":"2014-12-17 06:22:27.000000000","message":"sorry, where is the lib \"ceilometer.tests.constants\" and \"ceilometer.constants\" you said ? did I have miss something?","commit_id":"1d6d404327cb5360e0e99b87f65151a9dcb98202"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"92110c82bf8c75c3fd2905176ff220dc4130660b","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_be240c61","line":67,"in_reply_to":"3a961159_b8479976","updated":"2014-12-27 09:45:28.000000000","message":"I think put it here is acceptable, or directly create (or mv) ceilometer/tests/constants.py to ceilometer/constants.py\n\nthe best would be in oslo, but that is too far away","commit_id":"1d6d404327cb5360e0e99b87f65151a9dcb98202"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e2305632c48e0ec49cde143285946ff96e576bc6","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_4081d3c1","line":67,"updated":"2015-01-07 22:39:21.000000000","message":"what do you think about:\n\n  import sys\n  MAX_INT \u003d getattr(sys, \u0027maxint\u0027, None)\n\nsince this seems to be a pre-py3 issue.","commit_id":"f5e3f7b5c8027481d92428adb966b51d3408480b"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"a39549ff451f59989a969115bf964867916860b7","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_ba09bfde","line":67,"in_reply_to":"3a961159_4081d3c1","updated":"2015-01-08 02:24:54.000000000","message":"According to the bug report, it is datetime.timedelta(seconds\u003dx) raises exception about OverflowError: Python int too large to convert to C long\n\nbut I test in python3.4, it is also cannot handle too large integer\n\n    $ python3.4\n    Python 3.4.0 (default, Apr 11 2014, 13:05:11) \n    [GCC 4.8.2] on linux\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    \u003e\u003e\u003e import datetime\n    \u003e\u003e\u003e datetime.timedelta(seconds\u003d1000000000000000000000000000000000000000000000000)\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    OverflowError: Python int too large to convert to C long\n    \u003e\u003e\u003e import sys\n    \u003e\u003e\u003e sys.maxsize\n    9223372036854775807\n    \u003e\u003e\u003e datetime.timedelta(seconds\u003dsys.maxsize)\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    OverflowError: normalized days too large to fit in a C int\n\nsys.maxsize exists in python2.7 too, but\n\n    $ python\n    Python 2.7.6 (default, Mar 22 2014, 22:59:56) \n    [GCC 4.8.2] on linux2\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    \u003e\u003e\u003e import sys\n    \u003e\u003e\u003e import datetime\n    \u003e\u003e\u003e sys.maxint\n    9223372036854775807\n    \u003e\u003e\u003e sys.maxsize\n    9223372036854775807\n    \u003e\u003e\u003e datetime.timedelta(seconds\u003dsys.maxint)\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    OverflowError: normalized days too large to fit in a C int\n    \u003e\u003e\u003e datetime.timedelta(seconds\u003dsys.maxsize)\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    OverflowError: normalized days too large to fit in a C int\n\nactually in a 64-bit ubuntu 14.04 system:\n\n    $ uname -a\n   Linux SIA1000008648 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux\n\npython2.7 cannot handle 64-bits width max int\n\n    \u003e\u003e\u003e datetime.timedelta(seconds\u003d2**64)\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    OverflowError: normalized days too large to fit in a C int\n\n**Is it maybe some issue in datetime module?**\n\nI think 32-bits width is enough for period, but maybe with a bit short\n\n    \u003e\u003e\u003e datetime.datetime.now() + datetime.timedelta(seconds\u003d2**31-1)\n    datetime.datetime(2083, 1, 26, 13, 30, 22, 762539)\n    \u003e\u003e\u003e datetime.datetime.now() - datetime.timedelta(seconds\u003d2**31-1)\n    datetime.datetime(1946, 12, 21, 7, 2, 18, 25872)\n\nOn a 32 bits system, (actually win32), datetime seems can handle 2**32 too:\n\n    $ python\n    Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    \u003e\u003e\u003e import datetime\n    \u003e\u003e\u003e datetime.timedelta(seconds\u003d2**32)\n    datetime.timedelta(49710, 23296)\n    \u003e\u003e\u003e datetime.datetime.now() + datetime.timedelta(seconds\u003d2**32)\n    datetime.datetime(2151, 2, 14, 16, 47, 21, 170000)\n    \u003e\u003e\u003e datetime.datetime.now() - datetime.timedelta(seconds\u003d2**32)\n    datetime.datetime(1878, 12, 2, 3, 50, 54, 223000)\n\nI don\u0027t think we should change 2**31-1 to 2**32-1, since 2083 is half a century away. But if you consist a longer support, I think it is ok to increase the max int too 2**32-1 (unsigned int max)\n\nThanks for your review :)","commit_id":"f5e3f7b5c8027481d92428adb966b51d3408480b"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"0fd0f9997bfebded9ad45517522bb2de30c164f6","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_2113df65","line":67,"in_reply_to":"3a961159_8d312cef","updated":"2015-01-08 09:56:44.000000000","message":"will be done","commit_id":"f5e3f7b5c8027481d92428adb966b51d3408480b"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d5c60e5e5529b1209d70922ac3dc618948f73fc8","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"MAX_INT \u003d 2**31-1"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"ALARM_API_OPTS \u003d ["},{"line_number":70,"context_line":"    cfg.BoolOpt(\u0027record_history\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_8d312cef","line":67,"in_reply_to":"3a961159_ba09bfde","updated":"2015-01-08 05:44:29.000000000","message":"Please look at https://docs.python.org/2/library/datetime.html and search for timedelta.max, so the actually valid max value here should be\n  timedalta.max.days * 3600 * 24 + timedalta.max.seconds","commit_id":"f5e3f7b5c8027481d92428adb966b51d3408480b"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"a043757f8ca201dc689643d3b232d10b71e33fe7","unresolved":false,"context_lines":[{"line_number":1613,"context_line":"    # overflow."},{"line_number":1614,"context_line":"    period \u003d wsme.wsattr("},{"line_number":1615,"context_line":"        wtypes.IntegerType(minimum\u003d1,"},{"line_number":1616,"context_line":"                           maximum\u003dconstants.MAX_TIMEDELTA_SECONDS/2),"},{"line_number":1617,"context_line":"        default\u003d60)"},{"line_number":1618,"context_line":"    \"The time range in seconds over which query\""},{"line_number":1619,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_2b522013","line":1616,"updated":"2015-01-15 02:18:53.000000000","message":"well, actually the look_back depends on various issues, see https://github.com/openstack/ceilometer/blob/master/ceilometer/alarm/evaluator/threshold.py#L59 \n\nAt least could we try to make maixum \u003d MAX/(ThresholdEvaluator.look_back +1)? so in case we change the ThresholdEvaluator.look_back in the future, we don\u0027t need to change it here","commit_id":"d411c191a490e99d79fe73eb919461654b145124"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"c5aa037acd049cf495ddd3dc5efa3b3317c0830a","unresolved":false,"context_lines":[{"line_number":1613,"context_line":"    # overflow."},{"line_number":1614,"context_line":"    period \u003d wsme.wsattr("},{"line_number":1615,"context_line":"        wtypes.IntegerType(minimum\u003d1,"},{"line_number":1616,"context_line":"                           maximum\u003dconstants.MAX_TIMEDELTA_SECONDS/2),"},{"line_number":1617,"context_line":"        default\u003d60)"},{"line_number":1618,"context_line":"    \"The time range in seconds over which query\""},{"line_number":1619,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_eb1818cf","line":1616,"in_reply_to":"3a961159_2b522013","updated":"2015-01-15 02:43:13.000000000","message":"but if we specify exclude_outliers to True, then we use evaluation_periods as look back, which minimal is 1, so if we change ThresholdEvaluator.look_back to some other value (I think only could be more?), then the minimum should be 2 still\n\ncould ThresholdEvaluator.look_back be zero or negative?\n\nwhat\u0027s your opinion?\n\nor we simply set it to constants.MAX_TIMEDELTA_SECONDS, it is simple, and no complex scenarios...","commit_id":"d411c191a490e99d79fe73eb919461654b145124"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"a043757f8ca201dc689643d3b232d10b71e33fe7","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"    # overflow."},{"line_number":1635,"context_line":"    evaluation_periods \u003d wsme.wsattr("},{"line_number":1636,"context_line":"        wtypes.IntegerType(minimum\u003d1,"},{"line_number":1637,"context_line":"                           maximum\u003dconstants.MAX_TIMEDELTA_SECONDS-1),"},{"line_number":1638,"context_line":"        default\u003d1)"},{"line_number":1639,"context_line":"    \"The number of historical periods to evaluate the threshold\""},{"line_number":1640,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_cbe27c2f","line":1637,"updated":"2015-01-15 02:18:53.000000000","message":"seems a little bit weird to me. evaluation_periods is the number of periods, it doesn\u0027t have the unit of seconds, so why need maximum here? The following validation code seems can check this.","commit_id":"d411c191a490e99d79fe73eb919461654b145124"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"c5aa037acd049cf495ddd3dc5efa3b3317c0830a","unresolved":false,"context_lines":[{"line_number":1634,"context_line":"    # overflow."},{"line_number":1635,"context_line":"    evaluation_periods \u003d wsme.wsattr("},{"line_number":1636,"context_line":"        wtypes.IntegerType(minimum\u003d1,"},{"line_number":1637,"context_line":"                           maximum\u003dconstants.MAX_TIMEDELTA_SECONDS-1),"},{"line_number":1638,"context_line":"        default\u003d1)"},{"line_number":1639,"context_line":"    \"The number of historical periods to evaluate the threshold\""},{"line_number":1640,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_8b8874c7","line":1637,"in_reply_to":"3a961159_cbe27c2f","updated":"2015-01-15 02:43:13.000000000","message":"because period can be set to minimum 1, then evaluation_periods will no more than constants.MAX_TIMEDELTA_SECONDS-1, so I limit it to this, but if it doesn;t need, I will remove it.\n\nso, what\u0027s the decision?","commit_id":"d411c191a490e99d79fe73eb919461654b145124"}],"ceilometer/tests/api/v2/test_alarm_scenarios.py":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"92110c82bf8c75c3fd2905176ff220dc4130660b","unresolved":false,"context_lines":[{"line_number":761,"context_line":"                \u0027meter_name\u0027: \u0027ameter\u0027,"},{"line_number":762,"context_line":"                \u0027comparison_operator\u0027: \u0027gt\u0027,"},{"line_number":763,"context_line":"                \u0027threshold\u0027: 2.0,"},{"line_number":764,"context_line":"                \u0027evaluation_periods\u0027: six.text_type(2**50),"},{"line_number":765,"context_line":"            }"},{"line_number":766,"context_line":"        }"},{"line_number":767,"context_line":"        resp \u003d self.post_json(\u0027/alarms\u0027, params\u003djson, expect_errors\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1e1b601d","line":764,"updated":"2014-12-27 09:45:28.000000000","message":"I don\u0027t think this field needs to be string, I think 2**50 is OK, it will be dumps to string in self.post_json","commit_id":"1d6d404327cb5360e0e99b87f65151a9dcb98202"}]}
