)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7979,"name":"Mikhail S Medvedev","email":"mihailmed@gmail.com","username":"msmedved"},"change_message_id":"d7c7e6ef85428948ccd3e80741bc70ee785aff2e","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-10-14 12:16:46 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Grab consoleLog cropped until full version is flushed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Grep and stat were producing the error \"No such file or directory\""},{"line_number":10,"context_line":"while the consoleLog was not available to download. Creating an"},{"line_number":11,"context_line":"empty file resolves the problem. It\u0027s also possible to debug any"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5a2ca52d_71cb2a54","line":8,"updated":"2015-10-14 18:35:00.000000000","message":"A nit: the commit message title does not reflect what commit does. Better would be to say \u0027Fix \"no such file\" errors during console.html download\u0027","commit_id":"18651d86cf5590da1fc7d20cee75e6fc6bdc733a"}],"jenkins/scripts/grab_console_log.sh":[{"author":{"_account_id":7979,"name":"Mikhail S Medvedev","email":"mihailmed@gmail.com","username":"msmedved"},"change_message_id":"a52008ff30864dc204e3b7738ecd38b90dd9fbcd","unresolved":false,"context_lines":[{"line_number":8,"context_line":"echo \"Grabbing consoleLog ($END_UUID)\""},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"# Since we are appending to fetched logs, remove any possibly old runs"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"rm -f /tmp/console.html"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"# Grab the HTML version of the log (includes timestamps)"}],"source_content_type":"text/x-sh","patch_set":1,"id":"7a2fa921_76d53eb7","line":11,"updated":"2015-10-07 17:05:57.000000000","message":"extra new line","commit_id":"2ae9bc9e494c9507ef5baed8968da94f5f1d27ed"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"70c55c293b96d9713408c8eeba1ed5a5c1a89790","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    #        fails. This allows us to retry when we have Jenkins proxy"},{"line_number":30,"context_line":"    #        errors without polluting the output document."},{"line_number":31,"context_line":"    # --insecure because our Jenkins masters use self signed SSL certs."},{"line_number":32,"context_line":"    curl -X POST --data \"start\u003d$(stat -c %s /tmp/console.html \u003e /dev/null 2\u003e\u00261 || echo 0)\" --fail --insecure $BUILD_URL$console_log_path \u003e\u003e /tmp/console.html || true"},{"line_number":33,"context_line":"done"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# We need to add \u003cpre\u003e tags around the output for log-osanalyze to not escape"}],"source_content_type":"text/x-sh","patch_set":1,"id":"7a2fa921_786f72c5","line":32,"updated":"2015-10-07 15:35:52.000000000","message":"I would just add a curl -XPOST to before the while loop so that we start with a valid console.html file. Just hard set data to \"start\u003d0\" since we are starting at the beginning of the file the first time around.\n\nThis way any grep errors are valid and should be logged.","commit_id":"2ae9bc9e494c9507ef5baed8968da94f5f1d27ed"},{"author":{"_account_id":7979,"name":"Mikhail S Medvedev","email":"mihailmed@gmail.com","username":"msmedved"},"change_message_id":"a52008ff30864dc204e3b7738ecd38b90dd9fbcd","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    #        fails. This allows us to retry when we have Jenkins proxy"},{"line_number":30,"context_line":"    #        errors without polluting the output document."},{"line_number":31,"context_line":"    # --insecure because our Jenkins masters use self signed SSL certs."},{"line_number":32,"context_line":"    curl -X POST --data \"start\u003d$(stat -c %s /tmp/console.html \u003e /dev/null 2\u003e\u00261 || echo 0)\" --fail --insecure $BUILD_URL$console_log_path \u003e\u003e /tmp/console.html || true"},{"line_number":33,"context_line":"done"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# We need to add \u003cpre\u003e tags around the output for log-osanalyze to not escape"}],"source_content_type":"text/x-sh","patch_set":1,"id":"7a2fa921_d64f72bb","line":32,"in_reply_to":"7a2fa921_53e854b4","updated":"2015-10-07 17:05:57.000000000","message":"Even simpler fix might be to replace rm -f with \u0027echo \u003e /tmp/console.html\u0027","commit_id":"2ae9bc9e494c9507ef5baed8968da94f5f1d27ed"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"f284a5167cc0c9069f0345f9bd28dbb303c1eb7a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    #        fails. This allows us to retry when we have Jenkins proxy"},{"line_number":30,"context_line":"    #        errors without polluting the output document."},{"line_number":31,"context_line":"    # --insecure because our Jenkins masters use self signed SSL certs."},{"line_number":32,"context_line":"    curl -X POST --data \"start\u003d$(stat -c %s /tmp/console.html \u003e /dev/null 2\u003e\u00261 || echo 0)\" --fail --insecure $BUILD_URL$console_log_path \u003e\u003e /tmp/console.html || true"},{"line_number":33,"context_line":"done"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# We need to add \u003cpre\u003e tags around the output for log-osanalyze to not escape"}],"source_content_type":"text/x-sh","patch_set":1,"id":"7a2fa921_33ccbb69","line":32,"in_reply_to":"7a2fa921_786f72c5","updated":"2015-10-07 15:58:52.000000000","message":"Or even more simple do a \"touch /tmp/console.html\u0027 after the rm in line 12?","commit_id":"2ae9bc9e494c9507ef5baed8968da94f5f1d27ed"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"560a53d907b0629b6f1eac94293fe39674e8c5cc","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    #        fails. This allows us to retry when we have Jenkins proxy"},{"line_number":30,"context_line":"    #        errors without polluting the output document."},{"line_number":31,"context_line":"    # --insecure because our Jenkins masters use self signed SSL certs."},{"line_number":32,"context_line":"    curl -X POST --data \"start\u003d$(stat -c %s /tmp/console.html \u003e /dev/null 2\u003e\u00261 || echo 0)\" --fail --insecure $BUILD_URL$console_log_path \u003e\u003e /tmp/console.html || true"},{"line_number":33,"context_line":"done"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# We need to add \u003cpre\u003e tags around the output for log-osanalyze to not escape"}],"source_content_type":"text/x-sh","patch_set":1,"id":"7a2fa921_53e854b4","line":32,"in_reply_to":"7a2fa921_786f72c5","updated":"2015-10-07 16:46:41.000000000","message":"The curl before the loop does not guarantee we have the console file. That\u0027s the reason we see \"no such file\", it takes a while to flush something to the disk so the file won\u0027t exist at the first try.","commit_id":"2ae9bc9e494c9507ef5baed8968da94f5f1d27ed"},{"author":{"_account_id":7979,"name":"Mikhail S Medvedev","email":"mihailmed@gmail.com","username":"msmedved"},"change_message_id":"b320eb76c7382566e1c3f3273aed206ec12feb26","unresolved":false,"context_lines":[{"line_number":18,"context_line":"while ! grep -q \"$END_UUID\" /tmp/console.html; do"},{"line_number":19,"context_line":"    TRIES\u003d$((TRIES+1))"},{"line_number":20,"context_line":"    if [ $TRIES -gt $RETRY_LIMIT ]; then"},{"line_number":21,"context_line":"        echo \"Failed grabbing consoleLog ($END_UUID) within $RETRY_LIMIT retries.\""},{"line_number":22,"context_line":"        break"},{"line_number":23,"context_line":"    fi"},{"line_number":24,"context_line":"    sleep 3"}],"source_content_type":"text/x-sh","patch_set":2,"id":"7a2fa921_c17d5fb2","line":21,"updated":"2015-10-14 13:30:38.000000000","message":"No need to echo ($END_UUID) again","commit_id":"af74e352fa5cf0e7a99704d8f1b5765830a0922e"},{"author":{"_account_id":8175,"name":"Rafael Folco","email":"rfolco@redhat.com","username":"rfolco"},"change_message_id":"9c6e54b449e8816b06b5ef9247840b5bbb8098ea","unresolved":false,"context_lines":[{"line_number":18,"context_line":"while ! grep -q \"$END_UUID\" /tmp/console.html; do"},{"line_number":19,"context_line":"    TRIES\u003d$((TRIES+1))"},{"line_number":20,"context_line":"    if [ $TRIES -gt $RETRY_LIMIT ]; then"},{"line_number":21,"context_line":"        echo \"Failed grabbing consoleLog ($END_UUID) within $RETRY_LIMIT retries.\""},{"line_number":22,"context_line":"        break"},{"line_number":23,"context_line":"    fi"},{"line_number":24,"context_line":"    sleep 3"}],"source_content_type":"text/x-sh","patch_set":2,"id":"5a2ca52d_f26e66c8","line":21,"in_reply_to":"7a2fa921_c17d5fb2","updated":"2015-10-14 14:23:36.000000000","message":"Ok.","commit_id":"af74e352fa5cf0e7a99704d8f1b5765830a0922e"}]}
