)]}'
{"sahara/tests/integration/tests/resources/sentry_service_test.sh":[{"author":{"_account_id":12707,"name":"Jacob Bin Wang","email":"wangbin@awcloud.com","username":"Jacob"},"change_message_id":"a46a047031d61992bb8bf81bf73092fb08601693","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash -x"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"set -e"},{"line_number":4,"context_line":"log\u003d/tmp/config-test-log.txt"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"case $1 in"},{"line_number":7,"context_line":"    check_sentry)"}],"source_content_type":"text/x-sh","patch_set":2,"id":"ba7be1f8_a9858808","line":4,"updated":"2015-03-02 01:20:12.000000000","message":"Same log file with cluster_config_test_script.sh? Please change this.","commit_id":"8349d104451eef375b6575dda772111a929582f3"},{"author":{"_account_id":13953,"name":"Elise Gafford","email":"egafford@redhat.com","username":"egafford"},"change_message_id":"c8b732e808f8e7e60bf54e195567cd0a9a14e077","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    sudo cp $conffile $conffile_tmp"},{"line_number":29,"context_line":"    sudo chmod 664 $conffile_tmp"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    export HADOOP_CLASSPATH\u003d:/usr/share/cmf/lib/postgresql-9.0-801.jdbc4.jar"},{"line_number":32,"context_line":"    sentry --command schema-tool -conffile $conffile_tmp -dbType postgres -info"},{"line_number":33,"context_line":"    if [ $? -eq 0 ]; then"},{"line_number":34,"context_line":"        echo \"Sentry schema-tool Successful\" \u003e\u003e $log"}],"source_content_type":"text/x-sh","patch_set":2,"id":"ba7be1f8_02e71bad","line":31,"updated":"2015-02-24 15:32:14.000000000","message":"Is it safe to bind against this specific a version of postgres? Matching major and minor versions seems fine, but point releases seem like they\u0027ll make this code unnecessarily brittle.","commit_id":"8349d104451eef375b6575dda772111a929582f3"},{"author":{"_account_id":8091,"name":"Trevor McKay","email":"tmckay@redhat.com","username":"tmckay"},"change_message_id":"f4623c4d8ef7c2a99a9631c1ce41ef75ba68b9fe","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    sudo cp $conffile $conffile_tmp"},{"line_number":29,"context_line":"    sudo chmod 664 $conffile_tmp"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    export HADOOP_CLASSPATH\u003d:/usr/share/cmf/lib/postgresql-9.0-801.jdbc4.jar"},{"line_number":32,"context_line":"    sentry --command schema-tool -conffile $conffile_tmp -dbType postgres -info"},{"line_number":33,"context_line":"    if [ $? -eq 0 ]; then"},{"line_number":34,"context_line":"        echo \"Sentry schema-tool Successful\" \u003e\u003e $log"}],"source_content_type":"text/x-sh","patch_set":2,"id":"ba7be1f8_f30bb78b","line":31,"in_reply_to":"ba7be1f8_02e71bad","updated":"2015-02-24 16:15:17.000000000","message":"+1, that\u0027s a valid point","commit_id":"8349d104451eef375b6575dda772111a929582f3"},{"author":{"_account_id":7710,"name":"Sergey Reshetnyak","email":"sreshetniak@mirantis.com","username":"sreshetniak"},"change_message_id":"99d48e54ddf31e3499adbf0f7fc8f21828c49164","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    check_sentry)"},{"line_number":8,"context_line":"        FUNC\u003d\"check_sentry\""},{"line_number":9,"context_line":"    ;;"},{"line_number":10,"context_line":"    check_sentry_hive)"},{"line_number":11,"context_line":"        FUNC\u003d\"check_sentry_hive\""},{"line_number":12,"context_line":"    ;;"},{"line_number":13,"context_line":"    check_sentry_impala)"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ba7be1f8_5e7d631b","line":10,"updated":"2015-03-03 06:14:09.000000000","message":"unused function in tests. need to remove it","commit_id":"f24d67e725ad59f872b06847330f6816746db31c"},{"author":{"_account_id":7710,"name":"Sergey Reshetnyak","email":"sreshetniak@mirantis.com","username":"sreshetniak"},"change_message_id":"99d48e54ddf31e3499adbf0f7fc8f21828c49164","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    check_sentry_hive)"},{"line_number":11,"context_line":"        FUNC\u003d\"check_sentry_hive\""},{"line_number":12,"context_line":"    ;;"},{"line_number":13,"context_line":"    check_sentry_impala)"},{"line_number":14,"context_line":"        FUNC\u003d\"check_sentry_impala\""},{"line_number":15,"context_line":"    ;;"},{"line_number":16,"context_line":"esac"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ba7be1f8_7e7a2725","line":13,"updated":"2015-03-03 06:14:09.000000000","message":"ditto","commit_id":"f24d67e725ad59f872b06847330f6816746db31c"},{"author":{"_account_id":13953,"name":"Elise Gafford","email":"egafford@redhat.com","username":"egafford"},"change_message_id":"3b4e65dd61af22747e382383f75899efa48de384","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    sudo cp $conffile $conffile_tmp"},{"line_number":29,"context_line":"    sudo chmod 664 $conffile_tmp"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    psql_jar\u003d$(ls /usr/share/cmf/lib/postgresql* | head -1)"},{"line_number":32,"context_line":"    export HADOOP_CLASSPATH\u003d:$psql_jar"},{"line_number":33,"context_line":"    sentry --command schema-tool -conffile $conffile_tmp -dbType postgres -info"},{"line_number":34,"context_line":"    if [ $? -eq 0 ]; then"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ba7be1f8_a4011408","line":31,"updated":"2015-03-02 15:34:34.000000000","message":"If you know that there will always be exactly one postgresql jar here, this is okay, but tail will generally get you a more recent version.","commit_id":"f24d67e725ad59f872b06847330f6816746db31c"},{"author":{"_account_id":12707,"name":"Jacob Bin Wang","email":"wangbin@awcloud.com","username":"Jacob"},"change_message_id":"1a7b925b4ee8fd9ac0e5e8229bf9fc2aca70e60b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"check_sentry_hive(){"},{"line_number":44,"context_line":"    echo \"check hive with sentry check\""},{"line_number":45,"context_line":"}"},{"line_number":46,"context_line":"check_sentry_impala(){"},{"line_number":47,"context_line":"    echo \"check impala with sentry check\""}],"source_content_type":"text/x-sh","patch_set":4,"id":"ba7be1f8_c2a8bf79","line":44,"updated":"2015-03-03 03:17:20.000000000","message":"Why just echo? What is this for?","commit_id":"f24d67e725ad59f872b06847330f6816746db31c"},{"author":{"_account_id":12707,"name":"Jacob Bin Wang","email":"wangbin@awcloud.com","username":"Jacob"},"change_message_id":"1a7b925b4ee8fd9ac0e5e8229bf9fc2aca70e60b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    echo \"check hive with sentry check\""},{"line_number":45,"context_line":"}"},{"line_number":46,"context_line":"check_sentry_impala(){"},{"line_number":47,"context_line":"    echo \"check impala with sentry check\""},{"line_number":48,"context_line":"}"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"$FUNC"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ba7be1f8_e2b6a3db","line":47,"updated":"2015-03-03 03:17:20.000000000","message":"ditto","commit_id":"f24d67e725ad59f872b06847330f6816746db31c"},{"author":{"_account_id":7710,"name":"Sergey Reshetnyak","email":"sreshetniak@mirantis.com","username":"sreshetniak"},"change_message_id":"339febc2824d5a7cbebc0bedf289a09d04930604","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    psql_jar\u003d$(ls /usr/share/cmf/lib/postgresql* | head -1)"},{"line_number":20,"context_line":"    export HADOOP_CLASSPATH\u003d:$psql_jar"},{"line_number":21,"context_line":"    sentry --command schema-tool -conffile $conffile_tmp -dbType postgres -info"},{"line_number":22,"context_line":"    if [ $? -eq 0 ]; then"},{"line_number":23,"context_line":"        echo \"Sentry schema-tool Successful\" \u003e\u003e $log"},{"line_number":24,"context_line":"        exit 0"}],"source_content_type":"text/x-sh","patch_set":5,"id":"ba7be1f8_7fd941f2","line":21,"updated":"2015-03-03 08:07:24.000000000","message":"if sentry command return non-zero code then script will be completed with this code. Check for exit code makes no sense.","commit_id":"fae11b8ba381036e2975c981e200f42c2e64abd8"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"8440e9849b9a7ea641e22f28afc79104e172c1f9","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    psql_jar\u003d$(ls /usr/share/cmf/lib/postgresql* | head -1)"},{"line_number":20,"context_line":"    export HADOOP_CLASSPATH\u003d:$psql_jar"},{"line_number":21,"context_line":"    sentry --command schema-tool -conffile $conffile_tmp -dbType postgres -info"},{"line_number":22,"context_line":"    if [ $? -eq 0 ]; then"},{"line_number":23,"context_line":"        echo \"Sentry schema-tool Successful\" \u003e\u003e $log"},{"line_number":24,"context_line":"        exit 0"}],"source_content_type":"text/x-sh","patch_set":5,"id":"ba7be1f8_a50c7543","line":21,"in_reply_to":"ba7be1f8_54245f5f","updated":"2015-03-03 15:53:03.000000000","message":"without the following if/else clause this function will exit with the return value from the sentry command. so the if/else is largely unneeded, aside from echoing into the $log.","commit_id":"fae11b8ba381036e2975c981e200f42c2e64abd8"},{"author":{"_account_id":9740,"name":"lu huichun","email":"huichun.lu@intel.com","username":"luhuichun"},"change_message_id":"ceb638b30ea420ec2c61a7fbe81be14c9b629d1d","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    psql_jar\u003d$(ls /usr/share/cmf/lib/postgresql* | head -1)"},{"line_number":20,"context_line":"    export HADOOP_CLASSPATH\u003d:$psql_jar"},{"line_number":21,"context_line":"    sentry --command schema-tool -conffile $conffile_tmp -dbType postgres -info"},{"line_number":22,"context_line":"    if [ $? -eq 0 ]; then"},{"line_number":23,"context_line":"        echo \"Sentry schema-tool Successful\" \u003e\u003e $log"},{"line_number":24,"context_line":"        exit 0"}],"source_content_type":"text/x-sh","patch_set":5,"id":"ba7be1f8_54245f5f","line":21,"in_reply_to":"ba7be1f8_7fd941f2","updated":"2015-03-03 08:49:44.000000000","message":"@Sergey Reshetnyak, Hi Sergey, if sentry command return non-zero code, this script will be exit with 1, do you mean this script will exit with 0?","commit_id":"fae11b8ba381036e2975c981e200f42c2e64abd8"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"c357a12fd5aa61248c347fd733b5915aa2f44d5e","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    psql_jar\u003d$(ls /usr/share/cmf/lib/postgresql* | head -1)"},{"line_number":20,"context_line":"    export HADOOP_CLASSPATH\u003d:$psql_jar"},{"line_number":21,"context_line":"    sentry --command schema-tool -conffile $conffile_tmp -dbType postgres -info"},{"line_number":22,"context_line":"    if [ $? -eq 0 ]; then"},{"line_number":23,"context_line":"        echo \"Sentry schema-tool Successful\" \u003e\u003e $log"},{"line_number":24,"context_line":"        exit 0"}],"source_content_type":"text/x-sh","patch_set":5,"id":"ba7be1f8_ca323cf1","line":21,"in_reply_to":"ba7be1f8_89906b44","updated":"2015-03-04 01:03:23.000000000","message":"not a bad idea, i guess it depends on what the expected output from this should be.","commit_id":"fae11b8ba381036e2975c981e200f42c2e64abd8"},{"author":{"_account_id":8091,"name":"Trevor McKay","email":"tmckay@redhat.com","username":"tmckay"},"change_message_id":"f9669fd8a8dea63d7ac9edf87d30c96e5026d4ba","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    psql_jar\u003d$(ls /usr/share/cmf/lib/postgresql* | head -1)"},{"line_number":20,"context_line":"    export HADOOP_CLASSPATH\u003d:$psql_jar"},{"line_number":21,"context_line":"    sentry --command schema-tool -conffile $conffile_tmp -dbType postgres -info"},{"line_number":22,"context_line":"    if [ $? -eq 0 ]; then"},{"line_number":23,"context_line":"        echo \"Sentry schema-tool Successful\" \u003e\u003e $log"},{"line_number":24,"context_line":"        exit 0"}],"source_content_type":"text/x-sh","patch_set":5,"id":"ba7be1f8_89906b44","line":21,"in_reply_to":"ba7be1f8_a50c7543","updated":"2015-03-03 16:33:01.000000000","message":"Hmm, I can see the value of logging.  Should the if/else below record the actual error code in the log? If we\u0027re actually going to log the failure, makes sense to me to store the actual error code and then return 1 to Sahara.","commit_id":"fae11b8ba381036e2975c981e200f42c2e64abd8"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"97c16a501f7abc67d5c1e63be1a2e28b5fd80095","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    export HADOOP_CLASSPATH\u003d:$psql_jar"},{"line_number":21,"context_line":"    sentry --command schema-tool -conffile $conffile_tmp -dbType postgres -info \u0026\u003e\u003e $log"},{"line_number":22,"context_line":"    if [ $? -eq 0 ]; then"},{"line_number":23,"context_line":"        echo \"Sentry schema-tool Successful\""},{"line_number":24,"context_line":"        exit 0"},{"line_number":25,"context_line":"    else"},{"line_number":26,"context_line":"        echo \"Sentry schema-tool Fail\""}],"source_content_type":"text/x-sh","patch_set":6,"id":"9a80dd14_0d90a394","line":23,"updated":"2015-03-04 15:05:19.000000000","message":"i think these echo statements make less sense now that the logging has been moved to the command. how would anyone see these?\n\nwe could probably just remove the entire if/else as Sergey had previously suggested.","commit_id":"5665cee1b7ff15a059fcc4bc31697d7af29294ec"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"eadb77657b1d1cd1eea08066ff0e2decfb90b184","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash -x"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"set -e"},{"line_number":4,"context_line":"log\u003d/tmp/config-sentry-test-log.txt"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"check_sentry(){"}],"source_content_type":"text/x-sh","patch_set":7,"id":"9a80dd14_714b9fb0","line":3,"updated":"2015-03-05 00:57:32.000000000","message":"-e or -x flag are both for bash, so you could:\n    #!/bin/bash -ex\nor\n    set -e\n    set -x","commit_id":"0a4b69ad0a54c59e9f5cf6e73bb8b8bce951279c"}]}
