)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enable per policy proxy config options"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This is an alternative approach to that proposed in [1]"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Adds support for optional per-policy config sections"},{"line_number":12,"context_line":"to be added in proxy-server.conf. This is highly desirable"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"ff0f0b1f_8eeea41f","line":9,"updated":"2017-05-25 05:21:14.000000000","message":"probably not the most important part of the commit message once we deiced this was the way we wanted to go at the summit - would look better as an addendum down there with the thanks and credits.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}],"doc/source/deployment_guide.rst":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":1845,"context_line":"    sorting_method"},{"line_number":1846,"context_line":"    read_affinity"},{"line_number":1847,"context_line":"    write_affinity"},{"line_number":1848,"context_line":"    write_affinity_node_count"},{"line_number":1849,"context_line":""},{"line_number":1850,"context_line":"The section name must be of the form::"},{"line_number":1851,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff0f0b1f_de25f9c3","line":1848,"updated":"2017-05-19 23:27:41.000000000","message":"Maybe worth making these link back up? Maybe also make it a proper list, like\n\n #. sorting_method\n #. read_affinity\n #. write_affinity\n #. write_affinity_node_count\n\n? The code-block seems awkward.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ff3b4666b2fa3095997fd7722ea1a642eae7baf5","unresolved":false,"context_lines":[{"line_number":1845,"context_line":"    sorting_method"},{"line_number":1846,"context_line":"    read_affinity"},{"line_number":1847,"context_line":"    write_affinity"},{"line_number":1848,"context_line":"    write_affinity_node_count"},{"line_number":1849,"context_line":""},{"line_number":1850,"context_line":"The section name must be of the form::"},{"line_number":1851,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff0f0b1f_a953d716","line":1848,"in_reply_to":"ff0f0b1f_1cec4e8d","updated":"2017-05-23 17:28:41.000000000","message":"Yeah, I played around with that a bit, too, and couldn\u0027t figure it out. Won\u0027t worry about linking back if the tooling won\u0027t allow it.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":1845,"context_line":"    sorting_method"},{"line_number":1846,"context_line":"    read_affinity"},{"line_number":1847,"context_line":"    write_affinity"},{"line_number":1848,"context_line":"    write_affinity_node_count"},{"line_number":1849,"context_line":""},{"line_number":1850,"context_line":"The section name must be of the form::"},{"line_number":1851,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff0f0b1f_1cec4e8d","line":1848,"in_reply_to":"ff0f0b1f_de25f9c3","updated":"2017-05-23 14:36:31.000000000","message":"Made these a list but I couldn;t figure out how to make a link to a tabe row - follow up perhaps, if you know how?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":1855,"context_line":""},{"line_number":1856,"context_line":"    The section name should refer to the policy index, not the policy name."},{"line_number":1857,"context_line":""},{"line_number":1858,"context_line":"The value of any option specified a per-policy section will override any value"},{"line_number":1859,"context_line":"given in the proxy-server section for that policy only. Otherwise the value of"},{"line_number":1860,"context_line":"these options will be that specified in the proxy-server section."},{"line_number":1861,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff0f0b1f_8146004f","line":1858,"range":{"start_line":1858,"start_character":13,"end_line":1858,"end_character":16},"updated":"2017-05-19 23:27:41.000000000","message":"Maybe just \"an\"? I feel like \"any\" may make this seem like it includes more options than the ones already listed.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":1855,"context_line":""},{"line_number":1856,"context_line":"    The section name should refer to the policy index, not the policy name."},{"line_number":1857,"context_line":""},{"line_number":1858,"context_line":"The value of any option specified a per-policy section will override any value"},{"line_number":1859,"context_line":"given in the proxy-server section for that policy only. Otherwise the value of"},{"line_number":1860,"context_line":"these options will be that specified in the proxy-server section."},{"line_number":1861,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff0f0b1f_dc01363a","line":1858,"range":{"start_line":1858,"start_character":13,"end_line":1858,"end_character":16},"in_reply_to":"ff0f0b1f_8146004f","updated":"2017-05-23 14:36:31.000000000","message":"Done","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":1859,"context_line":"given in the proxy-server section for that policy only. Otherwise the value of"},{"line_number":1860,"context_line":"these options will be that specified in the proxy-server section."},{"line_number":1861,"context_line":""},{"line_number":1862,"context_line":"For example, the following section provides policy specific options for a"},{"line_number":1863,"context_line":"policy with index 3::"},{"line_number":1864,"context_line":""},{"line_number":1865,"context_line":"    [proxy-server:policy:3]"}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff0f0b1f_217174aa","line":1862,"range":{"start_line":1862,"start_character":44,"end_line":1862,"end_character":59},"updated":"2017-05-19 23:27:41.000000000","message":"nit: policy-specific","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":1859,"context_line":"given in the proxy-server section for that policy only. Otherwise the value of"},{"line_number":1860,"context_line":"these options will be that specified in the proxy-server section."},{"line_number":1861,"context_line":""},{"line_number":1862,"context_line":"For example, the following section provides policy specific options for a"},{"line_number":1863,"context_line":"policy with index 3::"},{"line_number":1864,"context_line":""},{"line_number":1865,"context_line":"    [proxy-server:policy:3]"}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff0f0b1f_1cba0e6d","line":1862,"range":{"start_line":1862,"start_character":44,"end_line":1862,"end_character":59},"in_reply_to":"ff0f0b1f_217174aa","updated":"2017-05-23 14:36:31.000000000","message":"Done","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":1869,"context_line":"    write_affinity_node_count \u003d 1 * replicas"},{"line_number":1870,"context_line":""},{"line_number":1871,"context_line":""},{"line_number":1872,"context_line":"Tempauth"},{"line_number":1873,"context_line":"^^^^^^^^"},{"line_number":1874,"context_line":""},{"line_number":1875,"context_line":"[tempauth]"}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff0f0b1f_81184075","line":1872,"updated":"2017-05-19 23:27:41.000000000","message":"This whole section seems weird, especially for a (presumably production) deployment guide. Maybe we should remove all of tempauth from this doc in a follow-up?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":1869,"context_line":"    write_affinity_node_count \u003d 1 * replicas"},{"line_number":1870,"context_line":""},{"line_number":1871,"context_line":""},{"line_number":1872,"context_line":"Tempauth"},{"line_number":1873,"context_line":"^^^^^^^^"},{"line_number":1874,"context_line":""},{"line_number":1875,"context_line":"[tempauth]"}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff0f0b1f_5cc406f5","line":1872,"in_reply_to":"ff0f0b1f_81184075","updated":"2017-05-23 14:36:31.000000000","message":"Agree it seemed misplaced, follow up.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"                                               of replicas for the ring being used"},{"line_number":1834,"context_line":"                                               for the request. This option may be"},{"line_number":1835,"context_line":"                                               overridden in a per-policy"},{"line_number":1836,"context_line":"                                               configuration section."},{"line_number":1837,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"Per policy configuration"}],"source_content_type":"text/x-rst","patch_set":12,"id":"ff0f0b1f_3f4104aa","line":1836,"updated":"2017-05-25 05:21:14.000000000","message":"I do not understand this option.  Like not the words.  I read it.  The words... make sense I guess.  But I tried do use the option and it does not do things that I expect.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":1837,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"Per policy configuration"},{"line_number":1840,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":1841,"context_line":""},{"line_number":1842,"context_line":"Some proxy-server configuration options may be overridden on a per-policy"},{"line_number":1843,"context_line":"basis by including per-policy config section(s). These options are:"}],"source_content_type":"text/x-rst","patch_set":12,"id":"ff0f0b1f_ee9c006b","line":1840,"updated":"2017-05-25 05:21:14.000000000","message":"be nice to have an anchor and link from the storage policy docs [1]\n\nat somepoint we may have sufficiently deviant per-policy configuration you can differentiate policies purely based *tuning*!?\n\nwhat does two policies with the same devices look like when one is geo-durable on 200 and the other is async replication!?\n\nNot sure if your replication can keep up with write_affinity - deploy a test policy with a copy of the same ring?\n\n1. https://docs.openstack.org/developer/swift/overview_policies.html","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0f0d82f7919faec3b0ac6af1634f7e7ad9f18ff6","unresolved":false,"context_lines":[{"line_number":1837,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"Per policy configuration"},{"line_number":1840,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":1841,"context_line":""},{"line_number":1842,"context_line":"Some proxy-server configuration options may be overridden on a per-policy"},{"line_number":1843,"context_line":"basis by including per-policy config section(s). These options are:"}],"source_content_type":"text/x-rst","patch_set":12,"id":"ff0f0b1f_56f13a00","line":1840,"in_reply_to":"ff0f0b1f_ee9c006b","updated":"2017-05-25 10:51:52.000000000","message":"nice idea (docs link)\n\nDone https://review.openstack.org/467994 Add link from policies overview to per-policy proxy-server conf        \nremote:","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}],"etc/proxy-server.conf-sample":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":175,"context_line":"# spread load."},{"line_number":176,"context_line":"# The valid values for sorting_method are \"affinity\", \"shuffle\", or \"timing\"."},{"line_number":177,"context_line":"# This option may be overridden in a per-policy configuration section."},{"line_number":178,"context_line":"# sorting_method \u003d shuffle"},{"line_number":179,"context_line":"#"},{"line_number":180,"context_line":"# If the \"timing\" sorting_method is used, the timings will only be valid for"},{"line_number":181,"context_line":"# the number of seconds configured by timing_expiry."}],"source_content_type":"application/octet-stream","patch_set":11,"id":"ff0f0b1f_f20c3aed","line":178,"updated":"2017-05-23 00:51:04.000000000","message":"This only affects GETs, yeah? We may want to call that out somewhere...","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":175,"context_line":"# spread load."},{"line_number":176,"context_line":"# The valid values for sorting_method are \"affinity\", \"shuffle\", or \"timing\"."},{"line_number":177,"context_line":"# This option may be overridden in a per-policy configuration section."},{"line_number":178,"context_line":"# sorting_method \u003d shuffle"},{"line_number":179,"context_line":"#"},{"line_number":180,"context_line":"# If the \"timing\" sorting_method is used, the timings will only be valid for"},{"line_number":181,"context_line":"# the number of seconds configured by timing_expiry."}],"source_content_type":"application/octet-stream","patch_set":11,"id":"ff0f0b1f_373a88cb","line":178,"in_reply_to":"ff0f0b1f_c9c2a134","updated":"2017-05-23 19:26:30.000000000","message":"stricty, sorting_method is used during PUTs, but is has no behavioral effect - durng a write_affinity PUT, the write_affinity nodes are moved to head of the iterator. The first primary nodes are then sorted, but since the PUT uses all primaries, the sorting makes no difference.\n\nI\u0027m not against making that more explicit but can it be a follow-up?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a9fbb5fcb73240f3ba12801f1d4db61470fced61","unresolved":false,"context_lines":[{"line_number":175,"context_line":"# spread load."},{"line_number":176,"context_line":"# The valid values for sorting_method are \"affinity\", \"shuffle\", or \"timing\"."},{"line_number":177,"context_line":"# This option may be overridden in a per-policy configuration section."},{"line_number":178,"context_line":"# sorting_method \u003d shuffle"},{"line_number":179,"context_line":"#"},{"line_number":180,"context_line":"# If the \"timing\" sorting_method is used, the timings will only be valid for"},{"line_number":181,"context_line":"# the number of seconds configured by timing_expiry."}],"source_content_type":"application/octet-stream","patch_set":11,"id":"ff0f0b1f_c9c2a134","line":178,"in_reply_to":"ff0f0b1f_f20c3aed","updated":"2017-05-23 10:57:29.000000000","message":"sorting_method is only for GETs. That is because swift requires whole primaries (or enough handoffs when primaries fails down) for PUTs so \"shuffle\" and \"timing\" is meaningless. Only write_affinity can be set to prior a region to write for PUTs.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":263,"context_line":"# sorting_method \u003d"},{"line_number":264,"context_line":"# read_affinity \u003d"},{"line_number":265,"context_line":"# write_affinity \u003d"},{"line_number":266,"context_line":"# write_affinity_node_count \u003d"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"[filter:tempauth]"},{"line_number":269,"context_line":"use \u003d egg:swift#tempauth"}],"source_content_type":"application/octet-stream","patch_set":12,"id":"ff0f0b1f_ba3082a0","line":266,"updated":"2017-05-25 05:21:14.000000000","message":"wfm","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}],"swift/common/utils.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a9fbb5fcb73240f3ba12801f1d4db61470fced61","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"        c \u003d ConfigParser(defaults)"},{"line_number":2445,"context_line":"    if hasattr(conf_path, \u0027readline\u0027):"},{"line_number":2446,"context_line":"        if hasattr(conf_path, \u0027seek\u0027):"},{"line_number":2447,"context_line":"            conf_path.seek(0)"},{"line_number":2448,"context_line":"        c.readfp(conf_path)"},{"line_number":2449,"context_line":"    else:"},{"line_number":2450,"context_line":"        if os.path.isdir(conf_path):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_8915c99e","line":2447,"updated":"2017-05-23 10:57:29.000000000","message":"I\u0027m wondering why we cannot call conf_path.seek here anyway. if conf_path has readline attr, it should be file object (or file-like) which should support \"seek\", right?\n\nOtherwise, c.readfp could cause a problem when the read is start from intermediate of the file?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"        c \u003d ConfigParser(defaults)"},{"line_number":2445,"context_line":"    if hasattr(conf_path, \u0027readline\u0027):"},{"line_number":2446,"context_line":"        if hasattr(conf_path, \u0027seek\u0027):"},{"line_number":2447,"context_line":"            conf_path.seek(0)"},{"line_number":2448,"context_line":"        c.readfp(conf_path)"},{"line_number":2449,"context_line":"    else:"},{"line_number":2450,"context_line":"        if os.path.isdir(conf_path):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_178f8475","line":2447,"in_reply_to":"ff0f0b1f_8915c99e","updated":"2017-05-23 19:26:30.000000000","message":"I\u0027m being defensive - this function is public, someone may be using it to parse a custom object that implements a custom readline but not seek.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":2472,"context_line":"        for s in c.sections():"},{"line_number":2473,"context_line":"            conf.update({s: dict(c.items(s))})"},{"line_number":2474,"context_line":"        if \u0027log_name\u0027 not in conf:"},{"line_number":2475,"context_line":"            conf[\u0027log_name\u0027] \u003d log_name"},{"line_number":2476,"context_line":"    conf[\u0027__file__\u0027] \u003d conf_path"},{"line_number":2477,"context_line":"    return conf"},{"line_number":2478,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_d285b6d0","line":2475,"updated":"2017-05-23 00:51:04.000000000","message":"Offtopic: this doesn\u0027t look right... surely the if block was supposed to be in the for loop?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"        c \u003d ConfigParser(defaults)"},{"line_number":2445,"context_line":"    if hasattr(conf_path, \u0027readline\u0027):"},{"line_number":2446,"context_line":"        if hasattr(conf_path, \u0027seek\u0027):"},{"line_number":2447,"context_line":"            conf_path.seek(0)"},{"line_number":2448,"context_line":"        c.readfp(conf_path)"},{"line_number":2449,"context_line":"    else:"},{"line_number":2450,"context_line":"        if os.path.isdir(conf_path):"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_9ad81e53","line":2447,"updated":"2017-05-25 05:21:14.000000000","message":"hmrm.. nothing in test_utils blows up when I revert his.\n\n\u003e I\u0027m being defensive - this function is public, someone may be using it to parse a custom object that implements a custom readline but not seek.\n\n-Al (earlier)\n\n/shrug","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}],"swift/common/wsgi.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        context \u003d super(NamedConfigLoader, self).get_context("},{"line_number":66,"context_line":"            object_type, name\u003dname, global_conf\u003dglobal_conf)"},{"line_number":67,"context_line":"        context.name \u003d name"},{"line_number":68,"context_line":"        context.local_conf[\u0027__name__\u0027] \u003d name"},{"line_number":69,"context_line":"        return context"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_0113100f","line":68,"updated":"2017-05-19 23:27:41.000000000","message":"\"name\" here is the... section name?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        context \u003d super(NamedConfigLoader, self).get_context("},{"line_number":66,"context_line":"            object_type, name\u003dname, global_conf\u003dglobal_conf)"},{"line_number":67,"context_line":"        context.name \u003d name"},{"line_number":68,"context_line":"        context.local_conf[\u0027__name__\u0027] \u003d name"},{"line_number":69,"context_line":"        return context"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_924965b8","line":68,"in_reply_to":"ff0f0b1f_0113100f","updated":"2017-05-23 14:36:31.000000000","message":"yes","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: StringIO(dedent(config_string)),"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_8169608c","line":118,"updated":"2017-05-19 23:27:41.000000000","message":"So __file__ is now sometimes\n\n- a string with the path to a directory (L85 above),\n- a string with the path to a file (over in utils), or\n- a readable?\n\nI agree that \"string\" maybe isn\u0027t the best value, but it seems better than adding a whole new type?\n\nBut I guess we need it to re-read the config -- which we\u0027ll totally need to do for things like the inlined container-sync configs and such. :-/ Maybe better to add another __source__ key or something?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: StringIO(dedent(config_string)),"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_cc119d06","line":118,"updated":"2017-05-23 00:51:04.000000000","message":"Thinking about this some more, maybe it\u0027s not so strange; we\u0027ve got precedent over in utils.py...\n\nDoes it need to be a new StringIO, or can we re-use self.contents?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: StringIO(dedent(config_string)),"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_57961c4e","line":118,"in_reply_to":"ff0f0b1f_0c78a7c1","updated":"2017-05-23 19:26:30.000000000","message":"This custom ConfigLoader is used to load the default InternalClinet conf for container sync. The source of the conf is a string in the source code, so there is no file source.\n\nBefore, nothing ever used __file__ so having an arbitrary value \"string\" was ok. Now we want to parse the conf source again from the __file__ attr, so need some way to retain a ref to the conf source.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: StringIO(dedent(config_string)),"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_776fe0fb","line":118,"in_reply_to":"ff0f0b1f_cc119d06","updated":"2017-05-23 19:26:30.000000000","message":"I don\u0027t *like* this any more than I like having an inlined conf special case for internal client :/ In the end I figured that since readconf is happy to consume a readable then this was vaguely consistent.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a9fbb5fcb73240f3ba12801f1d4db61470fced61","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: StringIO(dedent(config_string)),"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_0c78a7c1","line":118,"in_reply_to":"ff0f0b1f_cc119d06","updated":"2017-05-23 10:57:29.000000000","message":"I\u0027m not entirely sure but it seems __file__ attribute is string type which shows the file name so wondering why we need file-like object here.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"41f162971cd24ecdbaaf26f33acd24600d3c1cb9","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        context \u003d super(NamedConfigLoader, self).get_context("},{"line_number":66,"context_line":"            object_type, name\u003dname, global_conf\u003dglobal_conf)"},{"line_number":67,"context_line":"        context.name \u003d name"},{"line_number":68,"context_line":"        context.local_conf[\u0027__name__\u0027] \u003d name"},{"line_number":69,"context_line":"        return context"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_89435742","line":68,"updated":"2017-05-24 12:39:29.000000000","message":"Ah, ok. it is needed to find the application section. (and used as the prefix for per policy config.)","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abcb3b720bb1b8fd33daa069e8b66bba09d27452","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: StringIO(dedent(config_string)),"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_45ec178e","line":118,"updated":"2017-05-23 23:59:57.000000000","message":"Still seems to work with self.contents... though it probably doesn\u0027t really matter either way?","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0b12cd4da5f5193585271169056a410826c682ae","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: StringIO(dedent(config_string)),"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_adb74e3a","line":118,"in_reply_to":"ff0f0b1f_45ec178e","updated":"2017-05-24 08:09:06.000000000","message":"at some point I got worried about the StrinIO being consumed during parsing interpolation, but now I have the seek over in readconf I think it would be ok to share the same referene. At same time, no harm done using two.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.filename \u003d \"string\""},{"line_number":116,"context_line":"        defaults \u003d {"},{"line_number":117,"context_line":"            \u0027here\u0027: \"string\","},{"line_number":118,"context_line":"            \u0027__file__\u0027: StringIO(dedent(config_string)),"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        self.parser \u003d loadwsgi.NicerConfigParser(\"string\", defaults\u003ddefaults)"},{"line_number":121,"context_line":"        self.parser.optionxform \u003d str  # Don\u0027t lower-case keys"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_da97b644","line":118,"in_reply_to":"ff0f0b1f_adb74e3a","updated":"2017-05-25 05:21:14.000000000","message":"idk, be nice if something blew up in test_wsgi to help make sense of this change","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"    :param partition: ring partition to yield nodes for"},{"line_number":1307,"context_line":"    :param node_iter: optional iterable of nodes to try. Useful if you"},{"line_number":1308,"context_line":"        want to filter or reorder the nodes."},{"line_number":1309,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`"},{"line_number":1310,"context_line":"    \"\"\""},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"    def __init__(self, app, ring, partition, node_iter\u003dNone, policy\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_61de4c12","line":1309,"updated":"2017-05-19 23:27:41.000000000","message":"Should we call out that this will always be None for account/container rings?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"    :param partition: ring partition to yield nodes for"},{"line_number":1307,"context_line":"    :param node_iter: optional iterable of nodes to try. Useful if you"},{"line_number":1308,"context_line":"        want to filter or reorder the nodes."},{"line_number":1309,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`"},{"line_number":1310,"context_line":"    \"\"\""},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"    def __init__(self, app, ring, partition, node_iter\u003dNone, policy\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_b28fc9cb","line":1309,"in_reply_to":"ff0f0b1f_61de4c12","updated":"2017-05-23 14:36:31.000000000","message":"Done","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`"},{"line_number":1310,"context_line":"    \"\"\""},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"    def __init__(self, app, ring, partition, node_iter\u003dNone, policy\u003dNone):"},{"line_number":1313,"context_line":"        self.app \u003d app"},{"line_number":1314,"context_line":"        self.ring \u003d ring"},{"line_number":1315,"context_line":"        self.partition \u003d partition"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_61d40c21","line":1312,"range":{"start_line":1312,"start_character":28,"end_line":1312,"end_character":32},"updated":"2017-05-19 23:27:41.000000000","message":"This feels redundant, and I don\u0027t really like that you could (somehow) end up creating a NodeIter with a ring that doesn\u0027t match the policy provided -- what about passing policy_or_ring, then doing something like\n\n if hasattr(policy_or_ring, \u0027object_ring\u0027):\n     policy \u003d None\n     ring \u003d policy_or_ring\n else:\n     policy \u003d policy_or_ring\n     ring \u003d policy_or_ring.object_ring\n\n?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`"},{"line_number":1310,"context_line":"    \"\"\""},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"    def __init__(self, app, ring, partition, node_iter\u003dNone, policy\u003dNone):"},{"line_number":1313,"context_line":"        self.app \u003d app"},{"line_number":1314,"context_line":"        self.ring \u003d ring"},{"line_number":1315,"context_line":"        self.partition \u003d partition"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_72649122","line":1312,"range":{"start_line":1312,"start_character":28,"end_line":1312,"end_character":32},"in_reply_to":"ff0f0b1f_3eeba313","updated":"2017-05-23 14:36:31.000000000","message":"I\u0027d like to eliminate passing policy around the obj controller altogether and just make it an instance variable. I think this is possible now that the obj controller is only used for one request (before, when COPY was implemented in the controller, the policy might change for a COPY request).\n\nCan we leave this for a follow up?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"975a26cfcff3b5ffe0236565a6b5b78038aadcac","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`"},{"line_number":1310,"context_line":"    \"\"\""},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"    def __init__(self, app, ring, partition, node_iter\u003dNone, policy\u003dNone):"},{"line_number":1313,"context_line":"        self.app \u003d app"},{"line_number":1314,"context_line":"        self.ring \u003d ring"},{"line_number":1315,"context_line":"        self.partition \u003d partition"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_3eeba313","line":1312,"range":{"start_line":1312,"start_character":28,"end_line":1312,"end_character":32},"in_reply_to":"ff0f0b1f_61d40c21","updated":"2017-05-23 00:43:07.000000000","message":"...and of course, I have that backwards...","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ff3b4666b2fa3095997fd7722ea1a642eae7baf5","unresolved":false,"context_lines":[{"line_number":1309,"context_line":"    :param policy: an instance of :class:`BaseStoragePolicy`"},{"line_number":1310,"context_line":"    \"\"\""},{"line_number":1311,"context_line":""},{"line_number":1312,"context_line":"    def __init__(self, app, ring, partition, node_iter\u003dNone, policy\u003dNone):"},{"line_number":1313,"context_line":"        self.app \u003d app"},{"line_number":1314,"context_line":"        self.ring \u003d ring"},{"line_number":1315,"context_line":"        self.partition \u003d partition"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_2e758dcb","line":1312,"range":{"start_line":1312,"start_character":28,"end_line":1312,"end_character":32},"in_reply_to":"ff0f0b1f_72649122","updated":"2017-05-23 17:28:41.000000000","message":"Hmm... interesting idea. Could probably work for BaseObjectController, but might still be worth doing here (since it\u0027s a standalone NodeIter).","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":1615,"context_line":"        :returns: a swob.Response object"},{"line_number":1616,"context_line":"        \"\"\""},{"line_number":1617,"context_line":"        start_nodes \u003d ring.get_part_nodes(part)"},{"line_number":1618,"context_line":"        nodes \u003d GreenthreadSafeIterator(self.app.iter_nodes(ring, part))"},{"line_number":1619,"context_line":"        pile \u003d GreenAsyncPile(len(start_nodes))"},{"line_number":1620,"context_line":"        for head in headers:"},{"line_number":1621,"context_line":"            pile.spawn(self._make_request, nodes, part, method, path,"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_61997a77","line":1618,"updated":"2017-05-23 00:51:04.000000000","message":"Hmm... so we\u0027ve only got a ring here?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":1310,"context_line":"        None for an account or container ring."},{"line_number":1311,"context_line":"    \"\"\""},{"line_number":1312,"context_line":""},{"line_number":1313,"context_line":"    def __init__(self, app, ring, partition, node_iter\u003dNone, policy\u003dNone):"},{"line_number":1314,"context_line":"        self.app \u003d app"},{"line_number":1315,"context_line":"        self.ring \u003d ring"},{"line_number":1316,"context_line":"        self.partition \u003d partition"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_9f65b0b7","line":1313,"updated":"2017-05-25 05:21:14.000000000","message":"heh, NodeIter takes an optional node_iter","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"        # nodes) from node_iter, so the rest of its values are handoffs."},{"line_number":1328,"context_line":"        self.primary_nodes \u003d self.app.sort_nodes("},{"line_number":1329,"context_line":"            list(itertools.islice(node_iter, num_primary_nodes)),"},{"line_number":1330,"context_line":"            policy\u003dpolicy)"},{"line_number":1331,"context_line":"        self.handoff_iter \u003d node_iter"},{"line_number":1332,"context_line":"        self._node_provider \u003d None"},{"line_number":1333,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_5f103800","line":1330,"updated":"2017-05-25 05:21:14.000000000","message":"wait - so node_iter here might be a local_first_node_iter on PUT with write_affinity enabled... then we sort that list again in sort_nodes using... read_affinity?  :D\n\nI guess it works unless you have read/write affinity set to different zones like some sort of smuck ;)\n\n             iter_nodes_local_first.num_locals 12\n              iter_nodes_local_first.all_nodes [1, 0, 3, 2, 5, 4, 7, 6]\n    iter_nodes_local_first.first_n_local_nodes [3, 2, 7, 6]\n                       NodeIter.starting_nodes [3, 2, 7, 6, 1, 0]\n                                 1:sort_nodes: [3, 2, 7, 6, 1, 0]\n                                 2:sort_nodes: [1, 7, 3, 6, 0, 2]\n                        NodeIter.primary_nodes [1, 7, 3, 6, 0, 2]","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0f0d82f7919faec3b0ac6af1634f7e7ad9f18ff6","unresolved":false,"context_lines":[{"line_number":1327,"context_line":"        # nodes) from node_iter, so the rest of its values are handoffs."},{"line_number":1328,"context_line":"        self.primary_nodes \u003d self.app.sort_nodes("},{"line_number":1329,"context_line":"            list(itertools.islice(node_iter, num_primary_nodes)),"},{"line_number":1330,"context_line":"            policy\u003dpolicy)"},{"line_number":1331,"context_line":"        self.handoff_iter \u003d node_iter"},{"line_number":1332,"context_line":"        self._node_provider \u003d None"},{"line_number":1333,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_d6c78a63","line":1330,"in_reply_to":"ff0f0b1f_5f103800","updated":"2017-05-25 10:51:52.000000000","message":"it is a little bizzarre that read_affinity applies to writes, but I convinced myself it made no difference - write-affinity gets preferred nodes to the head of the iterator, sort_nodes only sorts the primary nodes, all of which are used on PUT, so you still have your preferred write_affinity nodes in the primaries, even if not at head of the iter.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abcb3b720bb1b8fd33daa069e8b66bba09d27452","unresolved":false,"context_lines":[{"line_number":1616,"context_line":"        :returns: a swob.Response object"},{"line_number":1617,"context_line":"        \"\"\""},{"line_number":1618,"context_line":"        start_nodes \u003d ring.get_part_nodes(part)"},{"line_number":1619,"context_line":"        nodes \u003d GreenthreadSafeIterator(self.app.iter_nodes(ring, part))"},{"line_number":1620,"context_line":"        pile \u003d GreenAsyncPile(len(start_nodes))"},{"line_number":1621,"context_line":"        for head in headers:"},{"line_number":1622,"context_line":"            pile.spawn(self._make_request, nodes, part, method, path,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_257803c2","line":1619,"updated":"2017-05-23 23:59:57.000000000","message":"It still bugs me that we can\u0027t get policy plumbed through here :-/\n\nBut I guess it\u0027s only really being used for object POST/DELETE requests?","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":1616,"context_line":"        :returns: a swob.Response object"},{"line_number":1617,"context_line":"        \"\"\""},{"line_number":1618,"context_line":"        start_nodes \u003d ring.get_part_nodes(part)"},{"line_number":1619,"context_line":"        nodes \u003d GreenthreadSafeIterator(self.app.iter_nodes(ring, part))"},{"line_number":1620,"context_line":"        pile \u003d GreenAsyncPile(len(start_nodes))"},{"line_number":1621,"context_line":"        for head in headers:"},{"line_number":1622,"context_line":"            pile.spawn(self._make_request, nodes, part, method, path,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_1f48802a","line":1619,"in_reply_to":"ff0f0b1f_257803c2","updated":"2017-05-25 05:21:14.000000000","message":"yes, and also affinity rules don\u0027t have any significant impact since this request is concurrent to all n \u003d\u003d #primary nodes.\n\nsomething piece of mind rings wrong here - but it\u0027s not per-policy configuration\u0027s plumbing - it\u0027s just pre existing affinity and node_iter plumbing","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}],"swift/proxy/controllers/obj.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self.container_name \u003d unquote(container_name)"},{"line_number":130,"context_line":"        self.object_name \u003d unquote(object_name)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def iter_nodes_local_first(self, ring, partition, policy\u003dNone):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        Yields nodes for a ring partition."},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_417d88e5","line":132,"range":{"start_line":132,"start_character":37,"end_line":132,"end_character":41},"updated":"2017-05-19 23:27:41.000000000","message":"Similar thought here...\n\nDo we ever actually call this with a policy?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self.container_name \u003d unquote(container_name)"},{"line_number":130,"context_line":"        self.object_name \u003d unquote(object_name)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def iter_nodes_local_first(self, ring, partition, policy\u003dNone):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        Yields nodes for a ring partition."},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_d2747dd1","line":132,"range":{"start_line":132,"start_character":37,"end_line":132,"end_character":41},"in_reply_to":"ff0f0b1f_417d88e5","updated":"2017-05-23 14:36:31.000000000","message":"Done","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a9fbb5fcb73240f3ba12801f1d4db61470fced61","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        policy_conf \u003d self.app.get_conf(policy)"},{"line_number":147,"context_line":"        is_local \u003d policy_conf.write_affinity_is_local_fn"},{"line_number":148,"context_line":"        if is_local is None:"},{"line_number":149,"context_line":"            return self.app.iter_nodes(ring, partition, policy\u003dpolicy)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"},{"line_number":152,"context_line":"        num_locals \u003d policy_conf.write_affinity_node_count(len(primary_nodes))"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_1afb3979","line":149,"range":{"start_line":149,"start_character":55,"end_line":149,"end_character":69},"updated":"2017-05-23 10:57:29.000000000","message":"I\u0027m feeling we don\u0027t have to set policy for iter_nodes because proxy doesn\u0027t have to sorting on *PUT* request.\n\nHowever, the current master also looks odd that also sorts the order according to sorting method for GET.\n\nAFAIK, the sort order will affect only primaries and PUT should got all primaries anyway. Hmm...","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        policy_conf \u003d self.app.get_conf(policy)"},{"line_number":147,"context_line":"        is_local \u003d policy_conf.write_affinity_is_local_fn"},{"line_number":148,"context_line":"        if is_local is None:"},{"line_number":149,"context_line":"            return self.app.iter_nodes(ring, partition, policy\u003dpolicy)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"},{"line_number":152,"context_line":"        num_locals \u003d policy_conf.write_affinity_node_count(len(primary_nodes))"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_3723a8bf","line":149,"range":{"start_line":149,"start_character":55,"end_line":149,"end_character":69},"in_reply_to":"ff0f0b1f_1afb3979","updated":"2017-05-23 19:26:30.000000000","message":"agree but I think that it is best to pass the policy to any method that may want the policy, rather then decide here that iter_nodes does not need the policy.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    @public"},{"line_number":211,"context_line":"    @cors_validation"},{"line_number":212,"context_line":"    @delay_denial"},{"line_number":213,"context_line":"    def POST(self, req):"},{"line_number":214,"context_line":"        \"\"\"HTTP POST request handler.\"\"\""},{"line_number":215,"context_line":"        container_info \u003d self.container_info("},{"line_number":216,"context_line":"            self.account_name, self.container_name, req)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_61ba9a0a","line":213,"updated":"2017-05-23 00:51:04.000000000","message":"I was expecting this to need changes, too... Is POST not write_affinity-aware?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    @public"},{"line_number":211,"context_line":"    @cors_validation"},{"line_number":212,"context_line":"    @delay_denial"},{"line_number":213,"context_line":"    def POST(self, req):"},{"line_number":214,"context_line":"        \"\"\"HTTP POST request handler.\"\"\""},{"line_number":215,"context_line":"        container_info \u003d self.container_info("},{"line_number":216,"context_line":"            self.account_name, self.container_name, req)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_7a5ea776","line":213,"in_reply_to":"ff0f0b1f_61ba9a0a","updated":"2017-05-23 19:26:30.000000000","message":"it seems not. I guess that in the old post_as_copy\u003dTrue world a POST was write_affinity aware by virtue of becoming a PUT. Also, maybe it only really makes sense to direct  POST to a backend where we expect there to be a PUT (i.e. not choose a handoff for write affinity).","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"43830f000ec0d5ee9e2812c19de56864e6af8b53","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    @public"},{"line_number":211,"context_line":"    @cors_validation"},{"line_number":212,"context_line":"    @delay_denial"},{"line_number":213,"context_line":"    def POST(self, req):"},{"line_number":214,"context_line":"        \"\"\"HTTP POST request handler.\"\"\""},{"line_number":215,"context_line":"        container_info \u003d self.container_info("},{"line_number":216,"context_line":"            self.account_name, self.container_name, req)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_cf4e0837","line":213,"in_reply_to":"ff0f0b1f_7a5ea776","updated":"2017-05-23 22:11:22.000000000","message":"Added a comment on https://bugs.launchpad.net/swift/+bug/1503161 -- I think a fix there could pretty easily cover both? We\u0027re talking 0-byte bodies for both POST and DELETE, so I think we can afford to be a bit scatter-shot about it...","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":691,"context_line":"    @public"},{"line_number":692,"context_line":"    @cors_validation"},{"line_number":693,"context_line":"    @delay_denial"},{"line_number":694,"context_line":"    def DELETE(self, req):"},{"line_number":695,"context_line":"        \"\"\"HTTP DELETE request handler.\"\"\""},{"line_number":696,"context_line":"        container_info \u003d self.container_info("},{"line_number":697,"context_line":"            self.account_name, self.container_name, req)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_2135c28f","line":694,"updated":"2017-05-23 00:51:04.000000000","message":"...but I guess this one *won\u0027t* need changes, on account of bug 1503161.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"41f162971cd24ecdbaaf26f33acd24600d3c1cb9","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        :param ring: ring to get nodes from"},{"line_number":144,"context_line":"        :param partition: ring partition to yield nodes for"},{"line_number":145,"context_line":"        \"\"\""},{"line_number":146,"context_line":"        policy_conf \u003d self.app.get_policy_options(policy)"},{"line_number":147,"context_line":"        is_local \u003d policy_conf.write_affinity_is_local_fn"},{"line_number":148,"context_line":"        if is_local is None:"},{"line_number":149,"context_line":"            return self.app.iter_nodes(ring, partition, policy\u003dpolicy)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_b2f7ad8b","line":146,"range":{"start_line":146,"start_character":15,"end_line":146,"end_character":19},"updated":"2017-05-24 12:39:29.000000000","message":"nits) policy_option, strictly.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0f0d82f7919faec3b0ac6af1634f7e7ad9f18ff6","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        :param ring: ring to get nodes from"},{"line_number":144,"context_line":"        :param partition: ring partition to yield nodes for"},{"line_number":145,"context_line":"        \"\"\""},{"line_number":146,"context_line":"        policy_conf \u003d self.app.get_policy_options(policy)"},{"line_number":147,"context_line":"        is_local \u003d policy_conf.write_affinity_is_local_fn"},{"line_number":148,"context_line":"        if is_local is None:"},{"line_number":149,"context_line":"            return self.app.iter_nodes(ring, partition, policy\u003dpolicy)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_36ac869d","line":146,"range":{"start_line":146,"start_character":15,"end_line":146,"end_character":19},"in_reply_to":"ff0f0b1f_b2f7ad8b","updated":"2017-05-25 10:51:52.000000000","message":"Tim\u0027s got this covered : https://review.openstack.org/#/c/466952/","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}],"swift/proxy/server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                \u0027Invalid write_affinity_node_count value for %s: %r\u0027 %"},{"line_number":125,"context_line":"                (self.scope, \u0027\u0027.join(value)))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get(self, key, default\u003dNone):"},{"line_number":128,"context_line":"        return self.override_conf.get(key, self.conf.get(key, default))"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_8473ae4d","line":127,"range":{"start_line":127,"start_character":31,"end_line":127,"end_character":36},"updated":"2017-05-19 23:27:41.000000000","message":"We always pass in a default, yeah? Should we just require it?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9a6b162c6d0ed386e8a4c9343dc97d2afe8b167a","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                \u0027Invalid write_affinity_node_count value for %s: %r\u0027 %"},{"line_number":125,"context_line":"                (self.scope, \u0027\u0027.join(value)))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get(self, key, default\u003dNone):"},{"line_number":128,"context_line":"        return self.override_conf.get(key, self.conf.get(key, default))"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_9ed8967f","line":127,"range":{"start_line":127,"start_character":31,"end_line":127,"end_character":36},"in_reply_to":"ff0f0b1f_8473ae4d","updated":"2017-05-20 15:43:28.000000000","message":"I guess I was thinking generically when I wrote the helper :)","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        # force None key to be set in the defaultdict so that it is found when"},{"line_number":278,"context_line":"        # iterating over keys"},{"line_number":279,"context_line":"        override_confs[None] \u003d default_conf"},{"line_number":280,"context_line":"        for index, override_conf in conf.get(\u0027policy_config\u0027, {}).items():"},{"line_number":281,"context_line":"            try:"},{"line_number":282,"context_line":"                index \u003d int(index)"},{"line_number":283,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_e1049c4c","line":280,"range":{"start_line":280,"start_character":46,"end_line":280,"end_character":59},"updated":"2017-05-19 23:27:41.000000000","message":"OK, so this gets dropped in at the end of the file...","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                self.logger.debug(\"Loaded override config for %s\" % scope)"},{"line_number":295,"context_line":"            else:"},{"line_number":296,"context_line":"                self.logger.warning("},{"line_number":297,"context_line":"                    \"No policy found for override config, index: %s\" % index)"},{"line_number":298,"context_line":"        return override_confs"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def get_conf(self, policy):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_24de223f","line":297,"updated":"2017-05-19 23:27:41.000000000","message":"Why just a warning? Why not an error like when index isn\u0027t an int? Or like when we\u0027re finding all of the per-policy configs and require that index be present?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                self.logger.debug(\"Loaded override config for %s\" % scope)"},{"line_number":295,"context_line":"            else:"},{"line_number":296,"context_line":"                self.logger.warning("},{"line_number":297,"context_line":"                    \"No policy found for override config, index: %s\" % index)"},{"line_number":298,"context_line":"        return override_confs"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def get_conf(self, policy):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_f4440e49","line":297,"in_reply_to":"ff0f0b1f_24de223f","updated":"2017-05-23 14:36:31.000000000","message":"Done","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":592,"context_line":"                          {\u0027msg\u0027: msg.decode(\u0027utf-8\u0027), \u0027ip\u0027: node[\u0027ip\u0027],"},{"line_number":593,"context_line":"                          \u0027port\u0027: node[\u0027port\u0027], \u0027device\u0027: node[\u0027device\u0027]})"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def iter_nodes(self, ring, partition, node_iter\u003dNone, policy\u003dNone):"},{"line_number":596,"context_line":"        return NodeIter(self, ring, partition, node_iter\u003dnode_iter,"},{"line_number":597,"context_line":"                        policy\u003dpolicy)"},{"line_number":598,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_47cb581d","line":595,"updated":"2017-05-19 23:27:41.000000000","message":"Do we ever actually call this with a policy? I haven\u0027t seen it...","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9a6b162c6d0ed386e8a4c9343dc97d2afe8b167a","unresolved":false,"context_lines":[{"line_number":592,"context_line":"                          {\u0027msg\u0027: msg.decode(\u0027utf-8\u0027), \u0027ip\u0027: node[\u0027ip\u0027],"},{"line_number":593,"context_line":"                          \u0027port\u0027: node[\u0027port\u0027], \u0027device\u0027: node[\u0027device\u0027]})"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"    def iter_nodes(self, ring, partition, node_iter\u003dNone, policy\u003dNone):"},{"line_number":596,"context_line":"        return NodeIter(self, ring, partition, node_iter\u003dnode_iter,"},{"line_number":597,"context_line":"                        policy\u003dpolicy)"},{"line_number":598,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_de73aeb0","line":595,"in_reply_to":"ff0f0b1f_47cb581d","updated":"2017-05-20 15:43:28.000000000","message":"Hmmm, maybe I got a rebase error along the way :/ Will fix. Also reveals a lack of test coverage.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            \"cannot access proxy server conf file\")"},{"line_number":672,"context_line":"        return policy_config"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    policy_section_prefix \u003d conf[\u0027__name__\u0027] + \u0027:policy:\u0027"},{"line_number":675,"context_line":"    for section, options in all_conf.items():"},{"line_number":676,"context_line":"        if not section.startswith(policy_section_prefix):"},{"line_number":677,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_2423c2aa","line":674,"range":{"start_line":674,"start_character":34,"end_line":674,"end_character":42},"updated":"2017-05-19 23:27:41.000000000","message":"Huh. So this is the PasteDeploy name? So a config like\n\n [pipeline:main]\n pipeline \u003d ... proxy-srv\n \n [app:proxy-srv]\n use \u003d egg:swift#proxy\n ...\n\n...would need per-policy config sections like\n\n [proxy-srv:policy:0]\n ...\n \n [proxy-srv:policy:1]\n ...\n\n?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c025801de627449e88f076ac976cdbe641fe8286","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            \"cannot access proxy server conf file\")"},{"line_number":672,"context_line":"        return policy_config"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    policy_section_prefix \u003d conf[\u0027__name__\u0027] + \u0027:policy:\u0027"},{"line_number":675,"context_line":"    for section, options in all_conf.items():"},{"line_number":676,"context_line":"        if not section.startswith(policy_section_prefix):"},{"line_number":677,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_e5323d5e","line":674,"range":{"start_line":674,"start_character":34,"end_line":674,"end_character":42},"in_reply_to":"ff0f0b1f_1e7a4687","updated":"2017-05-22 17:49:01.000000000","message":"Ack. Still debating about whether it\u0027s worth documenting explicitly... but I\u0027m not at all sure how I would word it.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9a6b162c6d0ed386e8a4c9343dc97d2afe8b167a","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            \"cannot access proxy server conf file\")"},{"line_number":672,"context_line":"        return policy_config"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    policy_section_prefix \u003d conf[\u0027__name__\u0027] + \u0027:policy:\u0027"},{"line_number":675,"context_line":"    for section, options in all_conf.items():"},{"line_number":676,"context_line":"        if not section.startswith(policy_section_prefix):"},{"line_number":677,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_1e7a4687","line":674,"range":{"start_line":674,"start_character":34,"end_line":674,"end_character":42},"in_reply_to":"ff0f0b1f_2423c2aa","updated":"2017-05-20 15:43:28.000000000","message":"Yes, that was deliberate, rather than hard wiring \"proxy-server\" as the section prefix. That seems more flexible IF we ever extended this pattern to other confs i.e. that prefix identifies the filter/app to which this \"section\" belongs","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":671,"context_line":"            \"cannot access proxy server conf file\")"},{"line_number":672,"context_line":"        return policy_config"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    policy_section_prefix \u003d conf[\u0027__name__\u0027] + \u0027:policy:\u0027"},{"line_number":675,"context_line":"    for section, options in all_conf.items():"},{"line_number":676,"context_line":"        if not section.startswith(policy_section_prefix):"},{"line_number":677,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_f45d2e15","line":674,"range":{"start_line":674,"start_character":34,"end_line":674,"end_character":42},"in_reply_to":"ff0f0b1f_e5323d5e","updated":"2017-05-23 14:36:31.000000000","message":"I\u0027ll add a note to deployment guide","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":678,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":679,"context_line":"        if not policy_ref:"},{"line_number":680,"context_line":"            raise ValueError(\"Invalid policy config section: %s\" % section)"},{"line_number":681,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":682,"context_line":"    return policy_config"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_e4982ac1","line":681,"updated":"2017-05-19 23:27:41.000000000","message":"I think the [DEFAULT] section may cause some ... unexpected results. Like, I could (for some unknown reason) have\n\n [DEFAULT]\n write_affinity \u003d r1\n \n [app:proxy-server]\n write_affinity \u003d r2\n \n [proxy-server:policy:0]\n read_affinity \u003d r1\u003d0\n\n...with the expectation that policy 0 will use the write_affinity value from [app:proxy-server] :-/","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":678,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":679,"context_line":"        if not policy_ref:"},{"line_number":680,"context_line":"            raise ValueError(\"Invalid policy config section: %s\" % section)"},{"line_number":681,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":682,"context_line":"    return policy_config"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_54fa9abc","line":681,"in_reply_to":"ff0f0b1f_5b1aec6e","updated":"2017-05-23 14:36:31.000000000","message":"I suspect it would be quite complex to untangle DEFAULT settings from the per-policy sections once the parser has done it\u0027s work. We\u0027d likely end up writing our own parser because I\u0027m not sure how we\u0027d discern an option that was explicitly included in a section vs an option that got included by virtue of being in DEFAULT. I guess we could strip the DEFAULT section out of the conf before parsing the second time. But then we\u0027d need to document that the DEFAULT section doesn\u0027t do what you might expect!\n\nIMHO if an op is using the DEFAULT then they ought to understand how it is applied because with paste-deploy it\u0027s quite non-intuitive. ConfigParser is at least intuitive.\n\nI\u0027ll add some docs and as you suggest recommend not using the DEFAULT section.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c025801de627449e88f076ac976cdbe641fe8286","unresolved":false,"context_lines":[{"line_number":678,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":679,"context_line":"        if not policy_ref:"},{"line_number":680,"context_line":"            raise ValueError(\"Invalid policy config section: %s\" % section)"},{"line_number":681,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":682,"context_line":"    return policy_config"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_5b1aec6e","line":681,"in_reply_to":"ff0f0b1f_def60efa","updated":"2017-05-22 17:49:01.000000000","message":"IDK, from our description of\n\n\u003e Some proxy-server configuration options may be overridden on a per-policy basis by including per-policy config section(s)\n\nit seems a bit ambiguous. Personally, I find per-policy layered on proxy-server layered on DEFAULT a bit more natural than per-policy layered on DEFAULT layered on proxy-server layered on DEFAULT -- why have DEFAULT come into play more than once?\n\nMaybe it\u0027s just me, but\n\n\u003e if you understand how the DEFAULT section is applied\n\n...seems like a fairly large assumption; I\u0027m not sure how much ops think about configs in terms of Python\u0027s ConfigParser implementation. At the same time, I\n\n- don\u0027t think it\u0027s terribly likely that anyone *would* write a config like that and\n- don\u0027t know that we even *can* get to a semantic of per-policy layered on proxy-server layered on DEFAULT given the way ConfigParser is implemented,\n\nso maybe it\u0027s not worth worrying about.\n\nI\u0027d be all for documenting that you probably *don\u0027t* want these in a DEFAULT section, particularly given how these particular options are so proxy-server specific. If/when we make more options per-policy, though, I wonder if we may want to break from that :-/","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9a6b162c6d0ed386e8a4c9343dc97d2afe8b167a","unresolved":false,"context_lines":[{"line_number":678,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":679,"context_line":"        if not policy_ref:"},{"line_number":680,"context_line":"            raise ValueError(\"Invalid policy config section: %s\" % section)"},{"line_number":681,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":682,"context_line":"    return policy_config"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_def60efa","line":681,"in_reply_to":"ff0f0b1f_e4982ac1","updated":"2017-05-20 15:43:28.000000000","message":"(quick response, I may be misunderstanding your concern) ... Is that unexpected or expected ? I mean, if you understand how the DEFAULT section is applied then you\u0027d know that the write_affinity there would be applied to any section where it\u0027s not explicitly set?\n\nDo we just need to doc NOT to do this?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]}]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"class OverrideConf(object):"},{"line_number":83,"context_line":"    \"\"\""},{"line_number":84,"context_line":"    Encapsulates proxy server properties that may be overridden e.g. for"},{"line_number":85,"context_line":"    policy specific configurations."}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_ec38e1ee","line":82,"updated":"2017-05-23 00:51:04.000000000","message":"Might be nice to have a __repr__","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a9fbb5fcb73240f3ba12801f1d4db61470fced61","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]}]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"class OverrideConf(object):"},{"line_number":83,"context_line":"    \"\"\""},{"line_number":84,"context_line":"    Encapsulates proxy server properties that may be overridden e.g. for"},{"line_number":85,"context_line":"    policy specific configurations."}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_7a9b5517","line":82,"in_reply_to":"ff0f0b1f_ec38e1ee","updated":"2017-05-23 10:57:29.000000000","message":"+1\n\nPlus, perhaps move this to around swift.common.utils could be worth for the future because someone (Romain?) may want to use per-policy configuration in Object-Server too.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]}]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"class OverrideConf(object):"},{"line_number":83,"context_line":"    \"\"\""},{"line_number":84,"context_line":"    Encapsulates proxy server properties that may be overridden e.g. for"},{"line_number":85,"context_line":"    policy specific configurations."}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_6316fe57","line":82,"in_reply_to":"ff0f0b1f_ec38e1ee","updated":"2017-05-23 19:26:30.000000000","message":"Done","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a9fbb5fcb73240f3ba12801f1d4db61470fced61","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    :param override_conf: a dict of overriding configuration options."},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    def __init__(self, scope, conf, override_conf):"},{"line_number":92,"context_line":"        self.scope \u003d scope"},{"line_number":93,"context_line":"        self.conf \u003d conf"},{"line_number":94,"context_line":"        self.override_conf \u003d override_conf"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_f539b6d6","line":92,"range":{"start_line":92,"start_character":8,"end_line":92,"end_character":26},"updated":"2017-05-23 10:57:29.000000000","message":"the docs for this param says \"a string describing the scope of the overridden properties\" but it\u0027s actually used only for the logs when a failure occurred.\n\nIs it actually... policy?\n\nLooking at swift/proxy/controllers/base.py, policy is a part of scope information and it could be \"(default)\"\"","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    :param override_conf: a dict of overriding configuration options."},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    def __init__(self, scope, conf, override_conf):"},{"line_number":92,"context_line":"        self.scope \u003d scope"},{"line_number":93,"context_line":"        self.conf \u003d conf"},{"line_number":94,"context_line":"        self.override_conf \u003d override_conf"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_a32096ad","line":92,"range":{"start_line":92,"start_character":8,"end_line":92,"end_character":26},"in_reply_to":"ff0f0b1f_f539b6d6","updated":"2017-05-23 19:26:30.000000000","message":"As discussed in IRC, I will remove scope from the OverrideConf class, catch ValueErrors in caller and add scope to exception message there.\n\nAlso, rename to scope to something like \u0027label","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a9fbb5fcb73240f3ba12801f1d4db61470fced61","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.conf \u003d conf"},{"line_number":94,"context_line":"        self.override_conf \u003d override_conf"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        self.sorting_method \u003d self._get(\u0027sorting_method\u0027, \u0027shuffle\u0027).lower()"},{"line_number":97,"context_line":"        self._read_affinity \u003d read_affinity \u003d self._get(\u0027read_affinity\u0027, \u0027\u0027)"},{"line_number":98,"context_line":"        try:"},{"line_number":99,"context_line":"            self.read_affinity_sort_key \u003d affinity_key_function(read_affinity)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_da2b8192","line":96,"updated":"2017-05-23 10:57:29.000000000","message":"(from my comment at Line 82) Er - OverrideConf is hard-coded only for proxy.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        self.conf \u003d conf"},{"line_number":94,"context_line":"        self.override_conf \u003d override_conf"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        self.sorting_method \u003d self._get(\u0027sorting_method\u0027, \u0027shuffle\u0027).lower()"},{"line_number":97,"context_line":"        self._read_affinity \u003d read_affinity \u003d self._get(\u0027read_affinity\u0027, \u0027\u0027)"},{"line_number":98,"context_line":"        try:"},{"line_number":99,"context_line":"            self.read_affinity_sort_key \u003d affinity_key_function(read_affinity)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_fd53d137","line":96,"in_reply_to":"ff0f0b1f_da2b8192","updated":"2017-05-23 19:26:30.000000000","message":"Done","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        self.override_conf \u003d override_conf"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        self.sorting_method \u003d self._get(\u0027sorting_method\u0027, \u0027shuffle\u0027).lower()"},{"line_number":97,"context_line":"        self._read_affinity \u003d read_affinity \u003d self._get(\u0027read_affinity\u0027, \u0027\u0027)"},{"line_number":98,"context_line":"        try:"},{"line_number":99,"context_line":"            self.read_affinity_sort_key \u003d affinity_key_function(read_affinity)"},{"line_number":100,"context_line":"        except ValueError as err:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_ce005104","line":97,"updated":"2017-05-23 19:26:30.000000000","message":"_read_affinity doesn\u0027t need to be private member and ia accessed from app.check_config","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            raise ValueError("},{"line_number":124,"context_line":"                \u0027Invalid write_affinity_node_count value for %s: %r\u0027 %"},{"line_number":125,"context_line":"                (self.scope, \u0027\u0027.join(value)))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get(self, key, default):"},{"line_number":128,"context_line":"        return self.override_conf.get(key, self.conf.get(key, default))"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_277b92f5","line":125,"range":{"start_line":125,"start_character":29,"end_line":125,"end_character":31},"updated":"2017-05-23 00:51:04.000000000","message":"Huh. This was present in the original, too, but I feel like this ought to be\n\n \u0027 \u0027.join(value)\n\nsince we\u0027d try to int() a value like \u00272*replicas\u0027 ...","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            raise ValueError("},{"line_number":124,"context_line":"                \u0027Invalid write_affinity_node_count value for %s: %r\u0027 %"},{"line_number":125,"context_line":"                (self.scope, \u0027\u0027.join(value)))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get(self, key, default):"},{"line_number":128,"context_line":"        return self.override_conf.get(key, self.conf.get(key, default))"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_5d619d04","line":125,"range":{"start_line":125,"start_character":29,"end_line":125,"end_character":31},"in_reply_to":"ff0f0b1f_277b92f5","updated":"2017-05-23 19:26:30.000000000","message":"Done","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        default_conf \u003d OverrideConf(\u0027(default)\u0027, conf, {})"},{"line_number":276,"context_line":"        override_confs \u003d defaultdict(lambda: default_conf)"},{"line_number":277,"context_line":"        # force None key to be set in the defaultdict so that it is found when"},{"line_number":278,"context_line":"        # iterating over keys"},{"line_number":279,"context_line":"        override_confs[None] \u003d default_conf"},{"line_number":280,"context_line":"        for index, override_conf in conf.get(\u0027policy_config\u0027, {}).items():"},{"line_number":281,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_12544efe","line":278,"range":{"start_line":278,"start_character":10,"end_line":278,"end_character":29},"updated":"2017-05-23 00:51:04.000000000","message":"When iterating over *values*, no? I\u0027m not sure we *ever* use the policy when iterating over keys or items...","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        default_conf \u003d OverrideConf(\u0027(default)\u0027, conf, {})"},{"line_number":276,"context_line":"        override_confs \u003d defaultdict(lambda: default_conf)"},{"line_number":277,"context_line":"        # force None key to be set in the defaultdict so that it is found when"},{"line_number":278,"context_line":"        # iterating over keys"},{"line_number":279,"context_line":"        override_confs[None] \u003d default_conf"},{"line_number":280,"context_line":"        for index, override_conf in conf.get(\u0027policy_config\u0027, {}).items():"},{"line_number":281,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_2e96ad94","line":278,"range":{"start_line":278,"start_character":10,"end_line":278,"end_character":29},"in_reply_to":"ff0f0b1f_12544efe","updated":"2017-05-23 19:26:30.000000000","message":"I want to be sure that check_configs checks the default, so I think I need to ensure that a None key is generated in the dict.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                # name isn\u0027t possible because names such as \"3\" are allowed"},{"line_number":286,"context_line":"                raise ValueError("},{"line_number":287,"context_line":"                    \u0027Override config must refer to policy index: %s\u0027 % index)"},{"line_number":288,"context_line":"            policy \u003d POLICIES.get_by_index(index)"},{"line_number":289,"context_line":"            if policy:"},{"line_number":290,"context_line":"                scope \u003d \u0027policy %s (%s)\u0027 % (policy.idx, policy.name)"},{"line_number":291,"context_line":"                override_confs[policy] \u003d OverrideConf(scope,"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_27339216","line":288,"range":{"start_line":288,"start_character":21,"end_line":288,"end_character":49},"updated":"2017-05-23 00:51:04.000000000","message":"nit: since we already know it\u0027s an int, we could do something like\n\n try:\n     policy \u003d POLICIES[index]\n except KeyError:\n     self.warning(...)\n else:\n     scope \u003d ...","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                # name isn\u0027t possible because names such as \"3\" are allowed"},{"line_number":286,"context_line":"                raise ValueError("},{"line_number":287,"context_line":"                    \u0027Override config must refer to policy index: %s\u0027 % index)"},{"line_number":288,"context_line":"            policy \u003d POLICIES.get_by_index(index)"},{"line_number":289,"context_line":"            if policy:"},{"line_number":290,"context_line":"                scope \u003d \u0027policy %s (%s)\u0027 % (policy.idx, policy.name)"},{"line_number":291,"context_line":"                override_confs[policy] \u003d OverrideConf(scope,"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_ee167549","line":288,"range":{"start_line":288,"start_character":21,"end_line":288,"end_character":49},"in_reply_to":"ff0f0b1f_27339216","updated":"2017-05-23 19:26:30.000000000","message":"Done","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                self.logger.debug(\"Loaded override config for %s\" % scope)"},{"line_number":295,"context_line":"            else:"},{"line_number":296,"context_line":"                self.logger.warning("},{"line_number":297,"context_line":"                    \"No policy found for override config, index: %s\" % index)"},{"line_number":298,"context_line":"        return override_confs"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def get_conf(self, policy):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_e5e47de2","line":297,"updated":"2017-05-23 00:51:04.000000000","message":"Carry-forward: I still feel like we ought to be consistent about either warning on a bad config (like here), or refusing to start (like everywhere else).","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                self.logger.debug(\"Loaded override config for %s\" % scope)"},{"line_number":295,"context_line":"            else:"},{"line_number":296,"context_line":"                self.logger.warning("},{"line_number":297,"context_line":"                    \"No policy found for override config, index: %s\" % index)"},{"line_number":298,"context_line":"        return override_confs"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def get_conf(self, policy):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_0e33e9f7","line":297,"in_reply_to":"ff0f0b1f_e5e47de2","updated":"2017-05-23 19:26:30.000000000","message":"Done","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        \"\"\""},{"line_number":311,"context_line":"        Check the configuration for possible errors"},{"line_number":312,"context_line":"        \"\"\""},{"line_number":313,"context_line":"        for policy, conf in self._override_confs.items():"},{"line_number":314,"context_line":"            if conf._read_affinity and conf.sorting_method !\u003d \u0027affinity\u0027:"},{"line_number":315,"context_line":"                self.logger.warning("},{"line_number":316,"context_line":"                    _(\"sorting_method is set to \u0027%(method)s\u0027, not \u0027affinity\u0027; \""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_47a68655","line":313,"range":{"start_line":313,"start_character":12,"end_line":313,"end_character":18},"updated":"2017-05-23 00:51:04.000000000","message":"Is this ever used?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a9fbb5fcb73240f3ba12801f1d4db61470fced61","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        \"\"\""},{"line_number":311,"context_line":"        Check the configuration for possible errors"},{"line_number":312,"context_line":"        \"\"\""},{"line_number":313,"context_line":"        for policy, conf in self._override_confs.items():"},{"line_number":314,"context_line":"            if conf._read_affinity and conf.sorting_method !\u003d \u0027affinity\u0027:"},{"line_number":315,"context_line":"                self.logger.warning("},{"line_number":316,"context_line":"                    _(\"sorting_method is set to \u0027%(method)s\u0027, not \u0027affinity\u0027; \""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_d58fd2ca","line":313,"range":{"start_line":313,"start_character":12,"end_line":313,"end_character":18},"in_reply_to":"ff0f0b1f_47a68655","updated":"2017-05-23 10:57:29.000000000","message":"never. so self._override_confs.values() could be ok to work.\n\nHowever, I still concern on the comparison between scopes and policies ...","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        \"\"\""},{"line_number":311,"context_line":"        Check the configuration for possible errors"},{"line_number":312,"context_line":"        \"\"\""},{"line_number":313,"context_line":"        for policy, conf in self._override_confs.items():"},{"line_number":314,"context_line":"            if conf._read_affinity and conf.sorting_method !\u003d \u0027affinity\u0027:"},{"line_number":315,"context_line":"                self.logger.warning("},{"line_number":316,"context_line":"                    _(\"sorting_method is set to \u0027%(method)s\u0027, not \u0027affinity\u0027; \""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_4e6b21b6","line":313,"range":{"start_line":313,"start_character":12,"end_line":313,"end_character":18},"in_reply_to":"ff0f0b1f_d58fd2ca","updated":"2017-05-23 19:26:30.000000000","message":"OK in next patchset policy will be used in this method because I get rid of OverrideConf.scope and construct a scope string here from policy.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":665,"context_line":"    policy_config \u003d {}"},{"line_number":666,"context_line":"    try:"},{"line_number":667,"context_line":"        all_conf \u003d readconf(conf[\u0027__file__\u0027])"},{"line_number":668,"context_line":"    except KeyError:"},{"line_number":669,"context_line":"        get_logger(conf).warning("},{"line_number":670,"context_line":"            \"Unable to load policy specific configuration options: \""},{"line_number":671,"context_line":"            \"cannot access proxy server conf file\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_f29c3a0f","line":668,"updated":"2017-05-23 00:51:04.000000000","message":"Other errors we just bubble up? (I\u0027m mainly thinking of IOErrors here.)","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":668,"context_line":"    except KeyError:"},{"line_number":669,"context_line":"        get_logger(conf).warning("},{"line_number":670,"context_line":"            \"Unable to load policy specific configuration options: \""},{"line_number":671,"context_line":"            \"cannot access proxy server conf file\")"},{"line_number":672,"context_line":"        return policy_config"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    policy_section_prefix \u003d conf[\u0027__name__\u0027] + \u0027:policy:\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_d2ec9690","line":671,"updated":"2017-05-23 00:51:04.000000000","message":"This should only happen when \u0027__file__\u0027 not in conf, yeah? Worth scoping down the try, like\n\n try:\n     conf_file \u003d conf[\u0027__file__\u0027]\n except KeyError:\n     ...\n all_conf \u003d readconf(conf_file)\n\n? Is this just for tests, or could it happen with a real config/server?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":668,"context_line":"    except KeyError:"},{"line_number":669,"context_line":"        get_logger(conf).warning("},{"line_number":670,"context_line":"            \"Unable to load policy specific configuration options: \""},{"line_number":671,"context_line":"            \"cannot access proxy server conf file\")"},{"line_number":672,"context_line":"        return policy_config"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    policy_section_prefix \u003d conf[\u0027__name__\u0027] + \u0027:policy:\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_2eb0ed89","line":671,"in_reply_to":"ff0f0b1f_d2ec9690","updated":"2017-05-23 19:26:30.000000000","message":"(This and previous comment) - I added this being concious that I make us of __file__ for first time in this module, but I am not sure the check is needed at all??","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":676,"context_line":"        if not section.startswith(policy_section_prefix):"},{"line_number":677,"context_line":"            continue"},{"line_number":678,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":679,"context_line":"        if not policy_ref:"},{"line_number":680,"context_line":"            raise ValueError(\"Invalid policy config section: %s\" % section)"},{"line_number":681,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":682,"context_line":"    return policy_config"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_4de1072a","line":679,"updated":"2017-05-23 00:51:04.000000000","message":"I\u0027m not sure this is worth dealing with here; we may as well let it fail to int() up in _load_per_policy_config.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":676,"context_line":"        if not section.startswith(policy_section_prefix):"},{"line_number":677,"context_line":"            continue"},{"line_number":678,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":679,"context_line":"        if not policy_ref:"},{"line_number":680,"context_line":"            raise ValueError(\"Invalid policy config section: %s\" % section)"},{"line_number":681,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":682,"context_line":"    return policy_config"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_e9166f49","line":679,"in_reply_to":"ff0f0b1f_4de1072a","updated":"2017-05-23 19:26:30.000000000","message":"Done","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":678,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":679,"context_line":"        if not policy_ref:"},{"line_number":680,"context_line":"            raise ValueError(\"Invalid policy config section: %s\" % section)"},{"line_number":681,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":682,"context_line":"    return policy_config"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_8d96ff92","line":681,"updated":"2017-05-23 00:51:04.000000000","message":"So if there are multiple [proxy-server:policy:0] sections ... has ConfigParser already merged them?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":678,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":679,"context_line":"        if not policy_ref:"},{"line_number":680,"context_line":"            raise ValueError(\"Invalid policy config section: %s\" % section)"},{"line_number":681,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":682,"context_line":"    return policy_config"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_cef1716d","line":681,"in_reply_to":"ff0f0b1f_8d96ff92","updated":"2017-05-23 19:26:30.000000000","message":"In py2.7, experimentally I see duplicate sections being merged but I cannot find a doc for that. In py3 I\u0027d expect a DuplicateSectionError to be raised.\n\nSo, not sure I can do much to guard or warn about that and i am reluctant to test un-documented behavior.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"43830f000ec0d5ee9e2812c19de56864e6af8b53","unresolved":false,"context_lines":[{"line_number":678,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":679,"context_line":"        if not policy_ref:"},{"line_number":680,"context_line":"            raise ValueError(\"Invalid policy config section: %s\" % section)"},{"line_number":681,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":682,"context_line":"    return policy_config"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_05117f52","line":681,"in_reply_to":"ff0f0b1f_cef1716d","updated":"2017-05-23 22:11:22.000000000","message":"Ack. Won\u0027t worry about it.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abcb3b720bb1b8fd33daa069e8b66bba09d27452","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        self.conf \u003d base_conf"},{"line_number":98,"context_line":"        self.override_conf \u003d override_conf"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        self.sorting_method \u003d self._get(\u0027sorting_method\u0027, \u0027shuffle\u0027).lower()"},{"line_number":101,"context_line":"        self.read_affinity \u003d self._get(\u0027read_affinity\u0027, \u0027\u0027)"},{"line_number":102,"context_line":"        try:"},{"line_number":103,"context_line":"            self.read_affinity_sort_key \u003d affinity_key_function("}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_6aceca2d","line":100,"updated":"2017-05-23 23:59:57.000000000","message":"(Probably for follow-up) I wonder if we should have something like\n\n if self.sorting_method not in VALID_SORTING_METHODS:\n     raise ValueError(\u0027sorting_method must be one of \u0027 +\n                      \u0027, \u0027.join(VALID_SORTING_METHODS))","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abcb3b720bb1b8fd33daa069e8b66bba09d27452","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                \u0027Invalid write_affinity_node_count value: %r\u0027 %"},{"line_number":131,"context_line":"                (\u0027 \u0027.join(value)))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def __repr__(self):"},{"line_number":134,"context_line":"        return (\u0027sorting_method: %s, read_affinity: %s, write_affinity: %s, \u0027"},{"line_number":135,"context_line":"                \u0027write_affinity_node_count: %s\u0027 %"},{"line_number":136,"context_line":"                (self.sorting_method, self.read_affinity, self.write_affinity,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_2a96924d","line":133,"updated":"2017-05-23 23:59:57.000000000","message":"I think this should include *some* reference to self.__class__.__name__. Not sure it needs to be eval()able though it\u0027d be kinda nice... but maybe\n\n return \u0027%s({}, %r)\u0027 % (self.__class__.__name__, {\n     k: getattr(self, k) for k in (\n         \u0027sorting_method\u0027,\n         \u0027read_affinity\u0027,\n         \u0027write_affinity\u0027,\n         \u0027write_affinity_node_count\u0027)})\n\nis going too far? Oh, plus there\u0027s the difference between write_affinity_node_*count* and write_affinity_node_*value* :-/","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                \u0027Invalid write_affinity_node_count value: %r\u0027 %"},{"line_number":131,"context_line":"                (\u0027 \u0027.join(value)))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def __repr__(self):"},{"line_number":134,"context_line":"        return (\u0027sorting_method: %s, read_affinity: %s, write_affinity: %s, \u0027"},{"line_number":135,"context_line":"                \u0027write_affinity_node_count: %s\u0027 %"},{"line_number":136,"context_line":"                (self.sorting_method, self.read_affinity, self.write_affinity,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_494d263c","line":133,"in_reply_to":"ff0f0b1f_2a96924d","updated":"2017-05-25 05:21:14.000000000","message":"yeah if you\u0027re gunna do a __repr__ there\u0027s a strong convention to make it *look* like a valid python literal.\n\nwait wat, now this is for debug logging the specific settings - this is going to get unmaintainable as this list grows?\n\nI can\u0027t think of a cute way to do it - i have to admit it\u0027s nice piece-of-mind to have these values logged tho :\\","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"41f162971cd24ecdbaaf26f33acd24600d3c1cb9","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            self.logger \u003d get_logger(conf, log_route\u003d\u0027proxy-server\u0027)"},{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            self.logger \u003d logger"},{"line_number":154,"context_line":"        self._override_confs \u003d self._load_per_policy_config(conf)"},{"line_number":155,"context_line":"        self.sorts_by_timing \u003d any(pc.sorting_method \u003d\u003d \u0027timing\u0027"},{"line_number":156,"context_line":"                                   for pc in self._override_confs.values())"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_e6f56058","line":154,"updated":"2017-05-24 12:39:29.000000000","message":"Though it\u0027s ok, I like to use *options* for all attributes, (i mean OverrideConf is also OverrideOptions) if it\u0027s actually not a conf dict. But not sure it may be only me who thinks like as it.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abcb3b720bb1b8fd33daa069e8b66bba09d27452","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                              (label_for_policy, override))"},{"line_number":283,"context_line":"            return override"},{"line_number":284,"context_line":"        except ValueError as err:"},{"line_number":285,"context_line":"            raise ValueError(err.message + \u0027 for %s\u0027 % label_for_policy)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _load_per_policy_config(self, conf):"},{"line_number":288,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_0a262e16","line":285,"updated":"2017-05-23 23:59:57.000000000","message":"I think I get why we did this, but I\u0027m not sure I like what it does to my tracebacks:\n\nTraceback (most recent call last):\n  File \"/usr/local/bin/swift-proxy-server\", line 6, in \u003cmodule\u003e\n    exec(compile(open(__file__).read(), __file__, \u0027exec\u0027))\n  ...\n  File \"/vagrant/swift/swift/proxy/server.py\", line 315, in _load_per_policy_config\n    override \u003d self._make_policy_override(policy, conf, override_conf)\n  File \"/vagrant/swift/swift/proxy/server.py\", line 285, in _make_policy_override\n    raise ValueError(err.message + \u0027 for %s\u0027 % label_for_policy)\nValueError: invalid literal for int() with base 10: \u0027n\u0027 for policy 0 (default)\n\n...but I guess there\u0027s enough information that I can probably suss out what needs to be fixed.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"41f162971cd24ecdbaaf26f33acd24600d3c1cb9","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                              (label_for_policy, override))"},{"line_number":283,"context_line":"            return override"},{"line_number":284,"context_line":"        except ValueError as err:"},{"line_number":285,"context_line":"            raise ValueError(err.message + \u0027 for %s\u0027 % label_for_policy)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _load_per_policy_config(self, conf):"},{"line_number":288,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_46208cf7","line":285,"in_reply_to":"ff0f0b1f_0a262e16","updated":"2017-05-24 12:39:29.000000000","message":"Probably you set write_affinity_node_count like as either \"n * replicas\" or \"n\"? That seems expected behavior even within the master, though.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"79a45b42c841abab89ecfbf5e46bc4fffcbde9f1","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                              (label_for_policy, override))"},{"line_number":283,"context_line":"            return override"},{"line_number":284,"context_line":"        except ValueError as err:"},{"line_number":285,"context_line":"            raise ValueError(err.message + \u0027 for %s\u0027 % label_for_policy)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _load_per_policy_config(self, conf):"},{"line_number":288,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_fdc16a55","line":285,"in_reply_to":"ff0f0b1f_46208cf7","updated":"2017-05-24 16:48:26.000000000","message":"Yup. My concern was more that the traceback doesn\u0027t get us up to the int() call -- but since there\u0027s only one option (currently) that needs to do that, you can pretty easily figure out what went wrong.\n\nIf we make some other options per-policy, we may need to start doing things like\n\n try:\n     self.usable_value \u003d int(conf_value)\n except ValueError:\n     raise ValueError(\u0027Invalid \u003coption\u003e value: ...\u0027)\n\nfor each option that needs int()ing...","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        override_confs \u003d defaultdict(lambda: default_conf)"},{"line_number":299,"context_line":"        # force None key to be set in the defaultdict so that it is found when"},{"line_number":300,"context_line":"        # iterating over items in check_config"},{"line_number":301,"context_line":"        override_confs[None] \u003d default_conf"},{"line_number":302,"context_line":"        for index, override_conf in conf.get(\u0027policy_config\u0027, {}).items():"},{"line_number":303,"context_line":"            try:"},{"line_number":304,"context_line":"                index \u003d int(index)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_1a676eeb","line":301,"updated":"2017-05-25 05:21:14.000000000","message":"oh, ok need to keep that in mind.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                policy \u003d POLICIES[index]"},{"line_number":312,"context_line":"            except KeyError:"},{"line_number":313,"context_line":"                raise ValueError("},{"line_number":314,"context_line":"                    \"No policy found for override config, index: %s\" % index)"},{"line_number":315,"context_line":"            override \u003d self._make_policy_override(policy, conf, override_conf)"},{"line_number":316,"context_line":"            override_confs[policy] \u003d override"},{"line_number":317,"context_line":"        return override_confs"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_e9fbdaba","line":314,"updated":"2017-05-25 05:21:14.000000000","message":"prevent proxy from starting... i\u0027m trying to imagine a race where you\u0027re just write out configs and restart processes to enable a new policy with custom tuning...\n\nI think this is right.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"aac631418c187eedfcfa74107065d3cb664bfd23","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        \"\"\""},{"line_number":326,"context_line":"        return self._override_confs[policy]"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    def check_config(self):"},{"line_number":329,"context_line":"        \"\"\""},{"line_number":330,"context_line":"        Check the configuration for possible errors"},{"line_number":331,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_d4ed7fb7","line":328,"updated":"2017-05-23 19:34:29.000000000","message":"@Kota - I decided to leave this as a function called from app_factory because even though that seems weird, it avoids another change in this patch, to a method that is public.\n\nI did however deal with moving \u0027scope\u0027 out of OverrideConf, whch was the main issue. I added a small helper function _label_for_policy  to be used here and when loading the per policy configs.\n\nHope that is ok for you.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"41f162971cd24ecdbaaf26f33acd24600d3c1cb9","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        \"\"\""},{"line_number":326,"context_line":"        return self._override_confs[policy]"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    def check_config(self):"},{"line_number":329,"context_line":"        \"\"\""},{"line_number":330,"context_line":"        Check the configuration for possible errors"},{"line_number":331,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_e68fa027","line":328,"in_reply_to":"ff0f0b1f_d4ed7fb7","updated":"2017-05-24 12:39:29.000000000","message":"that is ok. it\u0027s not a main blocker for this.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                    _(\"sorting_method is set to \u0027%(method)s\u0027, not \u0027affinity\u0027; \""},{"line_number":336,"context_line":"                      \"%(label)s read_affinity setting will have no effect.\"),"},{"line_number":337,"context_line":"                    {\u0027label\u0027: _label_for_policy(policy),"},{"line_number":338,"context_line":"                     \u0027method\u0027: conf.sorting_method})"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def get_object_ring(self, policy_idx):"},{"line_number":341,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_ae0728ca","line":338,"updated":"2017-05-25 05:21:14.000000000","message":"makes it look like you can have an invalid global default as long as you override with valid per-policy options\n\noh... wahhhhh\n\n    May 25 04:48:38 saio proxy-server: sorting_method is set to \u0027shuffle\u0027, not \u0027affinity\u0027; (default) read_affinity setting will have no effect.\n\n... oic, i missed the comment up there","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0f0d82f7919faec3b0ac6af1634f7e7ad9f18ff6","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                    _(\"sorting_method is set to \u0027%(method)s\u0027, not \u0027affinity\u0027; \""},{"line_number":336,"context_line":"                      \"%(label)s read_affinity setting will have no effect.\"),"},{"line_number":337,"context_line":"                    {\u0027label\u0027: _label_for_policy(policy),"},{"line_number":338,"context_line":"                     \u0027method\u0027: conf.sorting_method})"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def get_object_ring(self, policy_idx):"},{"line_number":341,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_369a4661","line":338,"in_reply_to":"ff0f0b1f_ae0728ca","updated":"2017-05-25 10:51:52.000000000","message":"yup, the default gets checked","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            return HTTPServerError(request\u003dreq)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def sort_nodes(self, nodes, policy\u003dNone):"},{"line_number":521,"context_line":"        \"\"\""},{"line_number":522,"context_line":"        Sorts nodes in-place (and returns the sorted list) according to"},{"line_number":523,"context_line":"        the configured strategy. The default \"sorting\" is to randomly"},{"line_number":524,"context_line":"        shuffle the nodes. If the \"timing\" strategy is chosen, the nodes"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_2efb18c1","line":521,"updated":"2017-05-25 05:21:14.000000000","message":"hrm.. interested to track down the call site where we *don\u0027t* pass in the policy?  a/c?\n\noh, no make_request - hrmm...","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0f0d82f7919faec3b0ac6af1634f7e7ad9f18ff6","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            return HTTPServerError(request\u003dreq)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def sort_nodes(self, nodes, policy\u003dNone):"},{"line_number":521,"context_line":"        \"\"\""},{"line_number":522,"context_line":"        Sorts nodes in-place (and returns the sorted list) according to"},{"line_number":523,"context_line":"        the configured strategy. The default \"sorting\" is to randomly"},{"line_number":524,"context_line":"        shuffle the nodes. If the \"timing\" strategy is chosen, the nodes"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_76bd5eb5","line":521,"in_reply_to":"ff0f0b1f_2efb18c1","updated":"2017-05-25 10:51:52.000000000","message":"Also, it\u0027s a public method, so I feared some other 3rd party caller might be using this????","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"41f162971cd24ecdbaaf26f33acd24600d3c1cb9","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        # (ie within the rounding resolution) won\u0027t prefer one over another."},{"line_number":532,"context_line":"        # Python\u0027s sort is stable (http://wiki.python.org/moin/HowTo/Sorting/)"},{"line_number":533,"context_line":"        shuffle(nodes)"},{"line_number":534,"context_line":"        policy_conf \u003d self.get_policy_options(policy)"},{"line_number":535,"context_line":"        if policy_conf.sorting_method \u003d\u003d \u0027timing\u0027:"},{"line_number":536,"context_line":"            now \u003d time()"},{"line_number":537,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_12e9b97e","line":534,"range":{"start_line":534,"start_character":8,"end_line":534,"end_character":18},"updated":"2017-05-24 12:39:29.000000000","message":"policy_option, too.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        # (ie within the rounding resolution) won\u0027t prefer one over another."},{"line_number":532,"context_line":"        # Python\u0027s sort is stable (http://wiki.python.org/moin/HowTo/Sorting/)"},{"line_number":533,"context_line":"        shuffle(nodes)"},{"line_number":534,"context_line":"        policy_conf \u003d self.get_policy_options(policy)"},{"line_number":535,"context_line":"        if policy_conf.sorting_method \u003d\u003d \u0027timing\u0027:"},{"line_number":536,"context_line":"            now \u003d time()"},{"line_number":537,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_6e26b06a","line":534,"in_reply_to":"ff0f0b1f_12e9b97e","updated":"2017-05-25 05:21:14.000000000","message":"yeah why does get_*policy_options* return *policy_conf*\n\ncould just name it get_policy_conf","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":697,"context_line":"            continue"},{"line_number":698,"context_line":"        policy_ref \u003d section[len(policy_section_prefix):]"},{"line_number":699,"context_line":"        policy_config[policy_ref] \u003d options"},{"line_number":700,"context_line":"    return policy_config"},{"line_number":701,"context_line":""},{"line_number":702,"context_line":""},{"line_number":703,"context_line":"def app_factory(global_conf, **local_conf):"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_df2e888a","line":700,"updated":"2017-05-25 05:21:14.000000000","message":"wfm","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}],"test/unit/__init__.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import copy"},{"line_number":21,"context_line":"import logging"},{"line_number":22,"context_line":"import errno"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from six.moves import range"},{"line_number":25,"context_line":"from six import BytesIO"},{"line_number":26,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_6463fa43","line":23,"updated":"2017-05-19 23:27:41.000000000","message":"? Meh... don\u0027t really care...","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9a6b162c6d0ed386e8a4c9343dc97d2afe8b167a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import copy"},{"line_number":21,"context_line":"import logging"},{"line_number":22,"context_line":"import errno"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from six.moves import range"},{"line_number":25,"context_line":"from six import BytesIO"},{"line_number":26,"context_line":"import sys"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_3ed3ca62","line":23,"in_reply_to":"ff0f0b1f_6463fa43","updated":"2017-05-20 15:43:28.000000000","message":"Done","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"}],"test/unit/proxy/controllers/test_obj.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        policy_conf.write_affinity_is_local_fn \u003d ("},{"line_number":218,"context_line":"            lambda node: node[\u0027region\u0027] \u003d\u003d 1)"},{"line_number":219,"context_line":"        # we\u0027ll write to one more than replica count local nodes"},{"line_number":220,"context_line":"        policy_conf.write_affinity_node_count \u003d lambda r: r + 1"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        object_ring \u003d self.policy.object_ring"},{"line_number":223,"context_line":"        # make our fake ring have plenty of nodes, and not get limited"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_4499161d","line":220,"updated":"2017-05-19 23:27:41.000000000","message":"Offtopic: now there\u0027s an interesting thing we can\u0027t currently express in our configs...","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":577,"context_line":""},{"line_number":578,"context_line":"                self.assertEqual(container_updates, expected)"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"    def _check_write_affinity("},{"line_number":581,"context_line":"            self, conf, policy_conf, policy, affinity_regions, affinity_count):"},{"line_number":582,"context_line":"        conf[\u0027policy_config\u0027] \u003d policy_conf"},{"line_number":583,"context_line":"        app \u003d PatchedObjControllerApp("}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_070d6036","line":580,"updated":"2017-05-19 23:27:41.000000000","message":"Note to self: need to look at these more...","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"975a26cfcff3b5ffe0236565a6b5b78038aadcac","unresolved":false,"context_lines":[{"line_number":577,"context_line":""},{"line_number":578,"context_line":"                self.assertEqual(container_updates, expected)"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"    def _check_write_affinity("},{"line_number":581,"context_line":"            self, conf, policy_conf, policy, affinity_regions, affinity_count):"},{"line_number":582,"context_line":"        conf[\u0027policy_config\u0027] \u003d policy_conf"},{"line_number":583,"context_line":"        app \u003d PatchedObjControllerApp("}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_e2d22500","line":580,"in_reply_to":"ff0f0b1f_070d6036","updated":"2017-05-23 00:43:07.000000000","message":"Done","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"        controller \u003d self.controller_cls(app, \u0027a\u0027, \u0027c\u0027, \u0027o\u0027)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"        object_ring \u003d app.get_object_ring(None)"},{"line_number":590,"context_line":"        # make our fake ring have plenty of nodes, and not get limited"},{"line_number":591,"context_line":"        # artificially by the proxy max request node count"},{"line_number":592,"context_line":"        object_ring.max_more_nodes \u003d 100"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_f18e5577","line":589,"updated":"2017-05-23 19:26:30.000000000","message":"s/None/int(policy)/","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        self._check_write_affinity({}, {}, POLICIES[0], [0, 1],"},{"line_number":617,"context_line":"                                   2 * self.replicas())"},{"line_number":618,"context_line":"        self._check_write_affinity({}, {}, POLICIES[1], [0, 1],"},{"line_number":619,"context_line":"                                   2 * self.replicas())"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def test_write_affinity_proxy_server_config(self):"},{"line_number":622,"context_line":"        # without overrides policies use proxy-server config section options"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_02875911","line":619,"updated":"2017-05-23 00:51:04.000000000","message":"One or the other (or maybe both?) of these calls to self.replicas() is completely divorced from the policy that we\u0027re passing in. Is that... intentional? It seems strange to say \"I want 2x replicas for this policy\" but then have the node count that we check use some *other* concept of \"replica\".","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        self._check_write_affinity({}, {}, POLICIES[0], [0, 1],"},{"line_number":617,"context_line":"                                   2 * self.replicas())"},{"line_number":618,"context_line":"        self._check_write_affinity({}, {}, POLICIES[1], [0, 1],"},{"line_number":619,"context_line":"                                   2 * self.replicas())"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def test_write_affinity_proxy_server_config(self):"},{"line_number":622,"context_line":"        # without overrides policies use proxy-server config section options"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_e9b2ef48","line":619,"in_reply_to":"ff0f0b1f_02875911","updated":"2017-05-23 19:26:30.000000000","message":"good catch\n\nturns out both policies have same replica count for replicate controller tests, but not for EC obj controller tests. Will fix.","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        conf \u003d {}"},{"line_number":631,"context_line":"        policy_conf \u003d {\u00270\u0027: {\u0027write_affinity_node_count\u0027: \u00271 * replicas\u0027,"},{"line_number":632,"context_line":"                             \u0027write_affinity\u0027: \u0027r1\u0027},"},{"line_number":633,"context_line":"                       \u00271\u0027: {\u0027write_affinity_node_count\u0027: \u00272 * replicas\u0027,"},{"line_number":634,"context_line":"                             \u0027write_affinity\u0027: \u0027r0\u0027}}"},{"line_number":635,"context_line":"        self._check_write_affinity(conf, policy_conf, POLICIES[0], [1],"},{"line_number":636,"context_line":"                                   self.replicas())"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_ed80dbc1","line":633,"range":{"start_line":633,"start_character":59,"end_line":633,"end_character":71},"updated":"2017-05-23 00:51:04.000000000","message":"Worth making this some non-default? I kinda want to just use 5 or something, but that seems to break it?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":630,"context_line":"        conf \u003d {}"},{"line_number":631,"context_line":"        policy_conf \u003d {\u00270\u0027: {\u0027write_affinity_node_count\u0027: \u00271 * replicas\u0027,"},{"line_number":632,"context_line":"                             \u0027write_affinity\u0027: \u0027r1\u0027},"},{"line_number":633,"context_line":"                       \u00271\u0027: {\u0027write_affinity_node_count\u0027: \u00272 * replicas\u0027,"},{"line_number":634,"context_line":"                             \u0027write_affinity\u0027: \u0027r0\u0027}}"},{"line_number":635,"context_line":"        self._check_write_affinity(conf, policy_conf, POLICIES[0], [1],"},{"line_number":636,"context_line":"                                   self.replicas())"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_11966994","line":633,"range":{"start_line":633,"start_character":59,"end_line":633,"end_character":71},"in_reply_to":"ff0f0b1f_ed80dbc1","updated":"2017-05-23 19:26:30.000000000","message":"Done - 5 broke it because there was a bug in _check_write_affinity :/ so thank you for this comment !","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b066bfc153db99307c47813025bebb32d52b7d59","unresolved":false,"context_lines":[{"line_number":649,"context_line":"        self._check_write_affinity(conf, policy_conf, POLICIES[1], [0],"},{"line_number":650,"context_line":"                                   2 * self.replicas())"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    def test_write_affinity_per_policy_config_inherits(self):"},{"line_number":653,"context_line":"        # check that per-policy config will inherit proxy-server section config"},{"line_number":654,"context_line":"        conf \u003d {\u0027write_affinity_node_count\u0027: \u00271 * replicas\u0027,"},{"line_number":655,"context_line":"                \u0027write_affinity\u0027: \u0027r0\u0027}"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_0d69cf1f","line":652,"updated":"2017-05-23 00:51:04.000000000","message":"This is *so close* to the one above, is it really worth having separate cases for whether \u0027write_affinity \u003d r0\u0027 is in just the proxy-server section or both?","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"93e3a7d07085f7dab4e2d07c5c5b3fda83562a01","unresolved":false,"context_lines":[{"line_number":649,"context_line":"        self._check_write_affinity(conf, policy_conf, POLICIES[1], [0],"},{"line_number":650,"context_line":"                                   2 * self.replicas())"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    def test_write_affinity_per_policy_config_inherits(self):"},{"line_number":653,"context_line":"        # check that per-policy config will inherit proxy-server section config"},{"line_number":654,"context_line":"        conf \u003d {\u0027write_affinity_node_count\u0027: \u00271 * replicas\u0027,"},{"line_number":655,"context_line":"                \u0027write_affinity\u0027: \u0027r0\u0027}"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_918a7967","line":652,"in_reply_to":"ff0f0b1f_0d69cf1f","updated":"2017-05-23 19:26:30.000000000","message":"Done","commit_id":"5aa17c7fa0c15ac197cf4c1671656e521cc3d187"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":579,"context_line":"                self.assertEqual(container_updates, expected)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def _check_write_affinity("},{"line_number":582,"context_line":"            self, conf, policy_conf, policy, affinity_regions, affinity_count):"},{"line_number":583,"context_line":"        conf[\u0027policy_config\u0027] \u003d policy_conf"},{"line_number":584,"context_line":"        app \u003d PatchedObjControllerApp("},{"line_number":585,"context_line":"            conf, FakeMemcache(), account_ring\u003dFakeRing(),"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_5a016669","line":582,"updated":"2017-05-25 05:21:14.000000000","message":"expected_regions, expected_count?","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":647,"context_line":"                       \u00271\u0027: {\u0027write_affinity_node_count\u0027: \u00273 * replicas\u0027}}"},{"line_number":648,"context_line":"        # policy 0 inherits default node count, override affinity to r1"},{"line_number":649,"context_line":"        self._check_write_affinity(conf, policy_conf, POLICIES[0], [1],"},{"line_number":650,"context_line":"                                   self.replicas(POLICIES[0]))"},{"line_number":651,"context_line":"        # policy 1 inherits default affinity to r0, overrides node count"},{"line_number":652,"context_line":"        self._check_write_affinity(conf, policy_conf, POLICIES[1], [0],"},{"line_number":653,"context_line":"                                   3 * self.replicas(POLICIES[1]))"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_9a301e58","line":650,"updated":"2017-05-25 05:21:14.000000000","message":"yeah expected_regions, expected_count\n\nthis policy is overriden affine to r1, with default count 1 * replicas\n\nso expected_regions is [1], expected_count is replicas","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":783,"context_line":"                 {\u0027region\u0027: 1, \u0027zone\u0027: 1, \u0027ip\u0027: \u0027127.0.0.1\u0027},"},{"line_number":784,"context_line":"                 {\u0027region\u0027: 2, \u0027zone\u0027: 2, \u0027ip\u0027: \u0027127.0.0.2\u0027}]"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        # proxy-server affinity conf is to prefer r0"},{"line_number":787,"context_line":"        conf \u003d {\u0027sorting_method\u0027: \u0027affinity\u0027, \u0027read_affinity\u0027: \u0027r2\u003d1\u0027}"},{"line_number":788,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, {}, nodes, None)"},{"line_number":789,"context_line":"        self.assertEqual([nodes[2], nodes[0], nodes[1]], actual)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_072680b8","line":786,"range":{"start_line":786,"start_character":50,"end_line":786,"end_character":52},"updated":"2017-05-19 23:27:41.000000000","message":"You mean r2?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9a6b162c6d0ed386e8a4c9343dc97d2afe8b167a","unresolved":false,"context_lines":[{"line_number":783,"context_line":"                 {\u0027region\u0027: 1, \u0027zone\u0027: 1, \u0027ip\u0027: \u0027127.0.0.1\u0027},"},{"line_number":784,"context_line":"                 {\u0027region\u0027: 2, \u0027zone\u0027: 2, \u0027ip\u0027: \u0027127.0.0.2\u0027}]"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        # proxy-server affinity conf is to prefer r0"},{"line_number":787,"context_line":"        conf \u003d {\u0027sorting_method\u0027: \u0027affinity\u0027, \u0027read_affinity\u0027: \u0027r2\u003d1\u0027}"},{"line_number":788,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, {}, nodes, None)"},{"line_number":789,"context_line":"        self.assertEqual([nodes[2], nodes[0], nodes[1]], actual)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_bec6ba99","line":786,"range":{"start_line":786,"start_character":50,"end_line":786,"end_character":52},"in_reply_to":"ff0f0b1f_072680b8","updated":"2017-05-20 15:43:28.000000000","message":"Done","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":844,"context_line":"        per_policy \u003d {\u00270\u0027: {\u0027read_affinity\u0027: \u0027r0\u003d0\u0027}}"},{"line_number":845,"context_line":"        # policy 0 uses the default sorting method instead of affinity sorting"},{"line_number":846,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, per_policy, nodes, POLICIES[0])"},{"line_number":847,"context_line":"        self.assertEqual(nodes, actual)"},{"line_number":848,"context_line":"        # but if proxy-server sorting_method is affinity then policy 0 inherits"},{"line_number":849,"context_line":"        conf \u003d {\u0027sorting_method\u0027: \u0027affinity\u0027}"},{"line_number":850,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, per_policy, nodes, POLICIES[0])"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_a70354b8","line":847,"updated":"2017-05-19 23:27:41.000000000","message":"There should also be some warning logged, yeah? Should we check for that?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"975a26cfcff3b5ffe0236565a6b5b78038aadcac","unresolved":false,"context_lines":[{"line_number":844,"context_line":"        per_policy \u003d {\u00270\u0027: {\u0027read_affinity\u0027: \u0027r0\u003d0\u0027}}"},{"line_number":845,"context_line":"        # policy 0 uses the default sorting method instead of affinity sorting"},{"line_number":846,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, per_policy, nodes, POLICIES[0])"},{"line_number":847,"context_line":"        self.assertEqual(nodes, actual)"},{"line_number":848,"context_line":"        # but if proxy-server sorting_method is affinity then policy 0 inherits"},{"line_number":849,"context_line":"        conf \u003d {\u0027sorting_method\u0027: \u0027affinity\u0027}"},{"line_number":850,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, per_policy, nodes, POLICIES[0])"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_5e3097e8","line":847,"in_reply_to":"ff0f0b1f_a70354b8","updated":"2017-05-23 00:43:07.000000000","message":"Ah, we only call check_config() in the app factory... hmm...","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":863,"context_line":"                                          node_timings\u003dnode_timings)"},{"line_number":864,"context_line":"        self.assertEqual([nodes[1], nodes[2], nodes[0]], actual)"},{"line_number":865,"context_line":"        # check that timings are collected despite one policy using affinity"},{"line_number":866,"context_line":"        self.assertTrue(app.sorts_by_timing)"},{"line_number":867,"context_line":"        self.assertEqual(3, len(app.node_timings))"},{"line_number":868,"context_line":"        # check app defaults to sorting by timing when no policy specified"},{"line_number":869,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, per_policy, nodes, None,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_07e1e0fe","line":866,"range":{"start_line":866,"start_character":28,"end_line":866,"end_character":43},"updated":"2017-05-19 23:27:41.000000000","message":"Isn\u0027t this trivially true from our _do_sort_nodes with the node_timings kwarg?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"975a26cfcff3b5ffe0236565a6b5b78038aadcac","unresolved":false,"context_lines":[{"line_number":863,"context_line":"                                          node_timings\u003dnode_timings)"},{"line_number":864,"context_line":"        self.assertEqual([nodes[1], nodes[2], nodes[0]], actual)"},{"line_number":865,"context_line":"        # check that timings are collected despite one policy using affinity"},{"line_number":866,"context_line":"        self.assertTrue(app.sorts_by_timing)"},{"line_number":867,"context_line":"        self.assertEqual(3, len(app.node_timings))"},{"line_number":868,"context_line":"        # check app defaults to sorting by timing when no policy specified"},{"line_number":869,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, per_policy, nodes, None,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_db5ef974","line":866,"range":{"start_line":866,"start_character":28,"end_line":866,"end_character":43},"in_reply_to":"ff0f0b1f_07e1e0fe","updated":"2017-05-23 00:43:07.000000000","message":"Scratch that; I was thinking of app.node_timings... still seems kinda weird that we never check that the timings get *updated* though.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        conf \u003d {\u0027sorting_method\u0027: \u0027affinity\u0027, \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027}"},{"line_number":883,"context_line":"        per_policy \u003d {\u00270\u0027: {\u0027sorting_method\u0027: \u0027timing\u0027,"},{"line_number":884,"context_line":"                            \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027},  # should be ignored"},{"line_number":885,"context_line":"                      \u00271\u0027: {\u0027sorting_method\u0027: \u0027affinity\u0027,"},{"line_number":886,"context_line":"                            \u0027read_affinity\u0027: \u0027r2\u003d1\u0027}}"},{"line_number":887,"context_line":"        # policy 0 uses timing"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_47a598b4","line":884,"updated":"2017-05-19 23:27:41.000000000","message":"With a warning?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ff3b4666b2fa3095997fd7722ea1a642eae7baf5","unresolved":false,"context_lines":[{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        conf \u003d {\u0027sorting_method\u0027: \u0027affinity\u0027, \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027}"},{"line_number":883,"context_line":"        per_policy \u003d {\u00270\u0027: {\u0027sorting_method\u0027: \u0027timing\u0027,"},{"line_number":884,"context_line":"                            \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027},  # should be ignored"},{"line_number":885,"context_line":"                      \u00271\u0027: {\u0027sorting_method\u0027: \u0027affinity\u0027,"},{"line_number":886,"context_line":"                            \u0027read_affinity\u0027: \u0027r2\u003d1\u0027}}"},{"line_number":887,"context_line":"        # policy 0 uses timing"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_29ad87e8","line":884,"in_reply_to":"ff0f0b1f_34d966f2","updated":"2017-05-23 17:28:41.000000000","message":"Yeah, I noticed that when I went to do it in the follow-up. __init__ seems like a reasonable place for it, but I don\u0027t know whether it\u0027d break some tests.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        conf \u003d {\u0027sorting_method\u0027: \u0027affinity\u0027, \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027}"},{"line_number":883,"context_line":"        per_policy \u003d {\u00270\u0027: {\u0027sorting_method\u0027: \u0027timing\u0027,"},{"line_number":884,"context_line":"                            \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027},  # should be ignored"},{"line_number":885,"context_line":"                      \u00271\u0027: {\u0027sorting_method\u0027: \u0027affinity\u0027,"},{"line_number":886,"context_line":"                            \u0027read_affinity\u0027: \u0027r2\u003d1\u0027}}"},{"line_number":887,"context_line":"        # policy 0 uses timing"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_34d966f2","line":884,"in_reply_to":"ff0f0b1f_47a598b4","updated":"2017-05-23 14:36:31.000000000","message":"The warning is logged from check_config which for some reason is called from app_factory. Discussed this with Kota and we may move that into the __init__","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":882,"context_line":"        conf \u003d {\u0027sorting_method\u0027: \u0027affinity\u0027, \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027}"},{"line_number":883,"context_line":"        per_policy \u003d {\u00270\u0027: {\u0027sorting_method\u0027: \u0027timing\u0027,"},{"line_number":884,"context_line":"                            \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027},  # should be ignored"},{"line_number":885,"context_line":"                      \u00271\u0027: {\u0027sorting_method\u0027: \u0027affinity\u0027,"},{"line_number":886,"context_line":"                            \u0027read_affinity\u0027: \u0027r2\u003d1\u0027}}"},{"line_number":887,"context_line":"        # policy 0 uses timing"},{"line_number":888,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, per_policy, nodes, POLICIES[0],"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_27850409","line":885,"range":{"start_line":885,"start_character":28,"end_line":885,"end_character":56},"updated":"2017-05-19 23:27:41.000000000","message":"nit: Not really needed.","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5bad1d7b68ebff767648abacf6bf76b937a6084b","unresolved":false,"context_lines":[{"line_number":882,"context_line":"        conf \u003d {\u0027sorting_method\u0027: \u0027affinity\u0027, \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027}"},{"line_number":883,"context_line":"        per_policy \u003d {\u00270\u0027: {\u0027sorting_method\u0027: \u0027timing\u0027,"},{"line_number":884,"context_line":"                            \u0027read_affinity\u0027: \u0027r1\u003d1,r2\u003d2\u0027},  # should be ignored"},{"line_number":885,"context_line":"                      \u00271\u0027: {\u0027sorting_method\u0027: \u0027affinity\u0027,"},{"line_number":886,"context_line":"                            \u0027read_affinity\u0027: \u0027r2\u003d1\u0027}}"},{"line_number":887,"context_line":"        # policy 0 uses timing"},{"line_number":888,"context_line":"        app, actual \u003d self._do_sort_nodes(conf, per_policy, nodes, POLICIES[0],"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_14fb0247","line":885,"range":{"start_line":885,"start_character":28,"end_line":885,"end_character":56},"in_reply_to":"ff0f0b1f_27850409","updated":"2017-05-23 14:36:31.000000000","message":"Done","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":2473,"context_line":"            def is_r0(node):"},{"line_number":2474,"context_line":"                return node[\u0027region\u0027] \u003d\u003d 0"},{"line_number":2475,"context_line":""},{"line_number":2476,"context_line":"            object_ring \u003d self.app.get_object_ring(0)"},{"line_number":2477,"context_line":"            object_ring.max_more_nodes \u003d 100"},{"line_number":2478,"context_line":"            policy_conf \u003d self.app.get_conf(POLICIES[0])"},{"line_number":2479,"context_line":"            policy_conf.write_affinity_is_local_fn \u003d is_r0"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_47e118d0","line":2476,"range":{"start_line":2476,"start_character":51,"end_line":2476,"end_character":52},"updated":"2017-05-19 23:27:41.000000000","message":"This is just making the test more like the real, yeah?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9a6b162c6d0ed386e8a4c9343dc97d2afe8b167a","unresolved":false,"context_lines":[{"line_number":2473,"context_line":"            def is_r0(node):"},{"line_number":2474,"context_line":"                return node[\u0027region\u0027] \u003d\u003d 0"},{"line_number":2475,"context_line":""},{"line_number":2476,"context_line":"            object_ring \u003d self.app.get_object_ring(0)"},{"line_number":2477,"context_line":"            object_ring.max_more_nodes \u003d 100"},{"line_number":2478,"context_line":"            policy_conf \u003d self.app.get_conf(POLICIES[0])"},{"line_number":2479,"context_line":"            policy_conf.write_affinity_is_local_fn \u003d is_r0"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_1e3b669c","line":2476,"range":{"start_line":2476,"start_character":51,"end_line":2476,"end_character":52},"in_reply_to":"ff0f0b1f_47e118d0","updated":"2017-05-20 15:43:28.000000000","message":"yup","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"881a3cffaf5446aa2fc79c1de9cf9758745f6b51","unresolved":false,"context_lines":[{"line_number":4562,"context_line":"                                environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027POST\u0027},"},{"line_number":4563,"context_line":"                                headers\u003d{\u0027Content-Length\u0027: \u00275\u0027}, body\u003d\u002712345\u0027)"},{"line_number":4564,"context_line":"            controller \u003d ReplicatedObjectController("},{"line_number":4565,"context_line":"                self.app, \u0027account\u0027, \u0027container\u0027, \u0027object\u0027)"},{"line_number":4566,"context_line":"            req.environ[\u0027swift.authorize\u0027] \u003d authorize"},{"line_number":4567,"context_line":"            self.app.update_request(req)"},{"line_number":4568,"context_line":"            controller.POST(req)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_0704407a","line":4565,"updated":"2017-05-19 23:27:41.000000000","message":"? Doesn\u0027t actually matter, right?","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"9a6b162c6d0ed386e8a4c9343dc97d2afe8b167a","unresolved":false,"context_lines":[{"line_number":4562,"context_line":"                                environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027POST\u0027},"},{"line_number":4563,"context_line":"                                headers\u003d{\u0027Content-Length\u0027: \u00275\u0027}, body\u003d\u002712345\u0027)"},{"line_number":4564,"context_line":"            controller \u003d ReplicatedObjectController("},{"line_number":4565,"context_line":"                self.app, \u0027account\u0027, \u0027container\u0027, \u0027object\u0027)"},{"line_number":4566,"context_line":"            req.environ[\u0027swift.authorize\u0027] \u003d authorize"},{"line_number":4567,"context_line":"            self.app.update_request(req)"},{"line_number":4568,"context_line":"            controller.POST(req)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_be4b5a29","line":4565,"in_reply_to":"ff0f0b1f_0704407a","updated":"2017-05-20 15:43:28.000000000","message":"unintended","commit_id":"544a8edec2432a5f1a090e5592d21091c0394bc5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abcb3b720bb1b8fd33daa069e8b66bba09d27452","unresolved":false,"context_lines":[{"line_number":1340,"context_line":"                self.assertIs(expected_result, actual,"},{"line_number":1341,"context_line":"                              \"Expected %s but got %s for %s, policy %s\" %"},{"line_number":1342,"context_line":"                              (expected_result, actual, node, policy))"},{"line_number":1343,"context_line":"        return app"},{"line_number":1344,"context_line":""},{"line_number":1345,"context_line":"    def test_per_policy_conf_none_configured(self):"},{"line_number":1346,"context_line":"        conf_sections \u003d \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_a5d3f35f","line":1343,"updated":"2017-05-23 23:59:57.000000000","message":"Do we ever use the return now?","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0b12cd4da5f5193585271169056a410826c682ae","unresolved":false,"context_lines":[{"line_number":1340,"context_line":"                self.assertIs(expected_result, actual,"},{"line_number":1341,"context_line":"                              \"Expected %s but got %s for %s, policy %s\" %"},{"line_number":1342,"context_line":"                              (expected_result, actual, node, policy))"},{"line_number":1343,"context_line":"        return app"},{"line_number":1344,"context_line":""},{"line_number":1345,"context_line":"    def test_per_policy_conf_none_configured(self):"},{"line_number":1346,"context_line":"        conf_sections \u003d \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_2d40de06","line":1343,"in_reply_to":"ff0f0b1f_a5d3f35f","updated":"2017-05-24 08:09:06.000000000","message":"hmmm, maybe not","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"0269d8e6e2a2e94454de09f363a9c5ad9a48f252","unresolved":false,"context_lines":[{"line_number":1348,"context_line":"        use \u003d egg:swift#proxy"},{"line_number":1349,"context_line":"        \"\"\""},{"line_number":1350,"context_line":"        expected_default \u003d {\"read_affinity\": \"\","},{"line_number":1351,"context_line":"                            \"sorting_method\": \"shuffle\","},{"line_number":1352,"context_line":"                            \"write_affinity_node_count\": 6}"},{"line_number":1353,"context_line":"        exp_conf \u003d {None: expected_default,"},{"line_number":1354,"context_line":"                    POLICIES[0]: expected_default,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_1a92ce57","line":1351,"updated":"2017-05-25 07:52:45.000000000","message":"prehaps, adding \"write_affinity\": \"\" here is worth to check.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"0269d8e6e2a2e94454de09f363a9c5ad9a48f252","unresolved":false,"context_lines":[{"line_number":1349,"context_line":"        \"\"\""},{"line_number":1350,"context_line":"        expected_default \u003d {\"read_affinity\": \"\","},{"line_number":1351,"context_line":"                            \"sorting_method\": \"shuffle\","},{"line_number":1352,"context_line":"                            \"write_affinity_node_count\": 6}"},{"line_number":1353,"context_line":"        exp_conf \u003d {None: expected_default,"},{"line_number":1354,"context_line":"                    POLICIES[0]: expected_default,"},{"line_number":1355,"context_line":"                    POLICIES[1]: expected_default}"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_dfd32800","line":1352,"updated":"2017-05-25 07:52:45.000000000","message":"ok, 2 * replicas (3 replicas) in default.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"0269d8e6e2a2e94454de09f363a9c5ad9a48f252","unresolved":false,"context_lines":[{"line_number":1350,"context_line":"        expected_default \u003d {\"read_affinity\": \"\","},{"line_number":1351,"context_line":"                            \"sorting_method\": \"shuffle\","},{"line_number":1352,"context_line":"                            \"write_affinity_node_count\": 6}"},{"line_number":1353,"context_line":"        exp_conf \u003d {None: expected_default,"},{"line_number":1354,"context_line":"                    POLICIES[0]: expected_default,"},{"line_number":1355,"context_line":"                    POLICIES[1]: expected_default}"},{"line_number":1356,"context_line":"        exp_is_local \u003d {POLICIES[0]: None,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_3ac8f2a3","line":1353,"updated":"2017-05-25 07:52:45.000000000","message":"I was wondering why we need to support None here at first but it is necessary for account/container node iteration, i didn\u0027t notice it is affected by *read* affinity setting. So this looks correct.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"0269d8e6e2a2e94454de09f363a9c5ad9a48f252","unresolved":false,"context_lines":[{"line_number":1354,"context_line":"                    POLICIES[0]: expected_default,"},{"line_number":1355,"context_line":"                    POLICIES[1]: expected_default}"},{"line_number":1356,"context_line":"        exp_is_local \u003d {POLICIES[0]: None,"},{"line_number":1357,"context_line":"                        POLICIES[1]: None}"},{"line_number":1358,"context_line":"        app \u003d self._write_conf_and_load_app(conf_sections)"},{"line_number":1359,"context_line":"        self._check_policy_conf(app, exp_conf, exp_is_local)"},{"line_number":1360,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_1a488e2a","line":1357,"updated":"2017-05-25 07:52:45.000000000","message":"And that is why, is_local is checked only with policy args that write_affinity doesn\u0027t affect to the account/container PUT. Make sense.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abcb3b720bb1b8fd33daa069e8b66bba09d27452","unresolved":false,"context_lines":[{"line_number":1507,"context_line":"        sorting_method \u003d affinity"},{"line_number":1508,"context_line":"        \"\"\" % self.tempdir"},{"line_number":1509,"context_line":""},{"line_number":1510,"context_line":"        conf_path \u003d self._write_conf(conf_body)"},{"line_number":1511,"context_line":"        with mock.patch(\u0027swift.proxy.server.get_logger\u0027,"},{"line_number":1512,"context_line":"                        return_value\u003dFakeLogger()):"},{"line_number":1513,"context_line":"            app \u003d loadapp(conf_path, allow_modify_pipeline\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_3298481a","line":1510,"updated":"2017-05-23 23:59:57.000000000","message":"Why use _write_conf directly? Everywhere else we use _write_conf_and_load_app... I guess trying to avoid the undocumented merge-repeated-sections behavior?","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0b12cd4da5f5193585271169056a410826c682ae","unresolved":false,"context_lines":[{"line_number":1507,"context_line":"        sorting_method \u003d affinity"},{"line_number":1508,"context_line":"        \"\"\" % self.tempdir"},{"line_number":1509,"context_line":""},{"line_number":1510,"context_line":"        conf_path \u003d self._write_conf(conf_body)"},{"line_number":1511,"context_line":"        with mock.patch(\u0027swift.proxy.server.get_logger\u0027,"},{"line_number":1512,"context_line":"                        return_value\u003dFakeLogger()):"},{"line_number":1513,"context_line":"            app \u003d loadapp(conf_path, allow_modify_pipeline\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_adbe2efc","line":1510,"in_reply_to":"ff0f0b1f_3298481a","updated":"2017-05-24 08:09:06.000000000","message":"_write_conf_and_load_app inserts a DEFAULT section and here I want to put a \u0027custom\u0027 DEFAUT section. Rather than parametering the method more I felt it was clearer to write the conf explicitly in this case.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"0269d8e6e2a2e94454de09f363a9c5ad9a48f252","unresolved":false,"context_lines":[{"line_number":1507,"context_line":"        sorting_method \u003d affinity"},{"line_number":1508,"context_line":"        \"\"\" % self.tempdir"},{"line_number":1509,"context_line":""},{"line_number":1510,"context_line":"        conf_path \u003d self._write_conf(conf_body)"},{"line_number":1511,"context_line":"        with mock.patch(\u0027swift.proxy.server.get_logger\u0027,"},{"line_number":1512,"context_line":"                        return_value\u003dFakeLogger()):"},{"line_number":1513,"context_line":"            app \u003d loadapp(conf_path, allow_modify_pipeline\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_7ae8aa7a","line":1510,"in_reply_to":"ff0f0b1f_adbe2efc","updated":"2017-05-25 07:52:45.000000000","message":"Sounds reasonable.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"0269d8e6e2a2e94454de09f363a9c5ad9a48f252","unresolved":false,"context_lines":[{"line_number":1529,"context_line":"        exp_is_local \u003d {"},{"line_number":1530,"context_line":"            # default write_affinity is r0, dictated by DEFAULT section"},{"line_number":1531,"context_line":"            None: [({\u0027region\u0027: 0, \u0027zone\u0027: 2}, True),"},{"line_number":1532,"context_line":"                   ({\u0027region\u0027: 1, \u0027zone\u0027: 1}, False)],"},{"line_number":1533,"context_line":"            # policy 0 write_affinity is r2, dictated by policy 0 section"},{"line_number":1534,"context_line":"            POLICIES[0]: [({\u0027region\u0027: 0, \u0027zone\u0027: 2}, False),"},{"line_number":1535,"context_line":"                          ({\u0027region\u0027: 2, \u0027zone\u0027: 1}, True)],"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_bac082e2","line":1532,"updated":"2017-05-25 07:52:45.000000000","message":"So... this can be configured but never used in proxy server app. That is because policy\u003dNone is for account/container and account/container doesn\u0027t support write_affinity.\n\nOn the other hand, I suppose it\u0027s ok to keep this test and behavior for future possibility if we may want the staff. I\u0027m feeling keeping this is not so a big overhead for both running server and code maintenance.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":1536,"context_line":"            # policy 1 write_affinity is r0, inherited from default"},{"line_number":1537,"context_line":"            POLICIES[1]: [({\u0027region\u0027: 0, \u0027zone\u0027: 2}, True),"},{"line_number":1538,"context_line":"                          ({\u0027region\u0027: 1, \u0027zone\u0027: 1}, False)]}"},{"line_number":1539,"context_line":"        self._check_policy_conf(app, exp_conf, exp_is_local)"},{"line_number":1540,"context_line":""},{"line_number":1541,"context_line":"    def test_per_policy_conf_warns_about_sorting_method_mismatch(self):"},{"line_number":1542,"context_line":"        # verify that policy specific warnings are emitted when read_affinity"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_fa74baff","line":1539,"updated":"2017-05-25 05:21:14.000000000","message":"these tests with the writing the config are pretty good kudos","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"0269d8e6e2a2e94454de09f363a9c5ad9a48f252","unresolved":false,"context_lines":[{"line_number":1560,"context_line":"                                  \"sorting_method\": \"timing\"},"},{"line_number":1561,"context_line":"                    POLICIES[1]: {\"read_affinity\": \"r1\u003d1\","},{"line_number":1562,"context_line":"                                  \"sorting_method\": \"affinity\"}}"},{"line_number":1563,"context_line":"        app \u003d self._write_conf_and_load_app(conf_sections)"},{"line_number":1564,"context_line":"        self._check_policy_conf(app, exp_conf, {})"},{"line_number":1565,"context_line":"        lines \u003d app.logger.get_lines_for_level(\u0027warning\u0027)"},{"line_number":1566,"context_line":"        scopes \u003d {\u0027default\u0027, \u0027policy 0 (nulo)\u0027}"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_a21614a7","line":1563,"range":{"start_line":1563,"start_character":8,"end_line":1563,"end_character":58},"updated":"2017-05-25 07:52:45.000000000","message":"With this test, I found self._write_conf_and_load_app is doing loading the app twice and call check_config twice too but I have no idea why it happens.\n\nThe assertion from Line 1567 seems safe because the second logs are ignored by lines[:2] but not sure if that is a bug or not.","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"0269d8e6e2a2e94454de09f363a9c5ad9a48f252","unresolved":false,"context_lines":[{"line_number":1563,"context_line":"        app \u003d self._write_conf_and_load_app(conf_sections)"},{"line_number":1564,"context_line":"        self._check_policy_conf(app, exp_conf, {})"},{"line_number":1565,"context_line":"        lines \u003d app.logger.get_lines_for_level(\u0027warning\u0027)"},{"line_number":1566,"context_line":"        scopes \u003d {\u0027default\u0027, \u0027policy 0 (nulo)\u0027}"},{"line_number":1567,"context_line":"        for line in lines[:2]:"},{"line_number":1568,"context_line":"            self.assertIn("},{"line_number":1569,"context_line":"                \"sorting_method is set to \u0027timing\u0027, not \u0027affinity\u0027\", line)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_9c4ffb69","line":1566,"range":{"start_line":1566,"start_character":8,"end_line":1566,"end_character":14},"updated":"2017-05-25 07:52:45.000000000","message":"nits) this is not scopes anymore but labels","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9f0323b0bcdd025ab49140cef79dee3312eda4de","unresolved":false,"context_lines":[{"line_number":1566,"context_line":"        scopes \u003d {\u0027default\u0027, \u0027policy 0 (nulo)\u0027}"},{"line_number":1567,"context_line":"        for line in lines[:2]:"},{"line_number":1568,"context_line":"            self.assertIn("},{"line_number":1569,"context_line":"                \"sorting_method is set to \u0027timing\u0027, not \u0027affinity\u0027\", line)"},{"line_number":1570,"context_line":"            for scope in scopes:"},{"line_number":1571,"context_line":"                if scope in line:"},{"line_number":1572,"context_line":"                    scopes.remove(scope)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_3a58f285","line":1569,"updated":"2017-05-25 05:21:14.000000000","message":"boom an the logging per-policy warning behavior","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"0269d8e6e2a2e94454de09f363a9c5ad9a48f252","unresolved":false,"context_lines":[{"line_number":1576,"context_line":"        self.assertFalse(scopes)"},{"line_number":1577,"context_line":""},{"line_number":1578,"context_line":"    def test_per_policy_conf_with_unknown_policy(self):"},{"line_number":1579,"context_line":"        # verify that unknown policy section is warned about but doesn\u0027t break"},{"line_number":1580,"context_line":"        # other policy configs"},{"line_number":1581,"context_line":"        conf_sections \u003d \"\"\""},{"line_number":1582,"context_line":"        [app:proxy-server]"},{"line_number":1583,"context_line":"        use \u003d egg:swift#proxy"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_7fe2d9d6","line":1580,"range":{"start_line":1579,"start_character":65,"end_line":1580,"end_character":30},"updated":"2017-05-25 07:52:45.000000000","message":"Is this asserted?","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0f0d82f7919faec3b0ac6af1634f7e7ad9f18ff6","unresolved":false,"context_lines":[{"line_number":1576,"context_line":"        self.assertFalse(scopes)"},{"line_number":1577,"context_line":""},{"line_number":1578,"context_line":"    def test_per_policy_conf_with_unknown_policy(self):"},{"line_number":1579,"context_line":"        # verify that unknown policy section is warned about but doesn\u0027t break"},{"line_number":1580,"context_line":"        # other policy configs"},{"line_number":1581,"context_line":"        conf_sections \u003d \"\"\""},{"line_number":1582,"context_line":"        [app:proxy-server]"},{"line_number":1583,"context_line":"        use \u003d egg:swift#proxy"}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_b6dd36de","line":1580,"range":{"start_line":1579,"start_character":65,"end_line":1580,"end_character":30},"in_reply_to":"ff0f0b1f_7fe2d9d6","updated":"2017-05-25 10:51:52.000000000","message":"actually that comment is stale - previously the  unknow policy was ignored so other configs should have been loaded ok. Now we raise a ValueError so the comment makes no sense.\n\nFixed here https://review.openstack.org/467994 Add link from policies overview to per-policy proxy-server conf        \nremote:","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"abcb3b720bb1b8fd33daa069e8b66bba09d27452","unresolved":false,"context_lines":[{"line_number":1727,"context_line":"        \"\"\""},{"line_number":1728,"context_line":"        with self.assertRaises(ValueError) as cm:"},{"line_number":1729,"context_line":"            self._write_conf_and_load_app(conf_sections)"},{"line_number":1730,"context_line":"        self.assertIn(\"Override config must refer to policy index: \u0027uno\u0027\","},{"line_number":1731,"context_line":"                      cm.exception.message)"},{"line_number":1732,"context_line":""},{"line_number":1733,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ff0f0b1f_05497f2f","line":1730,"range":{"start_line":1730,"start_character":19,"end_line":1730,"end_character":21},"updated":"2017-05-23 23:59:57.000000000","message":"\"In\", or \"Equal\"?","commit_id":"45884c110210b8e940604520cfb0210c24b51b75"}]}
