)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f48d64c9fdba61d7bc2289deba2a40e4d78e1e18","unresolved":false,"context_lines":[{"line_number":10,"context_line":"for admin to track problems across projects."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Accroding to OpenStack HTTP Header Guidelines, use"},{"line_number":13,"context_line":"\u0027Openstack-Baremetal-Request-Id\u0027 instead of \u0027X-Openstack-Request-ID\u0027"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Accroding the suggestions from API WG, a microversion is not needed here."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa0719c6_97a96d7e","line":13,"updated":"2016-03-22 13:42:46.000000000","message":"This is not correct.\n\nFor request ids the header is \"OpenStack-Request-ID\" and that id should be be carried across the lifetime of a request (even if it traverses multiple projects).","commit_id":"6d7be8f40b799f887d56329c67c97adb9c5de27d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e72d204b58a824f27213a6432a7c4c93083f646f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jim Rollenhagen \u003cjim@jimrollenhagen.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-22 09:45:34 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Append \u0027Openstack-Baremetal-Request-ID\u0027 header to the response"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch will append request_id to response headers. This is helpful"},{"line_number":10,"context_line":"for admin to track problems across projects."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"fa0719c6_7b32b411","line":7,"updated":"2016-03-22 17:36:36.000000000","message":"s/Baremetal//","commit_id":"a4c32e609136b3148d03dc0e43e73a42e0e4089e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e72d204b58a824f27213a6432a7c4c93083f646f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"for admin to track problems across projects."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Accroding to OpenStack HTTP Header Guidelines, use"},{"line_number":13,"context_line":"\u0027Openstack-Baremetal-Request-Id\u0027 instead of \u0027X-Openstack-Request-ID\u0027"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Accroding the suggestions from API WG, a microversion is not needed here."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"fa0719c6_9b3fc8d5","line":13,"updated":"2016-03-22 17:36:36.000000000","message":"ditto","commit_id":"a4c32e609136b3148d03dc0e43e73a42e0e4089e"}],"doc/source/webapi/v1.rst":[{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"f831778f0a10fdfff9884ad2ac531a13610d214a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    ``CLEANWAIT`` state."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"**1.12**"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This API version adds the following the following abilities:"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    * Get/set ``node.target_raid_config`` and to get"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3a29b11f_e3dcee74","line":50,"updated":"2015-10-21 18:55:08.000000000","message":"Also since you\u0027re doing this, could you please fix this annoying bit? (:\n\ns/the following the following/the following","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"da8d59c19f1b7a94816af5d5f3167577c8c5429b","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    ``CLEANWAIT`` state."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"**1.12**"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This API version adds the following the following abilities:"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    * Get/set ``node.target_raid_config`` and to get"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa80f949_6f7c0621","line":50,"in_reply_to":"1a26ad4f_ce255509","updated":"2015-11-03 14:10:52.000000000","message":"Thank you! (:","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"7f44076718e8fc5e0f5759c9e813dd9c6f70a3c4","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    ``CLEANWAIT`` state."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"**1.12**"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This API version adds the following the following abilities:"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    * Get/set ``node.target_raid_config`` and to get"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_ce255509","line":50,"in_reply_to":"3a29b11f_e3dcee74","updated":"2015-11-03 03:33:14.000000000","message":"Done","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"}],"ironic/api/hooks.py":[{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"f831778f0a10fdfff9884ad2ac531a13610d214a","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def after(self, state):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warn(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_037a4a77","line":99,"updated":"2015-10-21 18:55:08.000000000","message":"Didn\u0027t see a test case for this.","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"da8d59c19f1b7a94816af5d5f3167577c8c5429b","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def after(self, state):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warn(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_efd23634","line":99,"in_reply_to":"1a26ad4f_2e1ac97d","updated":"2015-11-03 14:10:52.000000000","message":"I usually provide test cases for such scenarios to assure the right exception is being caught given the failure of the try block. Sure is just a log.. I would still do it, but I think you have a point. Let me know what you think.","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"7f44076718e8fc5e0f5759c9e813dd9c6f70a3c4","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def after(self, state):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warn(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_2e1ac97d","line":99,"in_reply_to":"3a29b11f_037a4a77","updated":"2015-11-03 03:33:14.000000000","message":"hmmm, I am not quite understand why do we need test this, there is no change here, it only log something.","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"f831778f0a10fdfff9884ad2ac531a13610d214a","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warn(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_a32fd686","line":100,"updated":"2015-10-21 18:55:08.000000000","message":"Think I just saw a patch attempting to mitigate depracated \u0027warn\u0027 calls.\ns/LOG.warn/LOG.warning","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"b47809c68b310a324ba1cd3e1f360fdd940f2342","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warn(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_dc0dcf8f","line":100,"in_reply_to":"3a29b11f_08a469b7","updated":"2015-10-23 09:47:47.000000000","message":"+1, Log.warn is deprecated. for standalone, seems request id is not needed but when working with openstack, it\u0027s really useful for cross-project debugging.","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"94bafe145f077f443fd24edeadbf26775fb1ea37","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warn(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_08a469b7","line":100,"in_reply_to":"3a29b11f_a32fd686","updated":"2015-10-23 07:25:12.000000000","message":"+1. I am not sure if it should be a logged at all.  If Ironic is used standalone, will we have this request id ?","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"7f44076718e8fc5e0f5759c9e813dd9c6f70a3c4","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warn(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_6efa0145","line":100,"in_reply_to":"3a29b11f_dc0dcf8f","updated":"2015-11-03 03:33:14.000000000","message":"request id is also useful for debugging with standalone, I think. Each API request has an unique id and admin can use this to track the problem internal. What I did here is expose the existed request id to other projects.","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"acdfd6e19d186e2df46bf7a85348211475399e72","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def after(self, state):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warning(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_b14d4874","line":99,"updated":"2015-11-04 12:25:08.000000000","message":"Referring to Lilia\u0027s comment on the previous patch set I also think there should be a test case for this exception because not just logging the warning, its also preventing the exception from being raised to the calling function and not setting the response header. I would add a test case that ensures that if the request_id does not exist that the function doesn\u0027t throw an exception and that the header isn\u0027t set.","commit_id":"5de7bc64371b3bb1ea0fcd2a7b61fd78345823b9"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8984c6543feed7176fcf24498bded89ff6fe68ab","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def after(self, state):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warning(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_d8b77a38","line":99,"in_reply_to":"fa80f949_9ca138ac","updated":"2015-11-06 07:58:58.000000000","message":"OK, this make sense. Thanks","commit_id":"5de7bc64371b3bb1ea0fcd2a7b61fd78345823b9"},{"author":{"_account_id":14891,"name":"Lilia Sampaio","email":"liliars@lsd.ufcg.edu.br","username":"liliars"},"change_message_id":"f48c4dcd86576a08f62a29ff51b0e0c17a238593","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def after(self, state):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warning(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_9ca138ac","line":99,"in_reply_to":"fa80f949_b14d4874","updated":"2015-11-04 14:15:29.000000000","message":"+1\n\nHaven\u0027t considered some of these other things Sam pointed. In this case, \"sure is *not* just a log\" (:","commit_id":"5de7bc64371b3bb1ea0fcd2a7b61fd78345823b9"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"73ac9382a254f3aa15adc2630583566f9fc0eb60","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warning(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_8646c521","line":100,"updated":"2015-11-04 13:19:56.000000000","message":"Agree with Ramakrishnan comment on previous patchset. For standalone Ironic request id is not mandatory for client. Too many unneeded warnings will be in the log for this case.","commit_id":"5de7bc64371b3bb1ea0fcd2a7b61fd78345823b9"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8984c6543feed7176fcf24498bded89ff6fe68ab","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        except AttributeError:"},{"line_number":100,"context_line":"            LOG.warning(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_9767864c","line":100,"in_reply_to":"fa80f949_8646c521","updated":"2015-11-06 07:58:58.000000000","message":"Maybe we or only I have a misunderstand here. \u0027Standalone Ironic\u0027 also need a context for each request, right? Each context will generate a request_id.\n https://github.com/openstack/oslo.context/blob/master/oslo_context/context.py#L64-L65\nSo there should no be many warning here. Only if user send request to wrong API URI which missing a context create:\n  ironic.tests.unit.api.test_base.TestBase.test_bad_uri","commit_id":"5de7bc64371b3bb1ea0fcd2a7b61fd78345823b9"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3265a4f656338da5589eddc202cc769681a3d303","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def after(self, state):"},{"line_number":97,"context_line":"        return_request_id \u003d state.request.environ.get(\u0027return_request_id\u0027,"},{"line_number":98,"context_line":"                                                      False)"},{"line_number":99,"context_line":"        if return_request_id is True:"},{"line_number":100,"context_line":"            try:"},{"line_number":101,"context_line":"                request_id \u003d state.request.context.request_id"},{"line_number":102,"context_line":"            except AttributeError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_d3897727","line":99,"updated":"2016-01-05 17:21:12.000000000","message":"better:\n\n if not return_request_id:\n   return","commit_id":"1b476ac29f046636d8b810736a125afc995a6345"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"ebe99b44b2d98a49a1386bdd8f6bc3345173963a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            try:"},{"line_number":101,"context_line":"                request_id \u003d state.request.context.request_id"},{"line_number":102,"context_line":"            except AttributeError:"},{"line_number":103,"context_line":"                LOG.warning(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":104,"context_line":"            else:"},{"line_number":105,"context_line":"                state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_a3ba0309","line":103,"updated":"2016-01-16 15:56:00.000000000","message":"I don\u0027t think this does what you think it does.\n\nFirstly, if this logged a warning every time a request lacked this header, it would overwhelm log files. The header is optional -- there shouldn\u0027t be any warning if it\u0027s missing.\n\nSecondly, this doesn\u0027t do anything today. Test by sending an API request with no header -- and no warning is issued. By the time control reaches after(), the context already has a request_id.","commit_id":"1b476ac29f046636d8b810736a125afc995a6345"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3265a4f656338da5589eddc202cc769681a3d303","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            try:"},{"line_number":101,"context_line":"                request_id \u003d state.request.context.request_id"},{"line_number":102,"context_line":"            except AttributeError:"},{"line_number":103,"context_line":"                LOG.warning(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":104,"context_line":"            else:"},{"line_number":105,"context_line":"                state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_f38efb2c","line":103,"updated":"2016-01-05 17:21:12.000000000","message":"is it really a warning? what does it mean for an operator?","commit_id":"1b476ac29f046636d8b810736a125afc995a6345"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"cb46e1535f4db19111fea51ee2306139e48dfd6d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            try:"},{"line_number":101,"context_line":"                request_id \u003d state.request.context.request_id"},{"line_number":102,"context_line":"            except AttributeError:"},{"line_number":103,"context_line":"                LOG.warning(_LW(\u0027Unable to obtain request id from context\u0027))"},{"line_number":104,"context_line":"            else:"},{"line_number":105,"context_line":"                state.response.headers[\u0027x-openstack-request-id\u0027] \u003d request_id"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da6ed579_c77b7128","line":103,"in_reply_to":"da6ed579_a3ba0309","updated":"2016-01-18 01:12:02.000000000","message":"I agree, in most cases, the context will create a request_id if not provide from others. But in some tests, mock context manager is missing the create function, so this is for passing tests currently.","commit_id":"1b476ac29f046636d8b810736a125afc995a6345"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f48d64c9fdba61d7bc2289deba2a40e4d78e1e18","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            return"},{"line_number":96,"context_line":"        # NOTE(lintan): RequestContext will generate a request_id if no one"},{"line_number":97,"context_line":"        # passing outside, so it always contain a request_id."},{"line_number":98,"context_line":"        request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        state.response.headers[\u0027Openstack-Baremetal-Request-ID\u0027] \u003d request_id"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa0719c6_b72111fe","line":98,"updated":"2016-03-22 13:42:46.000000000","message":"Does the context accept an existing request_id header in the request request headers and store that here, so that incoming requests that have request ids are preserved?","commit_id":"6d7be8f40b799f887d56329c67c97adb9c5de27d"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"5e5aa1e77eab7e69c95430d28dccb9b4561dca47","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            return"},{"line_number":96,"context_line":"        # NOTE(lintan): RequestContext will generate a request_id if no one"},{"line_number":97,"context_line":"        # passing outside, so it always contain a request_id."},{"line_number":98,"context_line":"        request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        state.response.headers[\u0027Openstack-Baremetal-Request-ID\u0027] \u003d request_id"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa0719c6_fabc106e","line":98,"in_reply_to":"fa0719c6_b72111fe","updated":"2016-03-22 13:45:37.000000000","message":"We\u0027ve discussed this and it seems like support for this among projects isn\u0027t widespread yet, and so we haven\u0027t yet decided to do this. We may do it later, but this patch is focusing on returning the request ID in the response. Baby steps :)","commit_id":"6d7be8f40b799f887d56329c67c97adb9c5de27d"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"e7171056fadfe3ed996a44b4aac4667007ce8a7f","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        # NOTE(lintan): RequestContext will generate a request_id if no one"},{"line_number":97,"context_line":"        # passing outside, so it always contain a request_id."},{"line_number":98,"context_line":"        request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        state.response.headers[\u0027Openstack-Baremetal-Request-ID\u0027] \u003d request_id"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class RPCHook(hooks.PecanHook):"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa0719c6_4578bec4","line":99,"updated":"2016-03-22 13:17:54.000000000","message":"Hm, I was thinking about using \"OpenStack-Request-ID\". I do see the header document recommends putting the service type in the header to avoid conflicts, but I think in this case we explicitly want this to become a standard among projects.\n\nIn any case, it should be \"OpenStack\", not \"Openstack\".","commit_id":"6d7be8f40b799f887d56329c67c97adb9c5de27d"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f48d64c9fdba61d7bc2289deba2a40e4d78e1e18","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        # NOTE(lintan): RequestContext will generate a request_id if no one"},{"line_number":97,"context_line":"        # passing outside, so it always contain a request_id."},{"line_number":98,"context_line":"        request_id \u003d state.request.context.request_id"},{"line_number":99,"context_line":"        state.response.headers[\u0027Openstack-Baremetal-Request-ID\u0027] \u003d request_id"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class RPCHook(hooks.PecanHook):"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa0719c6_d72e45f9","line":99,"in_reply_to":"fa0719c6_4578bec4","updated":"2016-03-22 13:42:46.000000000","message":"Jim\u0027s right here. It should be the shorter form.\n\nFor reference header names are case insensitive, so while it is nice for it to be OpenStack, it doesn\u0027t signify anything about the header.","commit_id":"6d7be8f40b799f887d56329c67c97adb9c5de27d"}],"ironic/tests/unit/api/test_hooks.py":[{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"b47809c68b310a324ba1cd3e1f360fdd940f2342","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        reqstate.set_context()"},{"line_number":256,"context_line":"        context_hook \u003d hooks.ContextHook(None)"},{"line_number":257,"context_line":"        context_hook.after(reqstate)"},{"line_number":258,"context_line":"        self.assertIn(\u0027x-openstack-request-id\u0027, reqstate.response.headers)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"class TestTrustedCallHook(base.BaseApiTest):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_17532018","line":258,"updated":"2015-10-23 09:47:47.000000000","message":"seems it\u0027s better to use assertEqual to check response.headers\u0027 x-openstack-request-id equals to reqstate request_id.","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3ffd79f64b085b8ec33fdd31bfa7578404f06afa","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        reqstate.set_context()"},{"line_number":256,"context_line":"        context_hook \u003d hooks.ContextHook(None)"},{"line_number":257,"context_line":"        context_hook.after(reqstate)"},{"line_number":258,"context_line":"        self.assertIn(\u0027x-openstack-request-id\u0027, reqstate.response.headers)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"class TestTrustedCallHook(base.BaseApiTest):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_83912855","line":258,"in_reply_to":"3a29b11f_17532018","updated":"2015-10-23 15:35:59.000000000","message":"Or do both.","commit_id":"b6d2985f35c9947eb57a5b2d17d03844a752b4ba"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"5aa6625f614477462ea39733293108e57a6c4b1c","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        reqstate \u003d FakeRequestState(headers\u003dheaders)"},{"line_number":292,"context_line":"        reqstate.set_context()"},{"line_number":293,"context_line":"        reqstate.request.context.request_id \u003d \u0027fake-id\u0027"},{"line_number":294,"context_line":"        reqstate.request.environ[\u0027return_request_id\u0027] \u003d True"},{"line_number":295,"context_line":"        context_hook \u003d hooks.ContextHook(None)"},{"line_number":296,"context_line":"        context_hook.after(reqstate)"},{"line_number":297,"context_line":"        self.assertIn(\u0027X-Openstack-Request-ID\u0027, reqstate.response.headers)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_0bf717d4","line":294,"range":{"start_line":294,"start_character":8,"end_line":294,"end_character":60},"updated":"2016-03-16 08:09:12.000000000","message":"missing test cases for request headers with the api version that can set this.","commit_id":"e408090837dd876fe79f965533ff45a2ed2925c8"}]}
