)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"8fb6ed515d3ce7227dbd84d6f8f51bd1092a8611","unresolved":false,"context_lines":[{"line_number":10,"context_line":"get_object_info, then the results of that call would be cached in the"},{"line_number":11,"context_line":"WSGI environment as top-level keys. This is okay, except that if you,"},{"line_number":12,"context_line":"in middleware, copy the WSGI environment and then make a subrequest"},{"line_number":13,"context_line":"using the copy, information retrieved in the subrequest isn\u0027t cached"},{"line_number":14,"context_line":"only in the copy and not in the original. This can mean lots of extra"},{"line_number":15,"context_line":"trips to memcache for, say, SLO validation where the segments are in"},{"line_number":16,"context_line":"another container; the object HEAD ends up getting container info for"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a061dce_9cc9ca5d","line":13,"range":{"start_line":13,"start_character":56,"end_line":13,"end_character":61},"updated":"2016-04-08 15:40:37.000000000","message":"is?","commit_id":"3024085d10f0f2af1b915b30f7d79c87f7cf17e3"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"8fb6ed515d3ce7227dbd84d6f8f51bd1092a8611","unresolved":false,"context_lines":[{"line_number":348,"context_line":"    # This allows caching both account and container and ensures that when we"},{"line_number":349,"context_line":"    # copy this env to form a new request, it won\u0027t accidentally reuse the"},{"line_number":350,"context_line":"    # old container or account info"},{"line_number":351,"context_line":"    env_key \u003d \u0027swift.%s\u0027 % cache_key"},{"line_number":352,"context_line":"    return cache_key, env_key"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a061dce_81cde75f","line":351,"updated":"2016-04-08 15:40:37.000000000","message":"maybe \u0027swift.\u0027 is not needed anymore?","commit_id":"3024085d10f0f2af1b915b30f7d79c87f7cf17e3"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"8fb6ed515d3ce7227dbd84d6f8f51bd1092a8611","unresolved":false,"context_lines":[{"line_number":361,"context_line":"    :param obj: The name of the object"},{"line_number":362,"context_line":"    :returns: a string env_key"},{"line_number":363,"context_line":"    \"\"\""},{"line_number":364,"context_line":"    env_key \u003d \u0027swift.object/%s/%s/%s\u0027 % (account,"},{"line_number":365,"context_line":"                                         container, obj)"},{"line_number":366,"context_line":"    return env_key"},{"line_number":367,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a061dce_5c0e12e6","line":364,"updated":"2016-04-08 15:40:37.000000000","message":"same here","commit_id":"3024085d10f0f2af1b915b30f7d79c87f7cf17e3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"bfd458b68336a92f224021afde8a075c137e22ed","unresolved":false,"context_lines":[{"line_number":435,"context_line":"    env_key \u003d get_object_env_key(account, container, obj)"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    if \u0027swift.infocache\u0027 in env and not resp:"},{"line_number":438,"context_line":"        env[\u0027swift.infocache\u0027].pop(env_key, None)"},{"line_number":439,"context_line":"        return"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"    info \u003d headers_to_object_info(resp.headers, resp.status_int)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_c9ae732d","line":438,"updated":"2016-04-26 16:28:44.000000000","message":"Since we\u0027re still setting env[env_key] in _get_info_cache, should we still have a\n\n env.pop(env_key, None)\n\nhere?","commit_id":"3024085d10f0f2af1b915b30f7d79c87f7cf17e3"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"65edb428136372c6095748dc37ac3804140665b5","unresolved":false,"context_lines":[{"line_number":435,"context_line":"    env_key \u003d get_object_env_key(account, container, obj)"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    if \u0027swift.infocache\u0027 in env and not resp:"},{"line_number":438,"context_line":"        env[\u0027swift.infocache\u0027].pop(env_key, None)"},{"line_number":439,"context_line":"        return"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"    info \u003d headers_to_object_info(resp.headers, resp.status_int)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_b929a99d","line":438,"in_reply_to":"1a122d0e_c9ae732d","updated":"2016-04-29 20:47:26.000000000","message":"This will be fixed when we stop setting env[env_key].","commit_id":"3024085d10f0f2af1b915b30f7d79c87f7cf17e3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"bfd458b68336a92f224021afde8a075c137e22ed","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                    for subkey, value in info[key].items():"},{"line_number":479,"context_line":"                        if isinstance(value, six.text_type):"},{"line_number":480,"context_line":"                            info[key][subkey] \u003d value.encode(\"utf-8\")"},{"line_number":481,"context_line":"            env[env_key] \u003d info"},{"line_number":482,"context_line":"            env.setdefault(\u0027swift.infocache\u0027, {})[env_key] \u003d info"},{"line_number":483,"context_line":"        return info"},{"line_number":484,"context_line":"    return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_49f4235a","line":481,"updated":"2016-04-26 16:28:44.000000000","message":"Why still set env[env_key]? Backwards-compat for middleware? Why *don\u0027t* we also set it in _set_object_info_cache?\n\nAt any rate, I suppose this is why we still need \"swift.\" in the env_key, Thiago.","commit_id":"3024085d10f0f2af1b915b30f7d79c87f7cf17e3"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"65edb428136372c6095748dc37ac3804140665b5","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                    for subkey, value in info[key].items():"},{"line_number":479,"context_line":"                        if isinstance(value, six.text_type):"},{"line_number":480,"context_line":"                            info[key][subkey] \u003d value.encode(\"utf-8\")"},{"line_number":481,"context_line":"            env[env_key] \u003d info"},{"line_number":482,"context_line":"            env.setdefault(\u0027swift.infocache\u0027, {})[env_key] \u003d info"},{"line_number":483,"context_line":"        return info"},{"line_number":484,"context_line":"    return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_19325d10","line":481,"in_reply_to":"1a122d0e_49f4235a","updated":"2016-04-29 20:47:26.000000000","message":"Nope, not backwards compatibility or anything useful. I just missed this line. I\u0027ll delete it in the next patch set.","commit_id":"3024085d10f0f2af1b915b30f7d79c87f7cf17e3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0d61f7101197198302cf634f179d3854e147000d","unresolved":false,"context_lines":[{"line_number":501,"context_line":""},{"line_number":502,"context_line":"    # Make per-request caching work if possible"},{"line_number":503,"context_line":"    if \u0027swift.infocache\u0027 in env:"},{"line_number":504,"context_line":"        newenv[\u0027swift.infocache\u0027] \u003d env[\u0027swift.infocache\u0027]"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    # Note that Request.blank expects quoted path"},{"line_number":507,"context_line":"    return Request.blank(quote(path), environ\u003dnewenv)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_7be7a6ac","line":504,"updated":"2016-05-12 21:56:39.000000000","message":"Hey, we don\u0027t actually need this! Since we fixed up make_env in wsgi.py, make_pre_authed_env got it for free!","commit_id":"bf52035f604664a442a7a69b8aae23d37e2ef1fb"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"dda555edbdf62a585fbfe57acaf9e1b14155acfd","unresolved":false,"context_lines":[{"line_number":501,"context_line":""},{"line_number":502,"context_line":"    # Make per-request caching work if possible"},{"line_number":503,"context_line":"    if \u0027swift.infocache\u0027 in env:"},{"line_number":504,"context_line":"        newenv[\u0027swift.infocache\u0027] \u003d env[\u0027swift.infocache\u0027]"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    # Note that Request.blank expects quoted path"},{"line_number":507,"context_line":"    return Request.blank(quote(path), environ\u003dnewenv)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_3eeeabec","line":504,"in_reply_to":"dab17558_7be7a6ac","updated":"2016-05-13 17:37:28.000000000","message":"Done","commit_id":"bf52035f604664a442a7a69b8aae23d37e2ef1fb"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"ca1bd1081dd5b96742a0779034e21e2a4ffa3441","unresolved":false,"context_lines":[{"line_number":507,"context_line":"    return Request.blank(quote(path), environ\u003dnewenv)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"def get_info(app, env, account, container\u003dNone, ret_not_found\u003dFalse,"},{"line_number":511,"context_line":"             swift_source\u003dNone):"},{"line_number":512,"context_line":"    \"\"\""},{"line_number":513,"context_line":"    Get the info about accounts or containers"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_5bec628f","line":510,"range":{"start_line":510,"start_character":48,"end_line":510,"end_character":61},"updated":"2016-05-12 22:03:40.000000000","message":"in case this patch needs another patchet, can you document ret_not_found and swift_source? otherwise I can just send a follow-on patch...","commit_id":"bf52035f604664a442a7a69b8aae23d37e2ef1fb"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"dda555edbdf62a585fbfe57acaf9e1b14155acfd","unresolved":false,"context_lines":[{"line_number":507,"context_line":"    return Request.blank(quote(path), environ\u003dnewenv)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"def get_info(app, env, account, container\u003dNone, ret_not_found\u003dFalse,"},{"line_number":511,"context_line":"             swift_source\u003dNone):"},{"line_number":512,"context_line":"    \"\"\""},{"line_number":513,"context_line":"    Get the info about accounts or containers"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_de567f05","line":510,"in_reply_to":"dab17558_5bec628f","updated":"2016-05-13 17:37:28.000000000","message":"I\u0027ll chuck them in here, but I\u0027ve got a second patch in this chain that removes them entirely (since they\u0027re not really particularly useful).","commit_id":"bf52035f604664a442a7a69b8aae23d37e2ef1fb"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"ca1bd1081dd5b96742a0779034e21e2a4ffa3441","unresolved":false,"context_lines":[{"line_number":545,"context_line":"    cache_key, env_key \u003d _get_cache_key(account, container)"},{"line_number":546,"context_line":"    try:"},{"line_number":547,"context_line":"        info \u003d resp.environ[\u0027swift.infocache\u0027][env_key]"},{"line_number":548,"context_line":"        env.setdefault(\u0027swift.infocache\u0027, {})[env_key] \u003d info"},{"line_number":549,"context_line":"        if ret_not_found or is_success(info[\u0027status\u0027]):"},{"line_number":550,"context_line":"            return info"},{"line_number":551,"context_line":"    except (KeyError, AttributeError):"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_9bd7eabe","line":548,"updated":"2016-05-12 22:03:40.000000000","message":"so we are only setting the caller\u0027s env info care because we don\u0027t need to set memcache, right? memcache was set by GETorHEAD_base...","commit_id":"bf52035f604664a442a7a69b8aae23d37e2ef1fb"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"dda555edbdf62a585fbfe57acaf9e1b14155acfd","unresolved":false,"context_lines":[{"line_number":545,"context_line":"    cache_key, env_key \u003d _get_cache_key(account, container)"},{"line_number":546,"context_line":"    try:"},{"line_number":547,"context_line":"        info \u003d resp.environ[\u0027swift.infocache\u0027][env_key]"},{"line_number":548,"context_line":"        env.setdefault(\u0027swift.infocache\u0027, {})[env_key] \u003d info"},{"line_number":549,"context_line":"        if ret_not_found or is_success(info[\u0027status\u0027]):"},{"line_number":550,"context_line":"            return info"},{"line_number":551,"context_line":"    except (KeyError, AttributeError):"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_a1e8bc17","line":548,"in_reply_to":"dab17558_9bd7eabe","updated":"2016-05-13 17:37:28.000000000","message":"That\u0027s correct. We don\u0027t want to double-set memcache stuff since it\u0027s extra network traffic.","commit_id":"bf52035f604664a442a7a69b8aae23d37e2ef1fb"}],"test/unit/proxy/controllers/test_base.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0d61f7101197198302cf634f179d3854e147000d","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        self.assertEqual([e[\u0027swift.source\u0027] for e in app.captured_envs],"},{"line_number":436,"context_line":"                         [\u0027MC\u0027])"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    def test_get_account_info_infocache(self):"},{"line_number":439,"context_line":"        app \u003d FakeApp()"},{"line_number":440,"context_line":"        ic \u003d {}"},{"line_number":441,"context_line":"        req \u003d Request.blank(\"/v1/a\", environ\u003d{\u0027swift.cache\u0027: FakeCache(),"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_bb010e3c","line":438,"updated":"2016-05-12 21:56:39.000000000","message":"...and I could tell because this still passes without the\n\n newenv[\u0027swift.infocache\u0027] \u003d env[\u0027swift.infocache\u0027]\n\nthat\u0027s in patchset 7 but not 6.","commit_id":"bf52035f604664a442a7a69b8aae23d37e2ef1fb"}]}
