)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"1ac2f675981ae415e197c00117b93eec1dcc9d29","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"43ba1f08_be388221","updated":"2022-09-09 01:42:15.000000000","message":"Thank you for your reviews Dmitry and Julia! Further comments inline.","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"47593177f2b31b43160fa3665b8a6c04103e412e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"38cdd609_2efb75ec","updated":"2022-09-06 22:28:36.000000000","message":"recheck","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"1fd621beca1ad6e669af5ed071470582ff1dee9c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"781a7360_1169adfc","updated":"2022-09-06 13:58:58.000000000","message":"work in progress, submitting for early feedback","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"64c8e1f965ab339436b582ec4c9ec192066f198d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"82fbaf55_89a37fc4","updated":"2022-09-12 05:01:27.000000000","message":"recheck","commit_id":"4e9e40f9f7a9c8bbb83dddd000c9410177e43bdb"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"dcac5ed06001eaa8075ff3775b48944d4f9db2b5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a00d6981_3bb2e20a","updated":"2022-09-12 22:16:09.000000000","message":"Resolved some comments","commit_id":"073a9ba809bc0108d335eb65ce9fa3a9cd6eec43"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"da9771ccda4a7ae0c9453abb2fc89c0f8ae3a396","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e08d7ebc_a0d88753","updated":"2022-09-13 11:37:14.000000000","message":"Addressed the two outstanding comments and adding a release note. Let\u0027s re-run CI with the additional eTag parameter. Now moving to unit tests.","commit_id":"2e7912473a22530a1728ba1a3824ea6037b6151b"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"3c0a7633bba48a23dac79c867d13bf824c9a7555","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"2231313e_8341b9d9","updated":"2022-10-19 06:45:41.000000000","message":"looks good at a glance, the -1 is mainly to not forget the test leftovers","commit_id":"53fb87c9221b996e9b509a85814f17afe260f94d"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"15b59a9a2e00e6db6e2c659b18165f8313b36262","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"1b19b64c_90aeebd2","in_reply_to":"2231313e_8341b9d9","updated":"2022-10-19 10:32:18.000000000","message":"Thank you for your review and very helpful comments Riccardo!","commit_id":"53fb87c9221b996e9b509a85814f17afe260f94d"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"fb2c1a0bc9497d30cf3370e0343fc0861eb8cdd4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"aa876aa4_f50772a2","updated":"2022-10-21 12:33:01.000000000","message":"Thank you for your review Dmitry. Uploading a new patch with the easy issues resolved. I have some follow up questions - see responses.","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"56d74c4806eaa2e4c911f05d8d5befb10ec00a14","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"fc65c06e_31513272","updated":"2022-10-24 04:43:11.000000000","message":"Thank you for your review Dmitry. Comments below.","commit_id":"dbc445a17d425f0a336aee7f4dd3ee9cb49fb613"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ba5c9926d3b6d7b130ed386cab44fdb2b6e1c240","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"bf901880_d5c1172e","updated":"2022-10-24 10:11:00.000000000","message":"Thank you for your reviews and comments Dmitry and Riccardo, will upload a revised patch shortly.","commit_id":"dbc445a17d425f0a336aee7f4dd3ee9cb49fb613"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b50ed1915e7878244284dd8520ffa9b0d098f4a6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"2515b041_b5c015f3","updated":"2022-10-26 12:52:13.000000000","message":"Thank you for your comments Dmitry, responses in-line, will upload a revised version shortly.","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"}],"sushy/connector.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"18b795a9afef2970bc746e8d5c1c0e70342f33f2","unresolved":true,"context_lines":[{"line_number":287,"context_line":"        :raises: HTTPError"},{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":"        if headers:"},{"line_number":290,"context_line":"            etag \u003d headers.get(\u0027If-Match\u0027)"},{"line_number":291,"context_line":"        if etag:"},{"line_number":292,"context_line":"            try:"},{"line_number":293,"context_line":"                response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"}],"source_content_type":"text/x-python","patch_set":1,"id":"8f4bf5a6_26594868","line":290,"updated":"2022-09-06 14:08:40.000000000","message":"Let\u0027s probably have an explicit argument?","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"c884bf1a0365ce577355070843c91251193a5ae6","unresolved":true,"context_lines":[{"line_number":287,"context_line":"        :raises: HTTPError"},{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":"        if headers:"},{"line_number":290,"context_line":"            etag \u003d headers.get(\u0027If-Match\u0027)"},{"line_number":291,"context_line":"        if etag:"},{"line_number":292,"context_line":"            try:"},{"line_number":293,"context_line":"                response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bb67b812_56ab33ca","line":290,"in_reply_to":"8f4bf5a6_26594868","updated":"2022-09-09 04:02:49.000000000","message":"Thank you Dmitry. Should this be instead of or in addition to headers (I\u0027m assuming the latter, as there may be non-eTag headers)?","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"da9771ccda4a7ae0c9453abb2fc89c0f8ae3a396","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        :raises: HTTPError"},{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":"        if headers:"},{"line_number":290,"context_line":"            etag \u003d headers.get(\u0027If-Match\u0027)"},{"line_number":291,"context_line":"        if etag:"},{"line_number":292,"context_line":"            try:"},{"line_number":293,"context_line":"                response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"}],"source_content_type":"text/x-python","patch_set":1,"id":"8482fdee_001320dc","line":290,"in_reply_to":"9a1eac87_7c461065","updated":"2022-09-13 11:37:14.000000000","message":"Done.","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"45f41bc4187ad29464ce368885309c60c4f5a4bc","unresolved":true,"context_lines":[{"line_number":287,"context_line":"        :raises: HTTPError"},{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":"        if headers:"},{"line_number":290,"context_line":"            etag \u003d headers.get(\u0027If-Match\u0027)"},{"line_number":291,"context_line":"        if etag:"},{"line_number":292,"context_line":"            try:"},{"line_number":293,"context_line":"                response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1eac87_7c461065","line":290,"in_reply_to":"bb67b812_56ab33ca","updated":"2022-09-13 11:00:57.000000000","message":"Yep, there may be other headers","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"18b795a9afef2970bc746e8d5c1c0e70342f33f2","unresolved":true,"context_lines":[{"line_number":296,"context_line":"                                    **extra_session_req_kwargs)"},{"line_number":297,"context_line":"            except exceptions.HTTPError as resp:"},{"line_number":298,"context_line":"                LOG.warning(\"Initial request with eTag failed,\""},{"line_number":299,"context_line":"                            \" trying workarounds.\")"},{"line_number":300,"context_line":"                if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":301,"context_line":"                    # checking for weak eTag"},{"line_number":302,"context_line":"                    pattern \u003d re.compile(r\u0027^(W\\/)(\"\\w*\")$\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7d4637ba_26224285","line":299,"updated":"2022-09-06 14:08:40.000000000","message":"This will need more details in the final version.\n\nA thought: do we need to cache which approach worked, at least per resource? In this case some of this logic will need to go to the base Resource.","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"1ac2f675981ae415e197c00117b93eec1dcc9d29","unresolved":true,"context_lines":[{"line_number":296,"context_line":"                                    **extra_session_req_kwargs)"},{"line_number":297,"context_line":"            except exceptions.HTTPError as resp:"},{"line_number":298,"context_line":"                LOG.warning(\"Initial request with eTag failed,\""},{"line_number":299,"context_line":"                            \" trying workarounds.\")"},{"line_number":300,"context_line":"                if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":301,"context_line":"                    # checking for weak eTag"},{"line_number":302,"context_line":"                    pattern \u003d re.compile(r\u0027^(W\\/)(\"\\w*\")$\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fbdff995_26a56980","line":299,"in_reply_to":"7d4637ba_26224285","updated":"2022-09-09 01:42:15.000000000","message":"Thank you for your review Dmitry. This is a good question. Let\u0027s discuss further online, I will leave this aspect as-is and review other comments. If we cache, how long would we cache for? On one of the models I\u0027m writing this patch for the behaviour changes between firmware versions so caching could theoretically cause problems.. Also I think it\u0027s only three requests per provisioning cycle (vMedia Insert, bootsequence override, vMedia eject) so not sure if it\u0027s worth it. Let\u0027s discuss further.","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"da9771ccda4a7ae0c9453abb2fc89c0f8ae3a396","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                                    **extra_session_req_kwargs)"},{"line_number":297,"context_line":"            except exceptions.HTTPError as resp:"},{"line_number":298,"context_line":"                LOG.warning(\"Initial request with eTag failed,\""},{"line_number":299,"context_line":"                            \" trying workarounds.\")"},{"line_number":300,"context_line":"                if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":301,"context_line":"                    # checking for weak eTag"},{"line_number":302,"context_line":"                    pattern \u003d re.compile(r\u0027^(W\\/)(\"\\w*\")$\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c00ff15a_a092b873","line":299,"in_reply_to":"c25dd038_639edec3","updated":"2022-09-13 11:37:14.000000000","message":"Thank you for your comment Dmitry. Adding a note to the PTG Etherpad, for now will continue without caching.","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"45f41bc4187ad29464ce368885309c60c4f5a4bc","unresolved":true,"context_lines":[{"line_number":296,"context_line":"                                    **extra_session_req_kwargs)"},{"line_number":297,"context_line":"            except exceptions.HTTPError as resp:"},{"line_number":298,"context_line":"                LOG.warning(\"Initial request with eTag failed,\""},{"line_number":299,"context_line":"                            \" trying workarounds.\")"},{"line_number":300,"context_line":"                if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":301,"context_line":"                    # checking for weak eTag"},{"line_number":302,"context_line":"                    pattern \u003d re.compile(r\u0027^(W\\/)(\"\\w*\")$\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c25dd038_639edec3","line":299,"in_reply_to":"fbdff995_26a56980","updated":"2022-09-13 11:00:57.000000000","message":"I haven\u0027t thought the caching idea through. We\u0027re currently pretty bad at caching Redfish stuff (not just workarounds, we reload everything all the time). It may be a larger topic, maybe even for the PTG.","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c3ab3359e0c70ab7aa305e1c8002dab74376d1fa","unresolved":true,"context_lines":[{"line_number":297,"context_line":"            except exceptions.HTTPError as resp:"},{"line_number":298,"context_line":"                LOG.warning(\"Initial request with eTag failed,\""},{"line_number":299,"context_line":"                            \" trying workarounds.\")"},{"line_number":300,"context_line":"                if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":301,"context_line":"                    # checking for weak eTag"},{"line_number":302,"context_line":"                    pattern \u003d re.compile(r\u0027^(W\\/)(\"\\w*\")$\u0027)"},{"line_number":303,"context_line":"                    match \u003d pattern.match(etag)"}],"source_content_type":"text/x-python","patch_set":1,"id":"a82119be_b36f2fc4","line":300,"range":{"start_line":300,"start_character":18,"end_line":300,"end_character":36},"updated":"2022-09-06 14:30:33.000000000","message":"what if the status code is a 403? What about any other HTTP Errors that should be raised to the higher level caller? At a minimum, I think we\u0027re going to need some unit testing around this and the other possible errors that could be raised so we can ensure the parent caller gets exceptions when they occur for things such as access being denied.","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"dcac5ed06001eaa8075ff3775b48944d4f9db2b5","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            except exceptions.HTTPError as resp:"},{"line_number":298,"context_line":"                LOG.warning(\"Initial request with eTag failed,\""},{"line_number":299,"context_line":"                            \" trying workarounds.\")"},{"line_number":300,"context_line":"                if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":301,"context_line":"                    # checking for weak eTag"},{"line_number":302,"context_line":"                    pattern \u003d re.compile(r\u0027^(W\\/)(\"\\w*\")$\u0027)"},{"line_number":303,"context_line":"                    match \u003d pattern.match(etag)"}],"source_content_type":"text/x-python","patch_set":1,"id":"b8096664_d5c4633b","line":300,"range":{"start_line":300,"start_character":18,"end_line":300,"end_character":36},"in_reply_to":"957c1c04_52bdc96f","updated":"2022-09-12 22:16:09.000000000","message":"Done","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"1ac2f675981ae415e197c00117b93eec1dcc9d29","unresolved":true,"context_lines":[{"line_number":297,"context_line":"            except exceptions.HTTPError as resp:"},{"line_number":298,"context_line":"                LOG.warning(\"Initial request with eTag failed,\""},{"line_number":299,"context_line":"                            \" trying workarounds.\")"},{"line_number":300,"context_line":"                if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":301,"context_line":"                    # checking for weak eTag"},{"line_number":302,"context_line":"                    pattern \u003d re.compile(r\u0027^(W\\/)(\"\\w*\")$\u0027)"},{"line_number":303,"context_line":"                    match \u003d pattern.match(etag)"}],"source_content_type":"text/x-python","patch_set":1,"id":"957c1c04_52bdc96f","line":300,"range":{"start_line":300,"start_character":18,"end_line":300,"end_character":36},"in_reply_to":"a82119be_b36f2fc4","updated":"2022-09-09 01:42:15.000000000","message":"Thank you for your review Julia. Good pickup. I misread the tabs after some code cleanup, raise L334 does not apply here. Will fix this in the next revision.","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"18b795a9afef2970bc746e8d5c1c0e70342f33f2","unresolved":true,"context_lines":[{"line_number":330,"context_line":"                                            **extra_session_req_kwargs)"},{"line_number":331,"context_line":"                    except exceptions.HTTPError as resp:"},{"line_number":332,"context_line":"                        LOG.error(\"Removing eTag failed, out of options, \""},{"line_number":333,"context_line":"                                  \"raising exception\", str(resp))"},{"line_number":334,"context_line":"                        raise"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"55012a8f_f256520c","line":333,"updated":"2022-09-06 14:08:40.000000000","message":"str() not needed, missing %s in the text","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"dcac5ed06001eaa8075ff3775b48944d4f9db2b5","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                                            **extra_session_req_kwargs)"},{"line_number":331,"context_line":"                    except exceptions.HTTPError as resp:"},{"line_number":332,"context_line":"                        LOG.error(\"Removing eTag failed, out of options, \""},{"line_number":333,"context_line":"                                  \"raising exception\", str(resp))"},{"line_number":334,"context_line":"                        raise"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1b67b722_e2c11a86","line":333,"in_reply_to":"55012a8f_f256520c","updated":"2022-09-12 22:16:09.000000000","message":"Done","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"3c0a7633bba48a23dac79c867d13bf824c9a7555","unresolved":true,"context_lines":[{"line_number":359,"context_line":"        :raises: ConnectionError"},{"line_number":360,"context_line":"        :raises: HTTPError"},{"line_number":361,"context_line":"        \"\"\""},{"line_number":362,"context_line":"        if etag:"},{"line_number":363,"context_line":"            response \u003d self._etag_handler(path, data,"},{"line_number":364,"context_line":"                                          headers, etag,"},{"line_number":365,"context_line":"                                          blocking, timeout,"}],"source_content_type":"text/x-python","patch_set":9,"id":"a3d82a45_97868807","line":362,"updated":"2022-10-19 06:45:41.000000000","message":"should we just return _etag_handler even if etag is None ?","commit_id":"53fb87c9221b996e9b509a85814f17afe260f94d"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"15b59a9a2e00e6db6e2c659b18165f8313b36262","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        :raises: ConnectionError"},{"line_number":360,"context_line":"        :raises: HTTPError"},{"line_number":361,"context_line":"        \"\"\""},{"line_number":362,"context_line":"        if etag:"},{"line_number":363,"context_line":"            response \u003d self._etag_handler(path, data,"},{"line_number":364,"context_line":"                                          headers, etag,"},{"line_number":365,"context_line":"                                          blocking, timeout,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5eea5552_41378d62","line":362,"in_reply_to":"a3d82a45_97868807","updated":"2022-10-19 10:32:18.000000000","message":"Done","commit_id":"53fb87c9221b996e9b509a85814f17afe260f94d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"98465454dfd253f93df3efda8d06b4522d43725d","unresolved":true,"context_lines":[{"line_number":288,"context_line":"        :raises: HTTPError"},{"line_number":289,"context_line":"        \"\"\""},{"line_number":290,"context_line":"        try:"},{"line_number":291,"context_line":"            response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":292,"context_line":"                                headers\u003dheaders,"},{"line_number":293,"context_line":"                                blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":294,"context_line":"                                **extra_session_req_kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"790690f8_fab6f894","line":291,"updated":"2022-10-21 10:07:39.000000000","message":"Why isn\u0027t this using the etag value?","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ba5c9926d3b6d7b130ed386cab44fdb2b6e1c240","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        :raises: HTTPError"},{"line_number":289,"context_line":"        \"\"\""},{"line_number":290,"context_line":"        try:"},{"line_number":291,"context_line":"            response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":292,"context_line":"                                headers\u003dheaders,"},{"line_number":293,"context_line":"                                blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":294,"context_line":"                                **extra_session_req_kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"4edb56d1_d37b571e","line":291,"in_reply_to":"11e4b120_67309a0f","updated":"2022-10-24 10:11:00.000000000","message":"Noted, should be all done now.","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0966919dc242cf5a638b8fd0911ee6191df41dee","unresolved":true,"context_lines":[{"line_number":288,"context_line":"        :raises: HTTPError"},{"line_number":289,"context_line":"        \"\"\""},{"line_number":290,"context_line":"        try:"},{"line_number":291,"context_line":"            response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":292,"context_line":"                                headers\u003dheaders,"},{"line_number":293,"context_line":"                                blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":294,"context_line":"                                **extra_session_req_kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"11e4b120_67309a0f","line":291,"in_reply_to":"183d4690_d0a36f94","updated":"2022-10-21 13:18:54.000000000","message":"The confusion is because a part of this logic lives in system.py. It has to be moved here:\n\n if etag:\n    headers[..] \u003d etag\n    \nThen you\u0027ll also know if etag is empty or not, which is needed below.","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"fb2c1a0bc9497d30cf3370e0343fc0861eb8cdd4","unresolved":true,"context_lines":[{"line_number":288,"context_line":"        :raises: HTTPError"},{"line_number":289,"context_line":"        \"\"\""},{"line_number":290,"context_line":"        try:"},{"line_number":291,"context_line":"            response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":292,"context_line":"                                headers\u003dheaders,"},{"line_number":293,"context_line":"                                blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":294,"context_line":"                                **extra_session_req_kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"183d4690_d0a36f94","line":291,"in_reply_to":"790690f8_fab6f894","updated":"2022-10-21 12:33:01.000000000","message":"I\u0027m not sure if I understand correctly. etag isn\u0027t an argument to _op(), I added etag as an argument to patch() and _etag_handler() after previous review ( https://review.opendev.org/c/openstack/sushy/+/856123/comments/8f4bf5a6_26594868 ) and so far it\u0027s been used in handling the weak etag case. How to utilise it here?","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"98465454dfd253f93df3efda8d06b4522d43725d","unresolved":true,"context_lines":[{"line_number":300,"context_line":"                pattern \u003d re.compile(r\u0027^(W\\/)(\"\\w*\")$\u0027)"},{"line_number":301,"context_line":"                match \u003d pattern.match(etag)"},{"line_number":302,"context_line":"                if match:"},{"line_number":303,"context_line":"                    LOG.info(\"Weak eTag provided with original request. \""},{"line_number":304,"context_line":"                             \"Attempting to conversion to strong eTag \""},{"line_number":305,"context_line":"                             \"and re-trying.\")"},{"line_number":306,"context_line":"                    # trying weak eTag converted to strong"}],"source_content_type":"text/x-python","patch_set":11,"id":"fee84a08_91d4664e","line":303,"updated":"2022-10-21 10:07:39.000000000","message":"Let us log the path, otherwise it will be lost in the Ironic logs","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"fb2c1a0bc9497d30cf3370e0343fc0861eb8cdd4","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                pattern \u003d re.compile(r\u0027^(W\\/)(\"\\w*\")$\u0027)"},{"line_number":301,"context_line":"                match \u003d pattern.match(etag)"},{"line_number":302,"context_line":"                if match:"},{"line_number":303,"context_line":"                    LOG.info(\"Weak eTag provided with original request. \""},{"line_number":304,"context_line":"                             \"Attempting to conversion to strong eTag \""},{"line_number":305,"context_line":"                             \"and re-trying.\")"},{"line_number":306,"context_line":"                    # trying weak eTag converted to strong"}],"source_content_type":"text/x-python","patch_set":11,"id":"2d8bffc1_3f99eac6","line":303,"in_reply_to":"fee84a08_91d4664e","updated":"2022-10-21 12:33:01.000000000","message":"Done","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"98465454dfd253f93df3efda8d06b4522d43725d","unresolved":true,"context_lines":[{"line_number":317,"context_line":"                            LOG.warning(\"Retry with weak eTag converted \""},{"line_number":318,"context_line":"                                        \"to strong eTag also failed: %s \""},{"line_number":319,"context_line":"                                        \"Making final attempt with no \""},{"line_number":320,"context_line":"                                        \"eTag specified.\", resp)"},{"line_number":321,"context_line":"                        response \u003d None"},{"line_number":322,"context_line":"                    if response:"},{"line_number":323,"context_line":"                        return response"}],"source_content_type":"text/x-python","patch_set":11,"id":"c407981e_590b7d55","line":320,"updated":"2022-10-21 10:07:39.000000000","message":"Same. I also don\u0027t think that str(resp) is actually useful (check that).","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"fb2c1a0bc9497d30cf3370e0343fc0861eb8cdd4","unresolved":false,"context_lines":[{"line_number":317,"context_line":"                            LOG.warning(\"Retry with weak eTag converted \""},{"line_number":318,"context_line":"                                        \"to strong eTag also failed: %s \""},{"line_number":319,"context_line":"                                        \"Making final attempt with no \""},{"line_number":320,"context_line":"                                        \"eTag specified.\", resp)"},{"line_number":321,"context_line":"                        response \u003d None"},{"line_number":322,"context_line":"                    if response:"},{"line_number":323,"context_line":"                        return response"}],"source_content_type":"text/x-python","patch_set":11,"id":"9d95aaef_a9bf7377","line":320,"in_reply_to":"c407981e_590b7d55","updated":"2022-10-21 12:33:01.000000000","message":"Added path. Wrt str(resp) - it does have some useful fields ( looking at https://opendev.org/openstack/sushy/src/branch/master/sushy/exceptions.py#L81 ) but I think _op() will log the interesting bits anyway (as you pointed out in a later comment) so removed this. \nWhat would be the best way to test this? I don\u0027t think unit tests will be useful as they will only show mocked stuff.","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"98465454dfd253f93df3efda8d06b4522d43725d","unresolved":true,"context_lines":[{"line_number":325,"context_line":"                    # eTag is strong, if it failed the only other thing"},{"line_number":326,"context_line":"                    # to try is removing it entirely"},{"line_number":327,"context_line":"                    # info"},{"line_number":328,"context_line":"                    LOG.warning(\"Strong eTag provided - retrying request with\""},{"line_number":329,"context_line":"                                \" eTag removed.\")"},{"line_number":330,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":331,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"b7c6de3a_b17506c3","line":328,"updated":"2022-10-21 10:07:39.000000000","message":"Same","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"fb2c1a0bc9497d30cf3370e0343fc0861eb8cdd4","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                    # eTag is strong, if it failed the only other thing"},{"line_number":326,"context_line":"                    # to try is removing it entirely"},{"line_number":327,"context_line":"                    # info"},{"line_number":328,"context_line":"                    LOG.warning(\"Strong eTag provided - retrying request with\""},{"line_number":329,"context_line":"                                \" eTag removed.\")"},{"line_number":330,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":331,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"c28ad15d_a02fdea5","line":328,"in_reply_to":"b7c6de3a_b17506c3","updated":"2022-10-21 12:33:01.000000000","message":"Done","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"98465454dfd253f93df3efda8d06b4522d43725d","unresolved":true,"context_lines":[{"line_number":327,"context_line":"                    # info"},{"line_number":328,"context_line":"                    LOG.warning(\"Strong eTag provided - retrying request with\""},{"line_number":329,"context_line":"                                \" eTag removed.\")"},{"line_number":330,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":331,"context_line":"                try:"},{"line_number":332,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":333,"context_line":"                                        headers\u003dheaders,"}],"source_content_type":"text/x-python","patch_set":11,"id":"c4948c23_1888b058","line":330,"updated":"2022-10-21 10:07:39.000000000","message":"The value may not be there at all (empty etag). Need to handle it and not retry.","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ba5c9926d3b6d7b130ed386cab44fdb2b6e1c240","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                    # info"},{"line_number":328,"context_line":"                    LOG.warning(\"Strong eTag provided - retrying request with\""},{"line_number":329,"context_line":"                                \" eTag removed.\")"},{"line_number":330,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":331,"context_line":"                try:"},{"line_number":332,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":333,"context_line":"                                        headers\u003dheaders,"}],"source_content_type":"text/x-python","patch_set":11,"id":"d54c15ba_cfcf82f7","line":330,"in_reply_to":"0ec2d7dc_e8524994","updated":"2022-10-24 10:11:00.000000000","message":"OK, moved to option 2 based on further discussion and Riccardo\u0027s review.","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"56d74c4806eaa2e4c911f05d8d5befb10ec00a14","unresolved":true,"context_lines":[{"line_number":327,"context_line":"                    # info"},{"line_number":328,"context_line":"                    LOG.warning(\"Strong eTag provided - retrying request with\""},{"line_number":329,"context_line":"                                \" eTag removed.\")"},{"line_number":330,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":331,"context_line":"                try:"},{"line_number":332,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":333,"context_line":"                                        headers\u003dheaders,"}],"source_content_type":"text/x-python","patch_set":11,"id":"0ec2d7dc_e8524994","line":330,"in_reply_to":"7e32f601_97a94036","updated":"2022-10-24 04:43:11.000000000","message":"I\u0027ve gone with option 1) for now, let\u0027s discuss futher (also with Riccardo).","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"fb2c1a0bc9497d30cf3370e0343fc0861eb8cdd4","unresolved":true,"context_lines":[{"line_number":327,"context_line":"                    # info"},{"line_number":328,"context_line":"                    LOG.warning(\"Strong eTag provided - retrying request with\""},{"line_number":329,"context_line":"                                \" eTag removed.\")"},{"line_number":330,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":331,"context_line":"                try:"},{"line_number":332,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":333,"context_line":"                                        headers\u003dheaders,"}],"source_content_type":"text/x-python","patch_set":11,"id":"dd2ed63e_8dd7c740","line":330,"in_reply_to":"c4948c23_1888b058","updated":"2022-10-21 12:33:01.000000000","message":"Good pickup, thank you. I changed how _etag_handler() is called recently and I missed the fact this problem was introduced.\n\nI can think of two ways of addressing this:\n1) in previous revisions I\u0027d only call _etag_handler() from patch() if etag wasn\u0027t none. If etag was none _etag_handler() wouldn\u0027t be used at all. Should I reconsider this approach?\n\n2) I can modify existing logic but the conditionals are already quite complex. Is adding another case there preferable over 1)?","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0966919dc242cf5a638b8fd0911ee6191df41dee","unresolved":true,"context_lines":[{"line_number":327,"context_line":"                    # info"},{"line_number":328,"context_line":"                    LOG.warning(\"Strong eTag provided - retrying request with\""},{"line_number":329,"context_line":"                                \" eTag removed.\")"},{"line_number":330,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":331,"context_line":"                try:"},{"line_number":332,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":333,"context_line":"                                        headers\u003dheaders,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7e32f601_97a94036","line":330,"in_reply_to":"dd2ed63e_8dd7c740","updated":"2022-10-21 13:18:54.000000000","message":"I\u0027m fine with both options. I don\u0027t think #2 is complex, it\u0027s more of\n\n if not etag:\n     raise\n     \nsomewhere above","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"98465454dfd253f93df3efda8d06b4522d43725d","unresolved":true,"context_lines":[{"line_number":338,"context_line":"                              \"raising exception %s\", resp)"},{"line_number":339,"context_line":"                    raise"},{"line_number":340,"context_line":"            else:"},{"line_number":341,"context_line":"                LOG.warning(\"Request failed: %s\", resp)"},{"line_number":342,"context_line":"                raise"},{"line_number":343,"context_line":"        return response"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"0bb9059f_63a6952c","line":341,"updated":"2022-10-21 10:07:39.000000000","message":"This will be out of context in the total logs, and probably duplicates self._op","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"fb2c1a0bc9497d30cf3370e0343fc0861eb8cdd4","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                              \"raising exception %s\", resp)"},{"line_number":339,"context_line":"                    raise"},{"line_number":340,"context_line":"            else:"},{"line_number":341,"context_line":"                LOG.warning(\"Request failed: %s\", resp)"},{"line_number":342,"context_line":"                raise"},{"line_number":343,"context_line":"        return response"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"4972e4cf_270d11d3","line":341,"in_reply_to":"0bb9059f_63a6952c","updated":"2022-10-21 12:33:01.000000000","message":"Done","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"b37832045c0d3ce72d4be1b788ac04195837b95d","unresolved":true,"context_lines":[{"line_number":358,"context_line":"        :raises: ConnectionError"},{"line_number":359,"context_line":"        :raises: HTTPError"},{"line_number":360,"context_line":"        \"\"\""},{"line_number":361,"context_line":"        if etag is not None:"},{"line_number":362,"context_line":"            headers[\u0027If-Match\u0027] \u003d etag"},{"line_number":363,"context_line":"            return self._etag_handler(path, data,"},{"line_number":364,"context_line":"                                      headers, etag,"}],"source_content_type":"text/x-python","patch_set":13,"id":"4c173d7b_721c5ff4","line":361,"updated":"2022-10-24 08:28:25.000000000","message":"this should be probably handled inside _etag_handler","commit_id":"dbc445a17d425f0a336aee7f4dd3ee9cb49fb613"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ba5c9926d3b6d7b130ed386cab44fdb2b6e1c240","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        :raises: ConnectionError"},{"line_number":359,"context_line":"        :raises: HTTPError"},{"line_number":360,"context_line":"        \"\"\""},{"line_number":361,"context_line":"        if etag is not None:"},{"line_number":362,"context_line":"            headers[\u0027If-Match\u0027] \u003d etag"},{"line_number":363,"context_line":"            return self._etag_handler(path, data,"},{"line_number":364,"context_line":"                                      headers, etag,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1eec8885_608e128d","line":361,"in_reply_to":"4c173d7b_721c5ff4","updated":"2022-10-24 10:11:00.000000000","message":"Done","commit_id":"dbc445a17d425f0a336aee7f4dd3ee9cb49fb613"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"b37832045c0d3ce72d4be1b788ac04195837b95d","unresolved":true,"context_lines":[{"line_number":365,"context_line":"                                      blocking, timeout,"},{"line_number":366,"context_line":"                                      **extra_session_req_kwargs)"},{"line_number":367,"context_line":"        else:"},{"line_number":368,"context_line":"            return self._op(\u0027PATCH\u0027, path, data\u003ddata, headers\u003dheaders,"},{"line_number":369,"context_line":"                            blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":370,"context_line":"                            **extra_session_req_kwargs)"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"a2b188e0_0c78188e","line":368,"updated":"2022-10-24 08:28:25.000000000","message":"let\u0027s remove the if-else block and just return _etag_handler here? You call the exact same _op function there","commit_id":"dbc445a17d425f0a336aee7f4dd3ee9cb49fb613"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ba5c9926d3b6d7b130ed386cab44fdb2b6e1c240","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                                      blocking, timeout,"},{"line_number":366,"context_line":"                                      **extra_session_req_kwargs)"},{"line_number":367,"context_line":"        else:"},{"line_number":368,"context_line":"            return self._op(\u0027PATCH\u0027, path, data\u003ddata, headers\u003dheaders,"},{"line_number":369,"context_line":"                            blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":370,"context_line":"                            **extra_session_req_kwargs)"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"b751d1b6_656a582b","line":368,"in_reply_to":"a2b188e0_0c78188e","updated":"2022-10-24 10:11:00.000000000","message":"Done","commit_id":"dbc445a17d425f0a336aee7f4dd3ee9cb49fb613"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"db96992d8140c171ca33a2a68e1fcec764b948c3","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                                **extra_session_req_kwargs)"},{"line_number":299,"context_line":"        except exceptions.HTTPError as resp:"},{"line_number":300,"context_line":"            LOG.warning(\"Initial request with eTag failed: %s\","},{"line_number":301,"context_line":"                        resp)"},{"line_number":302,"context_line":"            if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":303,"context_line":"                # NOTE(janders) if there was no eTag provided AND the response"},{"line_number":304,"context_line":"                # is HTTP 412 Precondition Failed, raise the exception"}],"source_content_type":"text/x-python","patch_set":15,"id":"9e59cfa2_15e0f233","line":301,"updated":"2022-10-26 11:10:15.000000000","message":"I\u0027d move this message under the \u0027if\u0027 block, so that we don\u0027t log it on other errors","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"8f17bac00aaacc86453e4586a2e368c6b4c25f77","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                                **extra_session_req_kwargs)"},{"line_number":299,"context_line":"        except exceptions.HTTPError as resp:"},{"line_number":300,"context_line":"            LOG.warning(\"Initial request with eTag failed: %s\","},{"line_number":301,"context_line":"                        resp)"},{"line_number":302,"context_line":"            if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":303,"context_line":"                # NOTE(janders) if there was no eTag provided AND the response"},{"line_number":304,"context_line":"                # is HTTP 412 Precondition Failed, raise the exception"}],"source_content_type":"text/x-python","patch_set":15,"id":"eb6514ba_0af1f4f2","line":301,"in_reply_to":"00f03c08_cba15b6f","updated":"2022-10-27 23:26:49.000000000","message":"Done","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b50ed1915e7878244284dd8520ffa9b0d098f4a6","unresolved":true,"context_lines":[{"line_number":298,"context_line":"                                **extra_session_req_kwargs)"},{"line_number":299,"context_line":"        except exceptions.HTTPError as resp:"},{"line_number":300,"context_line":"            LOG.warning(\"Initial request with eTag failed: %s\","},{"line_number":301,"context_line":"                        resp)"},{"line_number":302,"context_line":"            if resp.status_code \u003d\u003d http_client.PRECONDITION_FAILED:"},{"line_number":303,"context_line":"                # NOTE(janders) if there was no eTag provided AND the response"},{"line_number":304,"context_line":"                # is HTTP 412 Precondition Failed, raise the exception"}],"source_content_type":"text/x-python","patch_set":15,"id":"00f03c08_cba15b6f","line":301,"in_reply_to":"9e59cfa2_15e0f233","updated":"2022-10-26 12:52:13.000000000","message":"Done - did you mean this needs to go just under if block in L302 or to else statement in 348?","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"db96992d8140c171ca33a2a68e1fcec764b948c3","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                             \"and re-trying.\", path)"},{"line_number":314,"context_line":"                    # trying weak eTag converted to strong"},{"line_number":315,"context_line":"                    headers[\u0027If-Match\u0027] \u003d match.group(2)"},{"line_number":316,"context_line":"                    try:"},{"line_number":317,"context_line":"                        response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":318,"context_line":"                                            headers\u003dheaders,"},{"line_number":319,"context_line":"                                            blocking\u003dblocking,"}],"source_content_type":"text/x-python","patch_set":15,"id":"49128f71_f9e0d154","line":316,"updated":"2022-10-26 11:10:15.000000000","message":"I wonder if at this point we can call _etag_handler recursively with the new etag","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b50ed1915e7878244284dd8520ffa9b0d098f4a6","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                             \"and re-trying.\", path)"},{"line_number":314,"context_line":"                    # trying weak eTag converted to strong"},{"line_number":315,"context_line":"                    headers[\u0027If-Match\u0027] \u003d match.group(2)"},{"line_number":316,"context_line":"                    try:"},{"line_number":317,"context_line":"                        response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":318,"context_line":"                                            headers\u003dheaders,"},{"line_number":319,"context_line":"                                            blocking\u003dblocking,"}],"source_content_type":"text/x-python","patch_set":15,"id":"84c3292b_9e57ff45","line":316,"in_reply_to":"49128f71_f9e0d154","updated":"2022-10-26 12:52:13.000000000","message":"Done","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"db96992d8140c171ca33a2a68e1fcec764b948c3","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                    LOG.warning(\"Strong eTag provided - retrying request to \""},{"line_number":337,"context_line":"                                \"%s with eTag removed.\", path)"},{"line_number":338,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":339,"context_line":"                try:"},{"line_number":340,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":341,"context_line":"                                        headers\u003dheaders,"},{"line_number":342,"context_line":"                                        blocking\u003dblocking, timeout\u003dtimeout,"}],"source_content_type":"text/x-python","patch_set":15,"id":"0985a0a3_bb24c7cf","line":339,"updated":"2022-10-26 11:10:15.000000000","message":"Same","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b50ed1915e7878244284dd8520ffa9b0d098f4a6","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                    LOG.warning(\"Strong eTag provided - retrying request to \""},{"line_number":337,"context_line":"                                \"%s with eTag removed.\", path)"},{"line_number":338,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":339,"context_line":"                try:"},{"line_number":340,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":341,"context_line":"                                        headers\u003dheaders,"},{"line_number":342,"context_line":"                                        blocking\u003dblocking, timeout\u003dtimeout,"}],"source_content_type":"text/x-python","patch_set":15,"id":"88ea1abd_5d531220","line":339,"in_reply_to":"0985a0a3_bb24c7cf","updated":"2022-10-26 12:52:13.000000000","message":"Done","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"cdfca5caeccd5af92c2a9feac01d11757bd0162d","unresolved":true,"context_lines":[{"line_number":337,"context_line":"                                \"%s with eTag removed.\", path)"},{"line_number":338,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":339,"context_line":"                try:"},{"line_number":340,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":341,"context_line":"                                        headers\u003dheaders,"},{"line_number":342,"context_line":"                                        blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":343,"context_line":"                                        **extra_session_req_kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1829c40a_27c9d662","line":340,"updated":"2025-10-02 04:30:23.000000000","message":"If the goal is to get the PATCH to always succeed even if the resource has changed since we read it, why not skip the whole charade with If-Match and go straight to this bit?","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b6099a13e9c9be622bf93e3fc96a5804a0e8c445","unresolved":true,"context_lines":[{"line_number":337,"context_line":"                                \"%s with eTag removed.\", path)"},{"line_number":338,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":339,"context_line":"                try:"},{"line_number":340,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":341,"context_line":"                                        headers\u003dheaders,"},{"line_number":342,"context_line":"                                        blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":343,"context_line":"                                        **extra_session_req_kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"96dca6f9_a2048ec3","line":340,"in_reply_to":"1829c40a_27c9d662","updated":"2025-10-02 04:35:35.000000000","message":"I believe there are some BMCs out there that won\u0027t accept the request without an ETag. So - trying different things until something works or we run out of ideas. Convoluted as it is, I\u0027ve seen this work around problems without us realising they existed.","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"af23df9dca9be85b1d92c3b30447d882f4104c44","unresolved":true,"context_lines":[{"line_number":337,"context_line":"                                \"%s with eTag removed.\", path)"},{"line_number":338,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":339,"context_line":"                try:"},{"line_number":340,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":341,"context_line":"                                        headers\u003dheaders,"},{"line_number":342,"context_line":"                                        blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":343,"context_line":"                                        **extra_session_req_kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"201d8484_755cb195","line":340,"in_reply_to":"1f65bb0a_d7e8da6e","updated":"2025-10-03 04:46:14.000000000","message":"Ack. Nothing specific, it\u0027s just really surprising to see a bunch of code for detecting race conditions where we respond to detecting a race by retrying without the detection :)","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"906ab931610d6d4d6bbaab8eb99cfbdee8a40c0f","unresolved":true,"context_lines":[{"line_number":337,"context_line":"                                \"%s with eTag removed.\", path)"},{"line_number":338,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":339,"context_line":"                try:"},{"line_number":340,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":341,"context_line":"                                        headers\u003dheaders,"},{"line_number":342,"context_line":"                                        blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":343,"context_line":"                                        **extra_session_req_kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1f65bb0a_d7e8da6e","line":340,"in_reply_to":"3da8ec75_afce288c","updated":"2025-10-02 09:22:28.000000000","message":"\u003e  Do we just not care because we are single-threaded\n\nmaybe not so much single-threaded but there is a 1 to 1 relationship between baremetal node and coductor. If a conductor managing a node dies, another conductor will take over, eventually. Because of this I don\u0027t think we\u0027re overly worried about concurrent changes.\n\n\u003e and we assume nobody else talks to the BMC?\n\nI believe so - and I don\u0027t think it\u0027s unreasonable. I think once we have more than one \"managers\" managing a baremetal node we can have way bigger problems than stomping over PATCH changes (the most basic case being manager A dropping power when manager B needs it up; in less basic case take basic case with maanger B being in the middle of firmware upgrade).\n\nThere can be less drastic cases where concurrent management doesn\u0027t immediately lead to a disaster of sorts, but overall I don\u0027t think this so something we expect or endeavour to support.\n\nNot trying to be dismissive here (it\u0027s actually good to have someone who isn\u0027t used to _etag_handler() question the fact of having it) but is there a specific concern you\u0027re looking into? Happy to discuss further.","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"d4afd2f80ff31ee306e6588005da4dccddce8f25","unresolved":true,"context_lines":[{"line_number":337,"context_line":"                                \"%s with eTag removed.\", path)"},{"line_number":338,"context_line":"                del headers[\u0027If-Match\u0027]"},{"line_number":339,"context_line":"                try:"},{"line_number":340,"context_line":"                    response \u003d self._op(\u0027PATCH\u0027, path, data\u003ddata,"},{"line_number":341,"context_line":"                                        headers\u003dheaders,"},{"line_number":342,"context_line":"                                        blocking\u003dblocking, timeout\u003dtimeout,"},{"line_number":343,"context_line":"                                        **extra_session_req_kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3da8ec75_afce288c","line":340,"in_reply_to":"96dca6f9_a2048ec3","updated":"2025-10-02 04:54:08.000000000","message":"That\u0027s probably wise on their part, as it will protect them from races caused by doing... this.\n\nBut any BMC that does accept PATCH without If-Match, we just stomp all over any changes, without realising they existed. Do we just not care because we are single-threaded and we assume nobody else talks to the BMC?","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"}],"sushy/resources/base.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"18b795a9afef2970bc746e8d5c1c0e70342f33f2","unresolved":true,"context_lines":[{"line_number":638,"context_line":""},{"line_number":639,"context_line":"        :returns ETag or None"},{"line_number":640,"context_line":"        \"\"\""},{"line_number":641,"context_line":"        pattern \u003d re.compile(r\u0027^(W\\/)?(\"\\w*\")$\u0027)"},{"line_number":642,"context_line":"        match \u003d pattern.match(self._get_headers().get(\u0027ETag\u0027, \u0027\u0027))"},{"line_number":643,"context_line":"        if match:"},{"line_number":644,"context_line":"            return match.group(2)"}],"source_content_type":"text/x-python","patch_set":1,"id":"f3c05d1b_0f5d5b90","line":641,"updated":"2022-09-06 14:08:40.000000000","message":"In this version of the patch, the regex is not needed here. But see my comments in the connector part.","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"526786dc3332c8a67fdb63a5da20f38c8e960ab2","unresolved":false,"context_lines":[{"line_number":638,"context_line":""},{"line_number":639,"context_line":"        :returns ETag or None"},{"line_number":640,"context_line":"        \"\"\""},{"line_number":641,"context_line":"        pattern \u003d re.compile(r\u0027^(W\\/)?(\"\\w*\")$\u0027)"},{"line_number":642,"context_line":"        match \u003d pattern.match(self._get_headers().get(\u0027ETag\u0027, \u0027\u0027))"},{"line_number":643,"context_line":"        if match:"},{"line_number":644,"context_line":"            return match.group(2)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f122c46_d08222db","line":641,"in_reply_to":"f3c05d1b_0f5d5b90","updated":"2022-09-12 22:17:44.000000000","message":"Done","commit_id":"2f075218c08fc963f8915633ab07c1e8e8afb507"}],"sushy/resources/system/system.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"98465454dfd253f93df3efda8d06b4522d43725d","unresolved":true,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        # TODO(lucasagomes): Check the return code and response body ?"},{"line_number":292,"context_line":"        #                    Probably we should call refresh() as well."},{"line_number":293,"context_line":"        if etag is not None:"},{"line_number":294,"context_line":"            headers \u003d {\u0027If-Match\u0027: etag}"},{"line_number":295,"context_line":"        self._conn.patch(path, data\u003ddata, headers\u003dheaders, etag\u003detag)"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"444648a0_d1772df1","line":293,"updated":"2022-10-21 10:07:39.000000000","message":"This logic must be moved to patch, otherwise you provide etag in two places","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0966919dc242cf5a638b8fd0911ee6191df41dee","unresolved":true,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        # TODO(lucasagomes): Check the return code and response body ?"},{"line_number":292,"context_line":"        #                    Probably we should call refresh() as well."},{"line_number":293,"context_line":"        if etag is not None:"},{"line_number":294,"context_line":"            headers \u003d {\u0027If-Match\u0027: etag}"},{"line_number":295,"context_line":"        self._conn.patch(path, data\u003ddata, headers\u003dheaders, etag\u003detag)"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"e52d8317_8277f031","line":293,"in_reply_to":"013587ac_108ffdc7","updated":"2022-10-21 13:18:54.000000000","message":"I should have commented on the line below, I guess. Because of modifying headers here, you end up with some inconsistencies in patch(). Just pass the etag, whatever it is.","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ba5c9926d3b6d7b130ed386cab44fdb2b6e1c240","unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        # TODO(lucasagomes): Check the return code and response body ?"},{"line_number":292,"context_line":"        #                    Probably we should call refresh() as well."},{"line_number":293,"context_line":"        if etag is not None:"},{"line_number":294,"context_line":"            headers \u003d {\u0027If-Match\u0027: etag}"},{"line_number":295,"context_line":"        self._conn.patch(path, data\u003ddata, headers\u003dheaders, etag\u003detag)"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"f854c4a0_930ab35a","line":293,"in_reply_to":"1e6e1847_0bba72b7","updated":"2022-10-24 10:11:00.000000000","message":"OK, moved it back to _etag_handler() after a chat with Riccardo","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"fb2c1a0bc9497d30cf3370e0343fc0861eb8cdd4","unresolved":true,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        # TODO(lucasagomes): Check the return code and response body ?"},{"line_number":292,"context_line":"        #                    Probably we should call refresh() as well."},{"line_number":293,"context_line":"        if etag is not None:"},{"line_number":294,"context_line":"            headers \u003d {\u0027If-Match\u0027: etag}"},{"line_number":295,"context_line":"        self._conn.patch(path, data\u003ddata, headers\u003dheaders, etag\u003detag)"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"013587ac_108ffdc7","line":293,"in_reply_to":"444648a0_d1772df1","updated":"2022-10-21 12:33:01.000000000","message":"eTag may need to correspond to System or SettingsURI depending on some checks in system.py. For this reason, would it be better if this stays in system.py (maybe I can reconsider passing the etag as a field in headers)? I tried moving this to patch() but broke a few unit tests in way I didn\u0027t immediately understand (headers became empty). If it does need to move to patch() is it expected that I need to modify existing tests, particularly the ones related to SettingsURI?","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"56d74c4806eaa2e4c911f05d8d5befb10ec00a14","unresolved":true,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        # TODO(lucasagomes): Check the return code and response body ?"},{"line_number":292,"context_line":"        #                    Probably we should call refresh() as well."},{"line_number":293,"context_line":"        if etag is not None:"},{"line_number":294,"context_line":"            headers \u003d {\u0027If-Match\u0027: etag}"},{"line_number":295,"context_line":"        self._conn.patch(path, data\u003ddata, headers\u003dheaders, etag\u003detag)"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1e6e1847_0bba72b7","line":293,"in_reply_to":"e52d8317_8277f031","updated":"2022-10-24 04:43:11.000000000","message":"I moved this logic to patch(), let\u0027s discuss further","commit_id":"fdb5d9e018bb9d2ae41f46ca2bd8fc245f152793"}],"sushy/tests/unit/resources/manager/test_virtual_media.py":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"3c0a7633bba48a23dac79c867d13bf824c9a7555","unresolved":true,"context_lines":[{"line_number":165,"context_line":"            headers\u003d{\"If-Match\": \u0027\"3d7b8a7360bf2941d\"\u0027})"},{"line_number":166,"context_line":"        self.assertTrue(self.sys_virtual_media._is_stale)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"#    def test_insert_media_fallback_with_weak_etag(self):"},{"line_number":169,"context_line":"#        self.conn.get.return_value.headers \u003d {\u0027Allow\u0027: \u0027GET,HEAD,PATCH\u0027,"},{"line_number":170,"context_line":"#                                              \u0027ETag\u0027: \u0027W/\"3d7b8a7360bf2941d\"\u0027}"},{"line_number":171,"context_line":"#        self.sys_virtual_media._actions.insert_media \u003d None"}],"source_content_type":"text/x-python","patch_set":9,"id":"0b9504e2_b3a5096a","line":168,"updated":"2022-10-19 06:45:41.000000000","message":"probably need to remove this or modify it?","commit_id":"53fb87c9221b996e9b509a85814f17afe260f94d"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"15b59a9a2e00e6db6e2c659b18165f8313b36262","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            headers\u003d{\"If-Match\": \u0027\"3d7b8a7360bf2941d\"\u0027})"},{"line_number":166,"context_line":"        self.assertTrue(self.sys_virtual_media._is_stale)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"#    def test_insert_media_fallback_with_weak_etag(self):"},{"line_number":169,"context_line":"#        self.conn.get.return_value.headers \u003d {\u0027Allow\u0027: \u0027GET,HEAD,PATCH\u0027,"},{"line_number":170,"context_line":"#                                              \u0027ETag\u0027: \u0027W/\"3d7b8a7360bf2941d\"\u0027}"},{"line_number":171,"context_line":"#        self.sys_virtual_media._actions.insert_media \u003d None"}],"source_content_type":"text/x-python","patch_set":9,"id":"9b61415f_eee8ec4a","line":168,"in_reply_to":"0b9504e2_b3a5096a","updated":"2022-10-19 10:32:18.000000000","message":"Done","commit_id":"53fb87c9221b996e9b509a85814f17afe260f94d"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"3c0a7633bba48a23dac79c867d13bf824c9a7555","unresolved":true,"context_lines":[{"line_number":231,"context_line":"            headers\u003d{\"If-Match\": \u0027\"3d7b8a7360bf2941d\"\u0027})"},{"line_number":232,"context_line":"        self.assertTrue(self.sys_virtual_media._is_stale)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"#    def test_eject_media_fallback_with_weak_etag(self):"},{"line_number":235,"context_line":"#        self.conn.get.return_value.headers \u003d {\u0027Allow\u0027: \u0027GET,HEAD,PATCH\u0027,"},{"line_number":236,"context_line":"#                                              \u0027ETag\u0027: \u0027W/\"3d7b8a7360bf2941d\"\u0027}"},{"line_number":237,"context_line":"#        self.sys_virtual_media._actions.eject_media \u003d None"}],"source_content_type":"text/x-python","patch_set":9,"id":"296ca44e_c3f5ecff","line":234,"updated":"2022-10-19 06:45:41.000000000","message":"ditto","commit_id":"53fb87c9221b996e9b509a85814f17afe260f94d"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"15b59a9a2e00e6db6e2c659b18165f8313b36262","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            headers\u003d{\"If-Match\": \u0027\"3d7b8a7360bf2941d\"\u0027})"},{"line_number":232,"context_line":"        self.assertTrue(self.sys_virtual_media._is_stale)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"#    def test_eject_media_fallback_with_weak_etag(self):"},{"line_number":235,"context_line":"#        self.conn.get.return_value.headers \u003d {\u0027Allow\u0027: \u0027GET,HEAD,PATCH\u0027,"},{"line_number":236,"context_line":"#                                              \u0027ETag\u0027: \u0027W/\"3d7b8a7360bf2941d\"\u0027}"},{"line_number":237,"context_line":"#        self.sys_virtual_media._actions.eject_media \u003d None"}],"source_content_type":"text/x-python","patch_set":9,"id":"0f13a591_8332644b","line":234,"in_reply_to":"296ca44e_c3f5ecff","updated":"2022-10-19 10:32:18.000000000","message":"Done","commit_id":"53fb87c9221b996e9b509a85814f17afe260f94d"}],"sushy/tests/unit/test_connector.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"db96992d8140c171ca33a2a68e1fcec764b948c3","unresolved":false,"context_lines":[{"line_number":662,"context_line":"        self.conn._etag_handler(path\u003dtarget_uri, headers\u003dself.headers,"},{"line_number":663,"context_line":"                                data\u003ddata, etag\u003dself.headers[\u0027If-Match\u0027],"},{"line_number":664,"context_line":"                                blocking\u003dFalse, timeout\u003d60)"},{"line_number":665,"context_line":"        mock__op.assert_called_with("},{"line_number":666,"context_line":"            self.conn,"},{"line_number":667,"context_line":"            \"PATCH\","},{"line_number":668,"context_line":"            \u0027/redfish/v1/Systems/1\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"2cd6d309_466c046a","line":665,"updated":"2022-10-26 11:10:15.000000000","message":"I\u0027d use assert_has_calls to verify both calls","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b50ed1915e7878244284dd8520ffa9b0d098f4a6","unresolved":false,"context_lines":[{"line_number":662,"context_line":"        self.conn._etag_handler(path\u003dtarget_uri, headers\u003dself.headers,"},{"line_number":663,"context_line":"                                data\u003ddata, etag\u003dself.headers[\u0027If-Match\u0027],"},{"line_number":664,"context_line":"                                blocking\u003dFalse, timeout\u003d60)"},{"line_number":665,"context_line":"        mock__op.assert_called_with("},{"line_number":666,"context_line":"            self.conn,"},{"line_number":667,"context_line":"            \"PATCH\","},{"line_number":668,"context_line":"            \u0027/redfish/v1/Systems/1\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"c29e13cb_c9269c3b","line":665,"in_reply_to":"2cd6d309_466c046a","updated":"2022-10-26 12:52:13.000000000","message":"I tried this initially and got really badly bogged - for some reason Mock was showing the most recent call twice, not the two most recent calls (contrary to doco). After discussion with Riccardo we decided to simplify this hence the current version - I will keep it if that\u0027s OK?","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"db96992d8140c171ca33a2a68e1fcec764b948c3","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        self.conn._etag_handler(path\u003dtarget_uri, headers\u003dself.headers,"},{"line_number":694,"context_line":"                                data\u003ddata, etag\u003dself.headers[\u0027If-Match\u0027],"},{"line_number":695,"context_line":"                                blocking\u003dFalse, timeout\u003d60)"},{"line_number":696,"context_line":"        mock__op.assert_called_with("},{"line_number":697,"context_line":"            self.conn,"},{"line_number":698,"context_line":"            \"PATCH\","},{"line_number":699,"context_line":"            \u0027/redfish/v1/Systems/1\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"203b7469_0fc14df1","line":696,"updated":"2022-10-26 11:10:15.000000000","message":"ditto","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b50ed1915e7878244284dd8520ffa9b0d098f4a6","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        self.conn._etag_handler(path\u003dtarget_uri, headers\u003dself.headers,"},{"line_number":694,"context_line":"                                data\u003ddata, etag\u003dself.headers[\u0027If-Match\u0027],"},{"line_number":695,"context_line":"                                blocking\u003dFalse, timeout\u003d60)"},{"line_number":696,"context_line":"        mock__op.assert_called_with("},{"line_number":697,"context_line":"            self.conn,"},{"line_number":698,"context_line":"            \"PATCH\","},{"line_number":699,"context_line":"            \u0027/redfish/v1/Systems/1\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a53caaa_7824c685","line":696,"in_reply_to":"203b7469_0fc14df1","updated":"2022-10-26 12:52:13.000000000","message":"DOne.","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"db96992d8140c171ca33a2a68e1fcec764b948c3","unresolved":false,"context_lines":[{"line_number":721,"context_line":"        self.conn._etag_handler(path\u003dtarget_uri, headers\u003dself.headers,"},{"line_number":722,"context_line":"                                data\u003ddata, etag\u003dself.headers[\u0027If-Match\u0027],"},{"line_number":723,"context_line":"                                blocking\u003dFalse, timeout\u003d60)"},{"line_number":724,"context_line":"        mock__op.assert_called_with("},{"line_number":725,"context_line":"            self.conn,"},{"line_number":726,"context_line":"            \"PATCH\","},{"line_number":727,"context_line":"            \u0027/redfish/v1/Systems/1\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7252c4f2_423aabed","line":724,"updated":"2022-10-26 11:10:15.000000000","message":"ditto","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b50ed1915e7878244284dd8520ffa9b0d098f4a6","unresolved":false,"context_lines":[{"line_number":721,"context_line":"        self.conn._etag_handler(path\u003dtarget_uri, headers\u003dself.headers,"},{"line_number":722,"context_line":"                                data\u003ddata, etag\u003dself.headers[\u0027If-Match\u0027],"},{"line_number":723,"context_line":"                                blocking\u003dFalse, timeout\u003d60)"},{"line_number":724,"context_line":"        mock__op.assert_called_with("},{"line_number":725,"context_line":"            self.conn,"},{"line_number":726,"context_line":"            \"PATCH\","},{"line_number":727,"context_line":"            \u0027/redfish/v1/Systems/1\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9084d363_3872bccf","line":724,"in_reply_to":"7252c4f2_423aabed","updated":"2022-10-26 12:52:13.000000000","message":"Done.","commit_id":"3e69fce709765e317cfd0288b7c119e757f94117"}]}
