)]}'
{"devstack-vm-gate-wrap.sh":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"5743c07df8a0b942407e1ee7c67f44bfb5bf8c66","unresolved":false,"context_lines":[{"line_number":27,"context_line":"}"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"function attempt_and_timeout {"},{"line_number":30,"context_line":"    MAX_ATTEMPTS\u003d3"},{"line_number":31,"context_line":"    COUNT\u003d0"},{"line_number":32,"context_line":"    until timeout -k 1m 5m $@; do"},{"line_number":33,"context_line":"        COUNT\u003d$(($COUNT + 1))"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAATn%2F%2BAgQ%3D","line":30,"updated":"2013-12-03 15:04:28.000000000","message":"these really need to be local variables","commit_id":"e173f2039f3497b0e67bb447845c3f2374f4ff01"},{"author":{"_account_id":9084,"name":"Shantanu Tushar","email":"shaan7in@gmail.com","username":"shaan7"},"change_message_id":"c029606a0d1b694017ff4c3913f7f80e8b3a394e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"}"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"function attempt_and_timeout {"},{"line_number":30,"context_line":"    MAX_ATTEMPTS\u003d3"},{"line_number":31,"context_line":"    COUNT\u003d0"},{"line_number":32,"context_line":"    until timeout -k 1m 5m $@; do"},{"line_number":33,"context_line":"        COUNT\u003d$(($COUNT + 1))"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAATn%2F%2BAcQ%3D","line":30,"in_reply_to":"AAAATn%2F%2BAgQ%3D","updated":"2013-12-03 15:17:04.000000000","message":"Not sure I understand, the vars MAX_ATTEMPTS and COUNT are inside the function, that makes them local right? Or am I missing something?","commit_id":"e173f2039f3497b0e67bb447845c3f2374f4ff01"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"5743c07df8a0b942407e1ee7c67f44bfb5bf8c66","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        if [ $COUNT -eq $MAX_ATTEMPTS ]; then"},{"line_number":36,"context_line":"            exit 1"},{"line_number":37,"context_line":"        fi"},{"line_number":38,"context_line":"        SLEEP_TIME\u003d$((30 + $RANDOM % 60))"},{"line_number":39,"context_line":"        echo \"sleep $SLEEP_TIME before retrying.\""},{"line_number":40,"context_line":"        sleep $SLEEP_TIME"},{"line_number":41,"context_line":"    done"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAATn%2F%2BAf8%3D","line":38,"updated":"2013-12-03 15:04:28.000000000","message":"where is RANDOM set?\n\nalso, sleep should be a local variable","commit_id":"e173f2039f3497b0e67bb447845c3f2374f4ff01"},{"author":{"_account_id":9084,"name":"Shantanu Tushar","email":"shaan7in@gmail.com","username":"shaan7"},"change_message_id":"c029606a0d1b694017ff4c3913f7f80e8b3a394e","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        if [ $COUNT -eq $MAX_ATTEMPTS ]; then"},{"line_number":36,"context_line":"            exit 1"},{"line_number":37,"context_line":"        fi"},{"line_number":38,"context_line":"        SLEEP_TIME\u003d$((30 + $RANDOM % 60))"},{"line_number":39,"context_line":"        echo \"sleep $SLEEP_TIME before retrying.\""},{"line_number":40,"context_line":"        sleep $SLEEP_TIME"},{"line_number":41,"context_line":"    done"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAATn%2F%2BAcc%3D","line":38,"in_reply_to":"AAAATn%2F%2BAf8%3D","updated":"2013-12-03 15:17:04.000000000","message":"RANDOM is a shell built in","commit_id":"e173f2039f3497b0e67bb447845c3f2374f4ff01"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"31888752fbb3029116df1c5fae9eeb22a4770212","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        OVERRIDE_ZUUL_REF\u003d$(echo $ZUUL_REF | sed -e \"s,$branch,$OVERRIDE_ZUUL_BRANCH,\")"},{"line_number":129,"context_line":"    fi"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    # Attempt a git remote update. Run for up to 5 minutes before killing."},{"line_number":132,"context_line":"    # If first SIGTERM does not kill the process wait a minute then SIGKILL."},{"line_number":133,"context_line":"    # If update fails try again for up to a total of 3 attempts."},{"line_number":134,"context_line":"    attempt_and_timeout git remote update"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAATn%2F%2BAhE%3D","line":131,"updated":"2013-12-03 15:00:39.000000000","message":"Could you please move this comment up to the function? It\u0027s not longer relevant right here.","commit_id":"e173f2039f3497b0e67bb447845c3f2374f4ff01"},{"author":{"_account_id":9084,"name":"Shantanu Tushar","email":"shaan7in@gmail.com","username":"shaan7"},"change_message_id":"c029606a0d1b694017ff4c3913f7f80e8b3a394e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        OVERRIDE_ZUUL_REF\u003d$(echo $ZUUL_REF | sed -e \"s,$branch,$OVERRIDE_ZUUL_BRANCH,\")"},{"line_number":129,"context_line":"    fi"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    # Attempt a git remote update. Run for up to 5 minutes before killing."},{"line_number":132,"context_line":"    # If first SIGTERM does not kill the process wait a minute then SIGKILL."},{"line_number":133,"context_line":"    # If update fails try again for up to a total of 3 attempts."},{"line_number":134,"context_line":"    attempt_and_timeout git remote update"}],"source_content_type":"text/x-sh","patch_set":1,"id":"AAAATn%2F%2BAck%3D","line":131,"in_reply_to":"AAAATn%2F%2BAhE%3D","updated":"2013-12-03 15:17:04.000000000","message":"Done","commit_id":"e173f2039f3497b0e67bb447845c3f2374f4ff01"}]}
