)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"17d34262a7126e332b9ca91733e7d3861ce3d107","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make perfload jobs fail if write allocation fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This uses curl -f when writing an allocation in order to detect when"},{"line_number":10,"context_line":"the server has responded with a HTTP error code and then fails the job"},{"line_number":11,"context_line":"if so. The idea behind this is to catch when PUT"},{"line_number":12,"context_line":"/allocations/{consumer_uuid} required parameters change and the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1770d058_13023c90","line":9,"range":{"start_line":9,"start_character":14,"end_line":9,"end_character":17},"updated":"2022-02-09 08:23:16.000000000","message":"I think --fail-with-body would be better. Both -f and --fail-with-body returns error code 22 on HTTP400 or greater response but --fail-with-body still prints the response. So with --fail-with-body we could see from the logs why the allocation failed.","commit_id":"9ebc947a4609cbc24ee16ecfbb946b353be5043e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2fd6ac67f3aed4ae53d50276ee9ffc4c3c7a8d6f","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make perfload jobs fail if write allocation fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This uses curl -f when writing an allocation in order to detect when"},{"line_number":10,"context_line":"the server has responded with a HTTP error code and then fails the job"},{"line_number":11,"context_line":"if so. The idea behind this is to catch when PUT"},{"line_number":12,"context_line":"/allocations/{consumer_uuid} required parameters change and the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"447423fb_3333eec5","line":9,"range":{"start_line":9,"start_character":14,"end_line":9,"end_character":17},"in_reply_to":"1770d058_13023c90","updated":"2022-02-09 17:14:31.000000000","message":"Ah cool, I missed that. I will update this to use it.","commit_id":"9ebc947a4609cbc24ee16ecfbb946b353be5043e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e8d1aed35880f97ace18a1ef668b238ec0e68e1d","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make perfload jobs fail if write allocation fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This uses curl -f when writing an allocation in order to detect when"},{"line_number":10,"context_line":"the server has responded with a HTTP error code and then fails the job"},{"line_number":11,"context_line":"if so. The idea behind this is to catch when PUT"},{"line_number":12,"context_line":"/allocations/{consumer_uuid} required parameters change and the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9e0bbeb8_7769f4dd","line":9,"range":{"start_line":9,"start_character":14,"end_line":9,"end_character":17},"in_reply_to":"447423fb_3333eec5","updated":"2022-02-09 17:18:23.000000000","message":"Ah, it\u0027s bc I have curl 7.68.0 in my ubuntu focal VM and --fail-with-body was added in 7.76.0 apparently. I will try here and see what happens.","commit_id":"9ebc947a4609cbc24ee16ecfbb946b353be5043e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e8dc0d7fde394a8233ef6649f39acc6f8750b467","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make perfload jobs fail if write allocation fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This uses curl -f when writing an allocation in order to detect when"},{"line_number":10,"context_line":"the server has responded with a HTTP error code and then fails the job"},{"line_number":11,"context_line":"if so. The idea behind this is to catch when PUT"},{"line_number":12,"context_line":"/allocations/{consumer_uuid} required parameters change and the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ecd44cd2_a3a633f8","line":9,"range":{"start_line":9,"start_character":14,"end_line":9,"end_character":17},"in_reply_to":"9e0bbeb8_7769f4dd","updated":"2022-02-10 09:48:05.000000000","message":"I see we don\u0027t have new enough curl on the gate images either. Then lets use -f","commit_id":"9ebc947a4609cbc24ee16ecfbb946b353be5043e"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"65d52449572ddd84f35408d87f366e2726a4e30c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"36a7b271_28a8d295","updated":"2022-02-08 23:58:05.000000000","message":"Looks like this is working as intended:\n\nhttps://zuul.opendev.org/t/openstack/build/8f72e0422aa14a4089190e588ea4063e\nhttps://zuul.opendev.org/t/openstack/build/37c1f53738d741d1add3f0eea1bd5071\n\nI\u0027m going to rebase this on top of gibi\u0027s fix patch now.","commit_id":"9e0ca13bb30e6b9f7348d54d9d132d7eaf4e7b3b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"17d34262a7126e332b9ca91733e7d3861ce3d107","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9773f41a_4f6ba3a0","updated":"2022-02-09 08:23:16.000000000","message":"Thanks Melanie! I have one suggestion inline","commit_id":"9ebc947a4609cbc24ee16ecfbb946b353be5043e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a9502e301d37a831cf02ec5ff44d6e793e1a8019","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"297c16e0_521a2009","updated":"2022-02-09 21:25:07.000000000","message":":( 2022-02-09 20:12:16.448534 | ubuntu-focal | curl: option --fail-with-body: is unknown\n\nhttps://zuul.opendev.org/t/openstack/build/df04e847a106488f916183ee25753827/log/job-output.txt#1163\n\nIronically, the job didn\u0027t fail when the curl call failed 😆","commit_id":"4710a6692973f72a698143a53f3c40d35902ce48"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ea79946d374884e6ea8b85bf57452fc23ca981ae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"176ea0a7_cb858d4b","updated":"2022-02-28 13:11:22.000000000","message":"Thanks!","commit_id":"350de8a793afc3ba47fefb9cc25cff8b5565c181"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"9f7a62e044168816c3fb923cc098baeb365ed1ff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"54c4b213_91adecfd","updated":"2022-04-01 18:57:39.000000000","message":"recheck fetching fresh log","commit_id":"350de8a793afc3ba47fefb9cc25cff8b5565c181"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3b610123dbaf712ecb08bc6bc515f6c8b7e9e021","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"8b52570b_61b28423","updated":"2022-04-22 07:24:26.000000000","message":"Looks good","commit_id":"9171aae39f0af9f31dfa319923b910fd839cb319"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"b8c95d43ccca3564c5c4fcfdb9510af067322838","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"d1c5193e_3c57ddb6","updated":"2022-04-03 20:55:01.000000000","message":"lgtm, jobs are working fine now.","commit_id":"9171aae39f0af9f31dfa319923b910fd839cb319"}],"gate/perfload-runner.sh":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"bc71c663f7f5118f14f6ce8e3b9c0e02dfb113df","unresolved":true,"context_lines":[{"line_number":76,"context_line":"    if [[ $? -eq 22 ]]; then"},{"line_number":77,"context_line":"        echo \"Failed to write allocation due to a server error. See logs/placement-api.log for additional detail.\""},{"line_number":78,"context_line":"        exit 1"},{"line_number":79,"context_line":"    elif [[ $? -ne 0 ]]; then"},{"line_number":80,"context_line":"        echo \"See job-output.txt for additional detail.\""},{"line_number":81,"context_line":"        exit 1"},{"line_number":82,"context_line":"    fi"},{"line_number":83,"context_line":"}"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"function load_candidates {"},{"line_number":86,"context_line":"    time_candidates"}],"source_content_type":"text/x-sh","patch_set":4,"id":"c7d5c512_e7a1beec","line":83,"range":{"start_line":79,"start_character":0,"end_line":83,"end_character":1},"updated":"2022-04-01 22:09:42.000000000","message":"this seems not working.\n\nI can see allocation request is passing with 200 success code but still it goes into this else block and fail the job\n\nhttps://zuul.opendev.org/t/openstack/build/4be09db824a2422ab7e703cce5cea093/log/logs/placement-api.log#14317\n\nhttps://zuul.opendev.org/t/openstack/build/4be09db824a2422ab7e703cce5cea093/log/job-output.txt#1172","commit_id":"350de8a793afc3ba47fefb9cc25cff8b5565c181"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"b8c95d43ccca3564c5c4fcfdb9510af067322838","unresolved":true,"context_lines":[{"line_number":76,"context_line":"    if [[ $? -eq 22 ]]; then"},{"line_number":77,"context_line":"        echo \"Failed to write allocation due to a server error. See logs/placement-api.log for additional detail.\""},{"line_number":78,"context_line":"        exit 1"},{"line_number":79,"context_line":"    elif [[ $? -ne 0 ]]; then"},{"line_number":80,"context_line":"        echo \"See job-output.txt for additional detail.\""},{"line_number":81,"context_line":"        exit 1"},{"line_number":82,"context_line":"    fi"},{"line_number":83,"context_line":"}"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"function load_candidates {"},{"line_number":86,"context_line":"    time_candidates"}],"source_content_type":"text/x-sh","patch_set":4,"id":"dfe6faa5_9d128805","line":83,"range":{"start_line":79,"start_character":0,"end_line":83,"end_character":1},"in_reply_to":"aeb8d455_9a62fded","updated":"2022-04-03 20:55:01.000000000","message":"thanks melwitt for debugging and sharing it. It is new thing for me and good to know.","commit_id":"350de8a793afc3ba47fefb9cc25cff8b5565c181"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fa3b677ee99b2fd06ae64741c8aa5175e2183473","unresolved":true,"context_lines":[{"line_number":76,"context_line":"    if [[ $? -eq 22 ]]; then"},{"line_number":77,"context_line":"        echo \"Failed to write allocation due to a server error. See logs/placement-api.log for additional detail.\""},{"line_number":78,"context_line":"        exit 1"},{"line_number":79,"context_line":"    elif [[ $? -ne 0 ]]; then"},{"line_number":80,"context_line":"        echo \"See job-output.txt for additional detail.\""},{"line_number":81,"context_line":"        exit 1"},{"line_number":82,"context_line":"    fi"},{"line_number":83,"context_line":"}"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"function load_candidates {"},{"line_number":86,"context_line":"    time_candidates"}],"source_content_type":"text/x-sh","patch_set":4,"id":"aeb8d455_9a62fded","line":83,"range":{"start_line":79,"start_character":0,"end_line":83,"end_character":1},"in_reply_to":"c7d5c512_e7a1beec","updated":"2022-04-01 23:45:11.000000000","message":"Well, I learned something new today. Apparently the \"$? -eq 22\" expression itself will get its result stored in $? [1], so $? changes between L76 and L79.\n\nI changed it to store the return code from curl in $rc which I should have done originally and I don\u0027t know why I didn\u0027t.\n\n[1] https://stackoverflow.com/questions/32519018/why-is-the-value-of-changed-in-the-if-condition","commit_id":"350de8a793afc3ba47fefb9cc25cff8b5565c181"}]}
