)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"a9d9fb65bff18bb81f2314d0ecc68c4f5a50dd07","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Travis Neely \u003ctravis.neely@att.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-06-04 15:01:39 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Create dbutils which will be used for database backup/restore as well as"},{"line_number":8,"context_line":"other database related utilites."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"dbutils will work along these patchsets:"},{"line_number":11,"context_line":"Postgresql: https://review.opendev.org/#/c/729032/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"ff570b3c_239934c3","line":8,"range":{"start_line":7,"start_character":0,"end_line":8,"end_character":32},"updated":"2020-06-05 03:03:14.000000000","message":"nit: may want to line break this","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"ad9b06afd9bc19b7f8d98fa7345e5433141c1276","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Travis Neely \u003ctravis.neely@att.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-06-04 15:01:39 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Create dbutils which will be used for database backup/restore as well as"},{"line_number":8,"context_line":"other database related utilites."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"dbutils will work along these patchsets:"},{"line_number":11,"context_line":"Postgresql: https://review.opendev.org/#/c/729032/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"ff570b3c_60d306d7","line":8,"range":{"start_line":7,"start_character":0,"end_line":8,"end_character":32},"in_reply_to":"ff570b3c_239934c3","updated":"2020-06-08 07:15:40.000000000","message":"Done","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"}],"helm-toolkit/templates/scripts/db-backup-restore/_dbutils.tpl":[{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"ad665688ca025e09a0eb03bf01cf49f8ddda07c6","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#     No arguments required. However the script will require the"},{"line_number":12,"context_line":"#     following variables to be exported:"},{"line_number":13,"context_line":"#"},{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A comma deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":"#       export DB_PODNAME                     The master pod which the script will connect to for all commands"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"ff570b3c_a85b95f3","line":14,"range":{"start_line":14,"start_character":15,"end_line":14,"end_character":35},"updated":"2020-06-02 20:09:51.000000000","message":"In the script, the variable you\u0027re checking is just called \"SCOPE\"","commit_id":"03b317bec2e804692183c5756dcb08d38c59a654"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"cba723bfd546d572d2216dd02116c862794e10b8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#     No arguments required. However the script will require the"},{"line_number":12,"context_line":"#     following variables to be exported:"},{"line_number":13,"context_line":"#"},{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A comma deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":"#       export DB_PODNAME                     The master pod which the script will connect to for all commands"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"ff570b3c_48e1199b","line":14,"range":{"start_line":14,"start_character":15,"end_line":14,"end_character":35},"in_reply_to":"ff570b3c_a85b95f3","updated":"2020-06-02 20:40:04.000000000","message":"Done","commit_id":"03b317bec2e804692183c5756dcb08d38c59a654"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"ad665688ca025e09a0eb03bf01cf49f8ddda07c6","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#     following variables to be exported:"},{"line_number":13,"context_line":"#"},{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A comma deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":"#       export DB_PODNAME                     The master pod which the script will connect to for all commands"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"trap do_quit SIGINT SIGTERM SIGTSTP"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"ff570b3c_08744167","line":15,"range":{"start_line":15,"start_character":15,"end_line":15,"end_character":44},"updated":"2020-06-02 20:09:51.000000000","message":"In the script, the variable you\u0027re checking is just called \"NAMESPACE_LIST\"","commit_id":"03b317bec2e804692183c5756dcb08d38c59a654"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"cba723bfd546d572d2216dd02116c862794e10b8","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#     following variables to be exported:"},{"line_number":13,"context_line":"#"},{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A comma deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":"#       export DB_PODNAME                     The master pod which the script will connect to for all commands"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"trap do_quit SIGINT SIGTERM SIGTSTP"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"ff570b3c_88f05169","line":15,"range":{"start_line":15,"start_character":15,"end_line":15,"end_character":44},"in_reply_to":"ff570b3c_08744167","updated":"2020-06-02 20:40:04.000000000","message":"Done","commit_id":"03b317bec2e804692183c5756dcb08d38c59a654"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"af1ea942b2ed6ffa688fe59e7cb417ce61099a01","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#"},{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A comma deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":"#       export DB_PODNAME                     The master pod which the script will connect to for all commands"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"trap do_quit SIGINT SIGTERM SIGTSTP"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"ff570b3c_4832b9f3","line":16,"range":{"start_line":16,"start_character":15,"end_line":16,"end_character":25},"updated":"2020-06-02 19:59:40.000000000","message":"I think this is being inferred from the SCOPE variable, isn\u0027t it?","commit_id":"03b317bec2e804692183c5756dcb08d38c59a654"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"cba723bfd546d572d2216dd02116c862794e10b8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#"},{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A comma deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":"#       export DB_PODNAME                     The master pod which the script will connect to for all commands"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"trap do_quit SIGINT SIGTERM SIGTSTP"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"ff570b3c_e800ed36","line":16,"range":{"start_line":16,"start_character":15,"end_line":16,"end_character":25},"in_reply_to":"ff570b3c_4832b9f3","updated":"2020-06-02 20:40:04.000000000","message":"Done","commit_id":"03b317bec2e804692183c5756dcb08d38c59a654"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"af1ea942b2ed6ffa688fe59e7cb417ce61099a01","unresolved":false,"context_lines":[{"line_number":685,"context_line":"fi"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"main"},{"line_number":688,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"ff570b3c_f22aa18e","line":688,"range":{"start_line":688,"start_character":0,"end_line":688,"end_character":0},"updated":"2020-06-02 19:59:40.000000000","message":"Missing the {{- end }} statement to match line 1","commit_id":"03b317bec2e804692183c5756dcb08d38c59a654"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"cba723bfd546d572d2216dd02116c862794e10b8","unresolved":false,"context_lines":[{"line_number":685,"context_line":"fi"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"main"},{"line_number":688,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":4,"id":"ff570b3c_48fab942","line":688,"range":{"start_line":688,"start_character":0,"end_line":688,"end_character":0},"in_reply_to":"ff570b3c_f22aa18e","updated":"2020-06-02 20:40:04.000000000","message":"Done","commit_id":"03b317bec2e804692183c5756dcb08d38c59a654"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"e85918fda47571615e0e1549996562421fbe6e6f","unresolved":false,"context_lines":[{"line_number":23,"context_line":"  if [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"postgresql\" ]]; then"},{"line_number":24,"context_line":"    export ONDEMAND_JOB\u003d\"postgresql-ondemand\""},{"line_number":25,"context_line":"    export DB_PODNAME\u003d\"postgresql-0\""},{"line_number":26,"context_line":"    export DB_SHORTNAME\u003d\"pg\""},{"line_number":27,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mysql\" || \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mariadb\" ]]; then"},{"line_number":28,"context_line":"    export SCOPE\u003d\"mariadb\""},{"line_number":29,"context_line":"    export ONDEMAND_JOB\u003d\"mariadb-ondemand\""}],"source_content_type":"text/x-smarty","patch_set":6,"id":"ff570b3c_2316864a","line":26,"range":{"start_line":26,"start_character":11,"end_line":26,"end_character":23},"updated":"2020-06-02 20:54:24.000000000","message":"will need this for all the databases, right? (pg-, mariadb-, etcd-)","commit_id":"af572f7f8f1ebee608c2b0e795c6e9f38ba1bad1"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"c77def5adea780156721f69f78e5a44ae4c23f62","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"  return 0"},{"line_number":52,"context_line":"}"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"# Obtain a new keystone token"},{"line_number":55,"context_line":"function get_token() {"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"  return 0"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"function check_args() {"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":10,"id":"ff570b3c_55d7e6bf","line":58,"range":{"start_line":53,"start_character":0,"end_line":58,"end_character":1},"updated":"2020-06-03 13:15:44.000000000","message":"This doesn\u0027t do anything?","commit_id":"a72529f0f52353772e635396632aba997da81f9a"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"bbd57047a52f1100f2ed23cfec9c81cb3638eedf","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"  return 0"},{"line_number":52,"context_line":"}"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"# Obtain a new keystone token"},{"line_number":55,"context_line":"function get_token() {"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"  return 0"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"function check_args() {"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":10,"id":"ff570b3c_388189c4","line":58,"range":{"start_line":53,"start_character":0,"end_line":58,"end_character":1},"in_reply_to":"ff570b3c_38b4e9f1","updated":"2020-06-03 14:01:19.000000000","message":"Decided to remove this until we make a determination.","commit_id":"a72529f0f52353772e635396632aba997da81f9a"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"32c7dade60b59363e1f6e939510848d0225d2379","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"  return 0"},{"line_number":52,"context_line":"}"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"# Obtain a new keystone token"},{"line_number":55,"context_line":"function get_token() {"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"  return 0"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"function check_args() {"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":10,"id":"ff570b3c_38b4e9f1","line":58,"range":{"start_line":53,"start_character":0,"end_line":58,"end_character":1},"in_reply_to":"ff570b3c_55d7e6bf","updated":"2020-06-03 13:52:07.000000000","message":"We\u0027re in discussions at the moment on how we\u0027re going to handle authentication, but I\u0027ll remove this until that is decided.","commit_id":"a72529f0f52353772e635396632aba997da81f9a"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"c77def5adea780156721f69f78e5a44ae4c23f62","unresolved":false,"context_lines":[{"line_number":584,"context_line":"  echo \"Cleanup complete.\""},{"line_number":585,"context_line":"}"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"function help() {"},{"line_number":588,"context_line":"  echo \"Usage:\""},{"line_number":589,"context_line":"  echo \"       utilscli dbutils backup\""},{"line_number":590,"context_line":"  echo \"           Performs a manual backup of all databases within $BACKUP_RESTORE_SCOPE\""},{"line_number":591,"context_line":"  echo \"\""},{"line_number":592,"context_line":"  echo \"       utilscli dbutils list_archives [remote]\""},{"line_number":593,"context_line":"  echo \"           Retrieves the list of archives, either locally (no \u0027remote\u0027\""},{"line_number":594,"context_line":"  echo \"           flag) or from the remote RGW (using \u0027remote\u0027 flag).\""},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"  # These commands are not implemented for etcd databases."},{"line_number":597,"context_line":"  if [[ \"$BACKUP_RESTORE_SCOPE\" !\u003d \"etcd\" ]]; then"},{"line_number":598,"context_line":"    echo \"\""},{"line_number":599,"context_line":"    echo \"       utilscli dbutils list_databases \u003carchive\u003e [remote]\""},{"line_number":600,"context_line":"    echo \"           Retrieves the list of databases contained within the given\""},{"line_number":601,"context_line":"    echo \"           archive tarball. The \u0027remote\u0027 flag is used to retrieve the\""},{"line_number":602,"context_line":"    echo \"           archive from the remote RGW; otherwise the database list\""},{"line_number":603,"context_line":"    echo \"           will be retrieved from the archive on the local filesystem.\""},{"line_number":604,"context_line":"    echo \"\""},{"line_number":605,"context_line":"    echo \"       utilscli dbutils list_tables \u003carchive\u003e \u003cdatabase\u003e [remote]\""},{"line_number":606,"context_line":"    echo \"           Retrieves the list of tables contained within the given\""},{"line_number":607,"context_line":"    echo \"           database from the given archive tarball. The \u0027remote\u0027 flag\""},{"line_number":608,"context_line":"    echo \"           is used to retrieve the archive from the remote RGW;\""},{"line_number":609,"context_line":"    echo \"           otherwise the table list will be retrieved from the archive\""},{"line_number":610,"context_line":"    echo \"           on the local filesystem.\""},{"line_number":611,"context_line":"    echo \"\""},{"line_number":612,"context_line":"    echo \"       utilscli dbutils list_rows \u003carchive\u003e \u003cdatabase\u003e \u003ctable\u003e [remote]\""},{"line_number":613,"context_line":"    echo \"           Retrieves the list of rows in the given table contained\""},{"line_number":614,"context_line":"    echo \"           within the given database from the given archive tarball.\""},{"line_number":615,"context_line":"    echo \"           The \u0027remote\u0027 flag is used to retrieve the archive from the\""},{"line_number":616,"context_line":"    echo \"           remote RGW; otherwise the table rows will be retrieved from\""},{"line_number":617,"context_line":"    echo \"           the archive on the local filesystem.\""},{"line_number":618,"context_line":"    echo \"\""},{"line_number":619,"context_line":"    echo \"       utilscli dbutils show_databases\""},{"line_number":620,"context_line":"    echo \"           Retrieves the list of databases in the currently active\""},{"line_number":621,"context_line":"    echo \"           $BACKUP_RESTORE_SCOPE database system.\""},{"line_number":622,"context_line":"    echo \"\""},{"line_number":623,"context_line":"    echo \"       utilscli dbutils show_tables \u003cdatabase\u003e\""},{"line_number":624,"context_line":"    echo \"           Retrieves the list of tables of the given database in the\""},{"line_number":625,"context_line":"    echo \"           currently active $BACKUP_RESTORE_SCOPE database system.\""},{"line_number":626,"context_line":"    echo \"\""},{"line_number":627,"context_line":"    echo \"       utilscli dbutils show_rows \u003cdatabase\u003e \u003ctable\u003e\""},{"line_number":628,"context_line":"    echo \"           Retrieves the list of rows in the given table of the given\""},{"line_number":629,"context_line":"    echo \"           database from the currently active $BACKUP_RESTORE_SCOPE database system.\""},{"line_number":630,"context_line":"    echo \"\""},{"line_number":631,"context_line":"    echo \"       utilscli dbutils show_schema \u003cdatabase\u003e \u003ctable\u003e\""},{"line_number":632,"context_line":"    echo \"           Retrieves the table schema information for the given table\""},{"line_number":633,"context_line":"    echo \"           of the given database from the currently active $BACKUP_RESTORE_SCOPE\""},{"line_number":634,"context_line":"    echo \"           database system.\""},{"line_number":635,"context_line":"  fi"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"  echo \"\""},{"line_number":638,"context_line":"  echo \"       utilscli dbutils restore \u003carchive\u003e \u003cdb_name\u003e [remote]\""},{"line_number":639,"context_line":"  echo \"           where \u003cdb_name\u003e can be either a database name or \u0027all\u0027, which\""},{"line_number":640,"context_line":"  echo \"               means all databases are to be restored\""},{"line_number":641,"context_line":"  echo \"           Restores the specified database(s) from an archive located\""},{"line_number":642,"context_line":"  echo \"           on either the remote RGW (\u0027remote\u0027 flag specified) or from\""},{"line_number":643,"context_line":"  echo \"           the local filesystem (no \u0027remote\u0027 flag)\""},{"line_number":644,"context_line":"  echo \"\""},{"line_number":645,"context_line":"  echo \"       utilscli dbutils cleanup\""},{"line_number":646,"context_line":"  echo \"           Cleans up (kills) any jobs/pods which are left running.\""},{"line_number":647,"context_line":"}"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"function do_quit() {"},{"line_number":650,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":10,"id":"ff570b3c_f596faef","line":647,"range":{"start_line":587,"start_character":0,"end_line":647,"end_character":1},"updated":"2020-06-03 13:15:44.000000000","message":"Is this script available to be ran manually? This seems like it should be a comment at the top rather than a --help style output for something that is generally automated.","commit_id":"a72529f0f52353772e635396632aba997da81f9a"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"32c7dade60b59363e1f6e939510848d0225d2379","unresolved":false,"context_lines":[{"line_number":584,"context_line":"  echo \"Cleanup complete.\""},{"line_number":585,"context_line":"}"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"function help() {"},{"line_number":588,"context_line":"  echo \"Usage:\""},{"line_number":589,"context_line":"  echo \"       utilscli dbutils backup\""},{"line_number":590,"context_line":"  echo \"           Performs a manual backup of all databases within $BACKUP_RESTORE_SCOPE\""},{"line_number":591,"context_line":"  echo \"\""},{"line_number":592,"context_line":"  echo \"       utilscli dbutils list_archives [remote]\""},{"line_number":593,"context_line":"  echo \"           Retrieves the list of archives, either locally (no \u0027remote\u0027\""},{"line_number":594,"context_line":"  echo \"           flag) or from the remote RGW (using \u0027remote\u0027 flag).\""},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"  # These commands are not implemented for etcd databases."},{"line_number":597,"context_line":"  if [[ \"$BACKUP_RESTORE_SCOPE\" !\u003d \"etcd\" ]]; then"},{"line_number":598,"context_line":"    echo \"\""},{"line_number":599,"context_line":"    echo \"       utilscli dbutils list_databases \u003carchive\u003e [remote]\""},{"line_number":600,"context_line":"    echo \"           Retrieves the list of databases contained within the given\""},{"line_number":601,"context_line":"    echo \"           archive tarball. The \u0027remote\u0027 flag is used to retrieve the\""},{"line_number":602,"context_line":"    echo \"           archive from the remote RGW; otherwise the database list\""},{"line_number":603,"context_line":"    echo \"           will be retrieved from the archive on the local filesystem.\""},{"line_number":604,"context_line":"    echo \"\""},{"line_number":605,"context_line":"    echo \"       utilscli dbutils list_tables \u003carchive\u003e \u003cdatabase\u003e [remote]\""},{"line_number":606,"context_line":"    echo \"           Retrieves the list of tables contained within the given\""},{"line_number":607,"context_line":"    echo \"           database from the given archive tarball. The \u0027remote\u0027 flag\""},{"line_number":608,"context_line":"    echo \"           is used to retrieve the archive from the remote RGW;\""},{"line_number":609,"context_line":"    echo \"           otherwise the table list will be retrieved from the archive\""},{"line_number":610,"context_line":"    echo \"           on the local filesystem.\""},{"line_number":611,"context_line":"    echo \"\""},{"line_number":612,"context_line":"    echo \"       utilscli dbutils list_rows \u003carchive\u003e \u003cdatabase\u003e \u003ctable\u003e [remote]\""},{"line_number":613,"context_line":"    echo \"           Retrieves the list of rows in the given table contained\""},{"line_number":614,"context_line":"    echo \"           within the given database from the given archive tarball.\""},{"line_number":615,"context_line":"    echo \"           The \u0027remote\u0027 flag is used to retrieve the archive from the\""},{"line_number":616,"context_line":"    echo \"           remote RGW; otherwise the table rows will be retrieved from\""},{"line_number":617,"context_line":"    echo \"           the archive on the local filesystem.\""},{"line_number":618,"context_line":"    echo \"\""},{"line_number":619,"context_line":"    echo \"       utilscli dbutils show_databases\""},{"line_number":620,"context_line":"    echo \"           Retrieves the list of databases in the currently active\""},{"line_number":621,"context_line":"    echo \"           $BACKUP_RESTORE_SCOPE database system.\""},{"line_number":622,"context_line":"    echo \"\""},{"line_number":623,"context_line":"    echo \"       utilscli dbutils show_tables \u003cdatabase\u003e\""},{"line_number":624,"context_line":"    echo \"           Retrieves the list of tables of the given database in the\""},{"line_number":625,"context_line":"    echo \"           currently active $BACKUP_RESTORE_SCOPE database system.\""},{"line_number":626,"context_line":"    echo \"\""},{"line_number":627,"context_line":"    echo \"       utilscli dbutils show_rows \u003cdatabase\u003e \u003ctable\u003e\""},{"line_number":628,"context_line":"    echo \"           Retrieves the list of rows in the given table of the given\""},{"line_number":629,"context_line":"    echo \"           database from the currently active $BACKUP_RESTORE_SCOPE database system.\""},{"line_number":630,"context_line":"    echo \"\""},{"line_number":631,"context_line":"    echo \"       utilscli dbutils show_schema \u003cdatabase\u003e \u003ctable\u003e\""},{"line_number":632,"context_line":"    echo \"           Retrieves the table schema information for the given table\""},{"line_number":633,"context_line":"    echo \"           of the given database from the currently active $BACKUP_RESTORE_SCOPE\""},{"line_number":634,"context_line":"    echo \"           database system.\""},{"line_number":635,"context_line":"  fi"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"  echo \"\""},{"line_number":638,"context_line":"  echo \"       utilscli dbutils restore \u003carchive\u003e \u003cdb_name\u003e [remote]\""},{"line_number":639,"context_line":"  echo \"           where \u003cdb_name\u003e can be either a database name or \u0027all\u0027, which\""},{"line_number":640,"context_line":"  echo \"               means all databases are to be restored\""},{"line_number":641,"context_line":"  echo \"           Restores the specified database(s) from an archive located\""},{"line_number":642,"context_line":"  echo \"           on either the remote RGW (\u0027remote\u0027 flag specified) or from\""},{"line_number":643,"context_line":"  echo \"           the local filesystem (no \u0027remote\u0027 flag)\""},{"line_number":644,"context_line":"  echo \"\""},{"line_number":645,"context_line":"  echo \"       utilscli dbutils cleanup\""},{"line_number":646,"context_line":"  echo \"           Cleans up (kills) any jobs/pods which are left running.\""},{"line_number":647,"context_line":"}"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"function do_quit() {"},{"line_number":650,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":10,"id":"ff570b3c_b8c75964","line":647,"range":{"start_line":587,"start_character":0,"end_line":647,"end_character":1},"in_reply_to":"ff570b3c_f596faef","updated":"2020-06-03 13:52:07.000000000","message":"This script is meant to be run manually on demand by a user.","commit_id":"a72529f0f52353772e635396632aba997da81f9a"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"c77def5adea780156721f69f78e5a44ae4c23f62","unresolved":false,"context_lines":[{"line_number":666,"context_line":""},{"line_number":667,"context_line":"  while [[ ${ARGS[0]} !\u003d \"quit\" \u0026\u0026 ${ARGS[0]} !\u003d \"q\" ]]"},{"line_number":668,"context_line":"  do"},{"line_number":669,"context_line":"    echo \"Please select from the available options:\""},{"line_number":670,"context_line":"    echo \"Execution methods:          backup, restore, cleanup\""},{"line_number":671,"context_line":"    echo \"Show Archived details:      list_archives, list_databases, list_tables, list_rows\""},{"line_number":672,"context_line":"    echo \"Show Live Database details: show_databases, show_tables, show_rows, show_schema\""},{"line_number":673,"context_line":"    echo \"Other:                      help, quit (q)\""},{"line_number":674,"context_line":"    read -rp \"selection: \" ARGS"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    echo \"${ARGS[*]}\""}],"source_content_type":"text/x-smarty","patch_set":10,"id":"ff570b3c_b59002ef","line":673,"range":{"start_line":669,"start_character":0,"end_line":673,"end_character":53},"updated":"2020-06-03 13:15:44.000000000","message":"Same idea as the comment above, this reads as a script to be ran manually, instead of something that is automated.","commit_id":"a72529f0f52353772e635396632aba997da81f9a"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"32c7dade60b59363e1f6e939510848d0225d2379","unresolved":false,"context_lines":[{"line_number":666,"context_line":""},{"line_number":667,"context_line":"  while [[ ${ARGS[0]} !\u003d \"quit\" \u0026\u0026 ${ARGS[0]} !\u003d \"q\" ]]"},{"line_number":668,"context_line":"  do"},{"line_number":669,"context_line":"    echo \"Please select from the available options:\""},{"line_number":670,"context_line":"    echo \"Execution methods:          backup, restore, cleanup\""},{"line_number":671,"context_line":"    echo \"Show Archived details:      list_archives, list_databases, list_tables, list_rows\""},{"line_number":672,"context_line":"    echo \"Show Live Database details: show_databases, show_tables, show_rows, show_schema\""},{"line_number":673,"context_line":"    echo \"Other:                      help, quit (q)\""},{"line_number":674,"context_line":"    read -rp \"selection: \" ARGS"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    echo \"${ARGS[*]}\""}],"source_content_type":"text/x-smarty","patch_set":10,"id":"ff570b3c_7896614e","line":673,"range":{"start_line":669,"start_character":0,"end_line":673,"end_character":53},"in_reply_to":"ff570b3c_b59002ef","updated":"2020-06-03 13:52:07.000000000","message":"Same as above, it is meant to be run manually on demand.","commit_id":"a72529f0f52353772e635396632aba997da81f9a"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"c00493004cf0a3a159255f3163aced661fc8a8d0","unresolved":false,"context_lines":[{"line_number":648,"context_line":"    echo \"                            restore \u003carchive\u003e \u003cdb_name\u003e [remote]\""},{"line_number":649,"context_line":"    echo \"                            cleanup\""},{"line_number":650,"context_line":"    echo \"Show Archived details:      list_archives\""},{"line_number":651,"context_line":"    echo \"                            list_databases \u003carchive\u003e\""},{"line_number":652,"context_line":"    echo \"                            list_tables \u003carchive\u003e \u003cdatabase\u003e [remote]\""},{"line_number":653,"context_line":"    echo \"                            list_rows \u003carchive\u003e \u003cdatabase\u003e \u003ctable\u003e [remote]\""},{"line_number":654,"context_line":"    echo \"Show Live Database details: show_databases\""},{"line_number":655,"context_line":"    echo \"                            show_tables \u003cdatabase\u003e\""},{"line_number":656,"context_line":"    echo \"                            show_rows \u003cdatabase\u003e \u003ctable\u003e\""},{"line_number":657,"context_line":"    echo \"                            show_schema \u003cdatabase\u003e \u003ctable\u003e\""},{"line_number":658,"context_line":"    echo \"Other:                      help\""},{"line_number":659,"context_line":"    echo \"                            quit (q)\""},{"line_number":660,"context_line":"    read -rp \"selection: \" ARGS"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"ff570b3c_a1d3a000","line":657,"range":{"start_line":651,"start_character":0,"end_line":657,"end_character":69},"updated":"2020-06-03 16:13:07.000000000","message":"Probably want to not show these for etcd, like you did in the help function.","commit_id":"eeab96ddbce538eb86d60216754fa7cd60620225"},{"author":{"_account_id":18236,"name":"Sophie Huang","email":"sophieh01@yahoo.com","username":"SophieHuang"},"change_message_id":"8749630bc77c5ac7e3a0ec94d6326a97ec2ee6e9","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    export DB_PODNAME\u003d\"postgresql-0\""},{"line_number":26,"context_line":"    export DB_SHORTNAME\u003d\"pg\""},{"line_number":27,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mysql\" || \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mariadb\" ]]; then"},{"line_number":28,"context_line":"    export ONDEMAND_JOB\u003d\"mariadb-ondemand\""},{"line_number":29,"context_line":"    export DB_PODNAME\u003d\"mariadb-server-0\""},{"line_number":30,"context_line":"    export DB_SHORTNAME\u003d\"mariadb\""},{"line_number":31,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"etcd\" ]]; then"}],"source_content_type":"text/x-smarty","patch_set":14,"id":"ff570b3c_1c4e3296","line":28,"range":{"start_line":28,"start_character":25,"end_line":28,"end_character":32},"updated":"2020-06-03 18:55:39.000000000","message":"change to mysql-ondemand","commit_id":"aabeef5035be12e159a550f22dedf3132a6fee9c"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"c2814af6fd158def063771b445a23a363e4343c3","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    export DB_PODNAME\u003d\"postgresql-0\""},{"line_number":26,"context_line":"    export DB_SHORTNAME\u003d\"pg\""},{"line_number":27,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mysql\" || \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mariadb\" ]]; then"},{"line_number":28,"context_line":"    export ONDEMAND_JOB\u003d\"mariadb-ondemand\""},{"line_number":29,"context_line":"    export DB_PODNAME\u003d\"mariadb-server-0\""},{"line_number":30,"context_line":"    export DB_SHORTNAME\u003d\"mariadb\""},{"line_number":31,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"etcd\" ]]; then"}],"source_content_type":"text/x-smarty","patch_set":14,"id":"ff570b3c_ef9f3eb1","line":28,"range":{"start_line":28,"start_character":25,"end_line":28,"end_character":32},"in_reply_to":"ff570b3c_1c4e3296","updated":"2020-06-03 19:02:31.000000000","message":"Done","commit_id":"aabeef5035be12e159a550f22dedf3132a6fee9c"},{"author":{"_account_id":18236,"name":"Sophie Huang","email":"sophieh01@yahoo.com","username":"SophieHuang"},"change_message_id":"8749630bc77c5ac7e3a0ec94d6326a97ec2ee6e9","unresolved":false,"context_lines":[{"line_number":27,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mysql\" || \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mariadb\" ]]; then"},{"line_number":28,"context_line":"    export ONDEMAND_JOB\u003d\"mariadb-ondemand\""},{"line_number":29,"context_line":"    export DB_PODNAME\u003d\"mariadb-server-0\""},{"line_number":30,"context_line":"    export DB_SHORTNAME\u003d\"mariadb\""},{"line_number":31,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"etcd\" ]]; then"},{"line_number":32,"context_line":"    export ONDEMAND_JOB\u003d\"etcd-ondemand\""},{"line_number":33,"context_line":"    export DB_SHORTNAME\u003d\"etcd\""}],"source_content_type":"text/x-smarty","patch_set":14,"id":"ff570b3c_5c442a74","line":30,"range":{"start_line":30,"start_character":25,"end_line":30,"end_character":32},"updated":"2020-06-03 18:55:39.000000000","message":"change to mysql","commit_id":"aabeef5035be12e159a550f22dedf3132a6fee9c"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"c2814af6fd158def063771b445a23a363e4343c3","unresolved":false,"context_lines":[{"line_number":27,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mysql\" || \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mariadb\" ]]; then"},{"line_number":28,"context_line":"    export ONDEMAND_JOB\u003d\"mariadb-ondemand\""},{"line_number":29,"context_line":"    export DB_PODNAME\u003d\"mariadb-server-0\""},{"line_number":30,"context_line":"    export DB_SHORTNAME\u003d\"mariadb\""},{"line_number":31,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"etcd\" ]]; then"},{"line_number":32,"context_line":"    export ONDEMAND_JOB\u003d\"etcd-ondemand\""},{"line_number":33,"context_line":"    export DB_SHORTNAME\u003d\"etcd\""}],"source_content_type":"text/x-smarty","patch_set":14,"id":"ff570b3c_4fa3ca00","line":30,"range":{"start_line":30,"start_character":25,"end_line":30,"end_character":32},"in_reply_to":"ff570b3c_5c442a74","updated":"2020-06-03 19:02:31.000000000","message":"Done","commit_id":"aabeef5035be12e159a550f22dedf3132a6fee9c"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"22af1ae77e4c7bf2e0e26916ad18686b16d00ce3","unresolved":false,"context_lines":[{"line_number":240,"context_line":"  POD\u003d$(pod_name \"$ONDEMAND_JOB\")"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":243,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/backup_${SCOPE}.sh"},{"line_number":244,"context_line":"}"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"# Params: [remote]"}],"source_content_type":"text/x-smarty","patch_set":15,"id":"ff570b3c_12ebb912","line":243,"range":{"start_line":243,"start_character":58,"end_line":243,"end_character":63},"updated":"2020-06-03 19:48:45.000000000","message":"Should be BACKUP_RESTORE_SCOPE  (occurs several times - do a %s/{SCOPE}/{BACKUP_RESTORE_SCOPE}/g )","commit_id":"d43d5c91c4ad83ebeea1a597e6886a22dc7632d1"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"d7d6aca7bb1a020f0ac378a204c8e49da1901673","unresolved":false,"context_lines":[{"line_number":240,"context_line":"  POD\u003d$(pod_name \"$ONDEMAND_JOB\")"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":243,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/backup_${SCOPE}.sh"},{"line_number":244,"context_line":"}"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"# Params: [remote]"}],"source_content_type":"text/x-smarty","patch_set":15,"id":"ff570b3c_f41f0a58","line":243,"range":{"start_line":243,"start_character":58,"end_line":243,"end_character":63},"in_reply_to":"ff570b3c_12ebb912","updated":"2020-06-04 08:35:03.000000000","message":"Done","commit_id":"d43d5c91c4ad83ebeea1a597e6886a22dc7632d1"},{"author":{"_account_id":18236,"name":"Sophie Huang","email":"sophieh01@yahoo.com","username":"SophieHuang"},"change_message_id":"7f98d1ab1e4afad6b6974e3f34a1b1c8dc619658","unresolved":false,"context_lines":[{"line_number":233,"context_line":"  POD\u003d$(pod_name \"$ONDEMAND_JOB\")"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":236,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/backup_${SCOPE}.sh"},{"line_number":237,"context_line":"}"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"# Params: [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_08c1c854","line":236,"range":{"start_line":236,"start_character":58,"end_line":236,"end_character":64},"updated":"2020-06-03 22:46:04.000000000","message":"change to BACKUP_RESTORE_SCOPE. Please do a global search","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"19b5bcca2043cbcc10f78a6562d956b222117dc8","unresolved":false,"context_lines":[{"line_number":233,"context_line":"  POD\u003d$(pod_name \"$ONDEMAND_JOB\")"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":236,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/backup_${SCOPE}.sh"},{"line_number":237,"context_line":"}"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"# Params: [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_490f3f36","line":236,"range":{"start_line":236,"start_character":58,"end_line":236,"end_character":64},"in_reply_to":"ff570b3c_08c1c854","updated":"2020-06-04 08:34:39.000000000","message":"Done","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":18236,"name":"Sophie Huang","email":"sophieh01@yahoo.com","username":"SophieHuang"},"change_message_id":"7f98d1ab1e4afad6b6974e3f34a1b1c8dc619658","unresolved":false,"context_lines":[{"line_number":257,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":260,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_\"${SCOPE}\".sh list_archives \"$LOCATION\""},{"line_number":261,"context_line":"}"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"# Params: \u003carchive\u003e [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_68b4c4f2","line":260,"range":{"start_line":260,"start_character":60,"end_line":260,"end_character":65},"updated":"2020-06-03 22:46:04.000000000","message":"change to BACKUP_RESTORE_SCOPE","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"19b5bcca2043cbcc10f78a6562d956b222117dc8","unresolved":false,"context_lines":[{"line_number":257,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":260,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_\"${SCOPE}\".sh list_archives \"$LOCATION\""},{"line_number":261,"context_line":"}"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"# Params: \u003carchive\u003e [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_8905d716","line":260,"range":{"start_line":260,"start_character":60,"end_line":260,"end_character":65},"in_reply_to":"ff570b3c_68b4c4f2","updated":"2020-06-04 08:34:39.000000000","message":"Done","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":18236,"name":"Sophie Huang","email":"sophieh01@yahoo.com","username":"SophieHuang"},"change_message_id":"7f98d1ab1e4afad6b6974e3f34a1b1c8dc619658","unresolved":false,"context_lines":[{"line_number":288,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":291,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh list_databases \"$ARCHIVE\" \"$LOCATION\""},{"line_number":292,"context_line":"}"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"# Params: \u003carchive\u003e \u003cdatabase\u003e [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_c8c23053","line":291,"range":{"start_line":291,"start_character":59,"end_line":291,"end_character":64},"updated":"2020-06-03 22:46:04.000000000","message":"change to BACKUP_RESTORE_SCOPE","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"19b5bcca2043cbcc10f78a6562d956b222117dc8","unresolved":false,"context_lines":[{"line_number":288,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":291,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh list_databases \"$ARCHIVE\" \"$LOCATION\""},{"line_number":292,"context_line":"}"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"# Params: \u003carchive\u003e \u003cdatabase\u003e [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_290acb24","line":291,"range":{"start_line":291,"start_character":59,"end_line":291,"end_character":64},"in_reply_to":"ff570b3c_c8c23053","updated":"2020-06-04 08:34:39.000000000","message":"Done","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":18236,"name":"Sophie Huang","email":"sophieh01@yahoo.com","username":"SophieHuang"},"change_message_id":"7f98d1ab1e4afad6b6974e3f34a1b1c8dc619658","unresolved":false,"context_lines":[{"line_number":320,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":323,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh list_tables \"$ARCHIVE\" \"$DATABASE\" \"$LOCATION\""},{"line_number":324,"context_line":"}"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"# Params: \u003carchive\u003e \u003cdatabase\u003e \u003ctable\u003e [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_48ac609e","line":323,"range":{"start_line":323,"start_character":59,"end_line":323,"end_character":64},"updated":"2020-06-03 22:46:04.000000000","message":"change to BACKUP_RESTORE_SCOPE","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"19b5bcca2043cbcc10f78a6562d956b222117dc8","unresolved":false,"context_lines":[{"line_number":320,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":323,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh list_tables \"$ARCHIVE\" \"$DATABASE\" \"$LOCATION\""},{"line_number":324,"context_line":"}"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"# Params: \u003carchive\u003e \u003cdatabase\u003e \u003ctable\u003e [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_e914534f","line":323,"range":{"start_line":323,"start_character":59,"end_line":323,"end_character":64},"in_reply_to":"ff570b3c_48ac609e","updated":"2020-06-04 08:34:39.000000000","message":"Done","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":18236,"name":"Sophie Huang","email":"sophieh01@yahoo.com","username":"SophieHuang"},"change_message_id":"7f98d1ab1e4afad6b6974e3f34a1b1c8dc619658","unresolved":false,"context_lines":[{"line_number":353,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":356,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh list_rows \"$ARCHIVE\" \"$DATABASE\" \"$TABLE\" \"$LOCATION\""},{"line_number":357,"context_line":"}"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"# Params: \u003carchive\u003e \u003cdatabase\u003e \u003ctable\u003e [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_a896dc4a","line":356,"range":{"start_line":356,"start_character":59,"end_line":356,"end_character":64},"updated":"2020-06-03 22:46:04.000000000","message":"change to BACKUP_RESTORE_SCOPE","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"19b5bcca2043cbcc10f78a6562d956b222117dc8","unresolved":false,"context_lines":[{"line_number":353,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":356,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh list_rows \"$ARCHIVE\" \"$DATABASE\" \"$TABLE\" \"$LOCATION\""},{"line_number":357,"context_line":"}"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"# Params: \u003carchive\u003e \u003cdatabase\u003e \u003ctable\u003e [remote]"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_3414e243","line":356,"range":{"start_line":356,"start_character":59,"end_line":356,"end_character":64},"in_reply_to":"ff570b3c_a896dc4a","updated":"2020-06-04 08:34:39.000000000","message":"Done","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":18236,"name":"Sophie Huang","email":"sophieh01@yahoo.com","username":"SophieHuang"},"change_message_id":"7f98d1ab1e4afad6b6974e3f34a1b1c8dc619658","unresolved":false,"context_lines":[{"line_number":386,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":389,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh list_schema \"$ARCHIVE\" \"$DATABASE\" \"$TABLE\" \"$LOCATION\""},{"line_number":390,"context_line":"}"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"function database_cmd() {"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_083388ac","line":389,"range":{"start_line":389,"start_character":59,"end_line":389,"end_character":64},"updated":"2020-06-03 22:46:04.000000000","message":"change to BACKUP_RESTORE_SCOPE","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"19b5bcca2043cbcc10f78a6562d956b222117dc8","unresolved":false,"context_lines":[{"line_number":386,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":389,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh list_schema \"$ARCHIVE\" \"$DATABASE\" \"$TABLE\" \"$LOCATION\""},{"line_number":390,"context_line":"}"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"function database_cmd() {"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_b400f202","line":389,"range":{"start_line":389,"start_character":59,"end_line":389,"end_character":64},"in_reply_to":"ff570b3c_083388ac","updated":"2020-06-04 08:34:39.000000000","message":"Done","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":18236,"name":"Sophie Huang","email":"sophieh01@yahoo.com","username":"SophieHuang"},"change_message_id":"7f98d1ab1e4afad6b6974e3f34a1b1c8dc619658","unresolved":false,"context_lines":[{"line_number":548,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":551,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh restore \"$ARCHIVE\" \"$DATABASE\" \"$LOCATION\""},{"line_number":552,"context_line":"}"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"function do_cleanup() {"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_68db244e","line":551,"range":{"start_line":551,"start_character":59,"end_line":551,"end_character":64},"updated":"2020-06-03 22:46:04.000000000","message":"change to BACKUP_RESTORE_SCOPE","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"19b5bcca2043cbcc10f78a6562d956b222117dc8","unresolved":false,"context_lines":[{"line_number":548,"context_line":"  POD\u003d$(pod_name $ONDEMAND_JOB)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"  # Execute the command in the on-demand pod"},{"line_number":551,"context_line":"  kubectl exec -i -n \"$NAMESPACE\" \"$POD\" -- /tmp/restore_${SCOPE}.sh restore \"$ARCHIVE\" \"$DATABASE\" \"$LOCATION\""},{"line_number":552,"context_line":"}"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"function do_cleanup() {"}],"source_content_type":"text/x-smarty","patch_set":16,"id":"ff570b3c_f406ea1b","line":551,"range":{"start_line":551,"start_character":59,"end_line":551,"end_character":64},"in_reply_to":"ff570b3c_68db244e","updated":"2020-06-04 08:34:39.000000000","message":"Done","commit_id":"978dda5b8769a83edbb53093df3c729dd73bbb18"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"0205842a8662e2610d279987c203b94e5eb18f74","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{{- define \"helm-toolkit.scripts.db-backup-restore.dbutils\" }}"},{"line_number":2,"context_line":"#!/bin/bash"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# This file contains database utility scripts which a user can execute"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"ff570b3c_bdcbb21b","line":1,"updated":"2020-06-04 13:56:25.000000000","message":"Where you are returning 1, should you echo the reason of failure so that debugging get easier.","commit_id":"1bdd7b56d318de04117fabdfb2ee77bc68c7989b"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"331d8ea632b2b15013d3e65609ae7a90cd0803cf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{{- define \"helm-toolkit.scripts.db-backup-restore.dbutils\" }}"},{"line_number":2,"context_line":"#!/bin/bash"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# This file contains database utility scripts which a user can execute"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"ff570b3c_5b237e56","line":1,"in_reply_to":"ff570b3c_bdcbb21b","updated":"2020-06-04 14:53:24.000000000","message":"Added an echo with an error message to a few places where a return 1 didn\u0027t have one. The remaining ones should all have an error message displayed from the previous function call so no need to display another duplicate one.","commit_id":"1bdd7b56d318de04117fabdfb2ee77bc68c7989b"},{"author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"change_message_id":"0205842a8662e2610d279987c203b94e5eb18f74","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"function check_args() {"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  ARGS_COUNT\u003d$1"},{"line_number":50,"context_line":"  ARGS_MIN\u003d$2"},{"line_number":51,"context_line":"  ARGS_MAX\u003d$3"},{"line_number":52,"context_line":"  ARGS_REMOTE\u003d$4"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  export LOC_STRING\u003d\"local\""},{"line_number":55,"context_line":"  export LOCATION\u003d\"\""}],"source_content_type":"text/x-smarty","patch_set":23,"id":"ff570b3c_9da98e25","line":52,"range":{"start_line":49,"start_character":0,"end_line":52,"end_character":16},"updated":"2020-06-04 13:56:25.000000000","message":"Should you check that all 4 parameters were present. What if only 2 arguments were provided.","commit_id":"1bdd7b56d318de04117fabdfb2ee77bc68c7989b"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"331d8ea632b2b15013d3e65609ae7a90cd0803cf","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"function check_args() {"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  ARGS_COUNT\u003d$1"},{"line_number":50,"context_line":"  ARGS_MIN\u003d$2"},{"line_number":51,"context_line":"  ARGS_MAX\u003d$3"},{"line_number":52,"context_line":"  ARGS_REMOTE\u003d$4"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  export LOC_STRING\u003d\"local\""},{"line_number":55,"context_line":"  export LOCATION\u003d\"\""}],"source_content_type":"text/x-smarty","patch_set":23,"id":"ff570b3c_9b199623","line":52,"range":{"start_line":49,"start_character":0,"end_line":52,"end_character":16},"in_reply_to":"ff570b3c_9da98e25","updated":"2020-06-04 14:53:24.000000000","message":"Added a check that all four parameters are provided. These don\u0027t rely on user input so a user can\u0027t enter the incorrect number of parameters here, however, it can be passed the incorrect number when calling the function in code.","commit_id":"1bdd7b56d318de04117fabdfb2ee77bc68c7989b"},{"author":{"_account_id":18250,"name":"Roy Tang","email":"roy.s.tang@att.com","username":"rt7380"},"change_message_id":"6e5631937879308ba15ffec3088d03a652dddad6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"  if [[ ! -z \"$POD_LISTING\" ]]; then"},{"line_number":80,"context_line":"    STATUS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $3}\u0027)"},{"line_number":81,"context_line":"    CONTAINERS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $2}\u0027)"},{"line_number":82,"context_line":"    if [[ $STATUS !\u003d \"Running\" || $CONTAINERS !\u003d \"1/1\" ]]; then"},{"line_number":83,"context_line":"      echo \"Found old on-demand job which is not running...killing it\""},{"line_number":84,"context_line":"      remove_job \"$NAMESPACE\" \"$ONDEMAND_JOB\""},{"line_number":85,"context_line":"      if [[ $? -ne 0 ]]; then"},{"line_number":86,"context_line":"        return 1"},{"line_number":87,"context_line":"      fi"},{"line_number":88,"context_line":"    else"},{"line_number":89,"context_line":"      # Pod is already running and ready"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"ff570b3c_60996dc2","line":86,"range":{"start_line":82,"start_character":1,"end_line":86,"end_character":16},"updated":"2020-06-04 14:08:03.000000000","message":"Instead of return 1 after removing old job, would it makes sense to then go and continue with your create new on-demand job routine?  Is there any risk or logic preventing this path?","commit_id":"1bdd7b56d318de04117fabdfb2ee77bc68c7989b"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"331d8ea632b2b15013d3e65609ae7a90cd0803cf","unresolved":false,"context_lines":[{"line_number":79,"context_line":"  if [[ ! -z \"$POD_LISTING\" ]]; then"},{"line_number":80,"context_line":"    STATUS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $3}\u0027)"},{"line_number":81,"context_line":"    CONTAINERS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $2}\u0027)"},{"line_number":82,"context_line":"    if [[ $STATUS !\u003d \"Running\" || $CONTAINERS !\u003d \"1/1\" ]]; then"},{"line_number":83,"context_line":"      echo \"Found old on-demand job which is not running...killing it\""},{"line_number":84,"context_line":"      remove_job \"$NAMESPACE\" \"$ONDEMAND_JOB\""},{"line_number":85,"context_line":"      if [[ $? -ne 0 ]]; then"},{"line_number":86,"context_line":"        return 1"},{"line_number":87,"context_line":"      fi"},{"line_number":88,"context_line":"    else"},{"line_number":89,"context_line":"      # Pod is already running and ready"}],"source_content_type":"text/x-smarty","patch_set":23,"id":"ff570b3c_1b0d86e7","line":86,"range":{"start_line":82,"start_character":1,"end_line":86,"end_character":16},"in_reply_to":"ff570b3c_60996dc2","updated":"2020-06-04 14:53:24.000000000","message":"This is a special situation where the old job was found, but then removing that job fails. If we are unable to remove the old job then we don\u0027t want to go forward with trying to create a new one, we will just get an error from trying to do that, so we display our own error in the remove_job function and return 1.","commit_id":"1bdd7b56d318de04117fabdfb2ee77bc68c7989b"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"24509729d0db5d2c6a978ed3b7c1bf0e466cb77e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#     No arguments required. However the script will require the"},{"line_number":12,"context_line":"#     following variables to be exported:"},{"line_number":13,"context_line":"#"},{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A space deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"trap do_quit SIGINT SIGTERM"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_7d2f4ff5","line":15,"range":{"start_line":14,"start_character":0,"end_line":15,"end_character":45},"updated":"2020-06-05 03:02:38.000000000","message":"should we not define these with some defaults? \n\n   : ${BACKUP_RESTORE_SCOPE:\u003dbbbb}","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"ad9b06afd9bc19b7f8d98fa7345e5433141c1276","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#     No arguments required. However the script will require the"},{"line_number":12,"context_line":"#     following variables to be exported:"},{"line_number":13,"context_line":"#"},{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A space deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"trap do_quit SIGINT SIGTERM"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_c0693227","line":15,"range":{"start_line":14,"start_character":0,"end_line":15,"end_character":45},"in_reply_to":"ff570b3c_7d2f4ff5","updated":"2020-06-08 07:15:40.000000000","message":"We do checking below in the setup function to ensure that the values are set. I don\u0027t think we\u0027d want to set defaults as we don\u0027t have a good default to set these values to. The BACKUP_RESTORE_SCOPE needs to be set to the correct DBMS system being used in the pod. If we set a default of, say postgresql, but the pod is running mariadb, then there will be failures in the script. So the setup function ensures that these are set.","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"24509729d0db5d2c6a978ed3b7c1bf0e466cb77e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A space deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"trap do_quit SIGINT SIGTERM"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"ARGS\u003d(\"$@\")"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_dd32db5d","line":17,"range":{"start_line":17,"start_character":5,"end_line":17,"end_character":12},"updated":"2020-06-05 03:02:38.000000000","message":"where is do_quit?","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"ad9b06afd9bc19b7f8d98fa7345e5433141c1276","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#       export BACKUP_RESTORE_SCOPE           The name of the DBMS being used (postgresql, mariadb, or etcd)"},{"line_number":15,"context_line":"#       export BACKUP_RESTORE_NAMESPACE_LIST  A space deliminated list of the namespaces the databases can be found in"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"trap do_quit SIGINT SIGTERM"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"ARGS\u003d(\"$@\")"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_a0d4febc","line":17,"range":{"start_line":17,"start_character":5,"end_line":17,"end_character":12},"in_reply_to":"ff570b3c_dd32db5d","updated":"2020-06-08 07:15:40.000000000","message":"Corrected to do_trap, since I had removed the do_quit function after some clean up.","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"24509729d0db5d2c6a978ed3b7c1bf0e466cb77e","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"function check_args() {"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  if [[ -z \"$1\" || -z \"$2\" || -z \"$3\" || -z \"$4\" ]]; then"},{"line_number":50,"context_line":"    echo \"ERROR: Incorrect paramters provided.\""},{"line_number":51,"context_line":"    return 1"},{"line_number":52,"context_line":"  fi"}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_fd3a3f31","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":57},"updated":"2020-06-05 03:02:38.000000000","message":"is this just checking the number of parameters $#? - can -z $3 be true but -z $4 is not?","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"ad9b06afd9bc19b7f8d98fa7345e5433141c1276","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"function check_args() {"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  if [[ -z \"$1\" || -z \"$2\" || -z \"$3\" || -z \"$4\" ]]; then"},{"line_number":50,"context_line":"    echo \"ERROR: Incorrect paramters provided.\""},{"line_number":51,"context_line":"    return 1"},{"line_number":52,"context_line":"  fi"}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_00e20aa1","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":57},"in_reply_to":"ff570b3c_fd3a3f31","updated":"2020-06-08 07:15:40.000000000","message":"There should always be four parameters. This confirms they are all set. Added additional comments.","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"24509729d0db5d2c6a978ed3b7c1bf0e466cb77e","unresolved":false,"context_lines":[{"line_number":47,"context_line":"function check_args() {"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  if [[ -z \"$1\" || -z \"$2\" || -z \"$3\" || -z \"$4\" ]]; then"},{"line_number":50,"context_line":"    echo \"ERROR: Incorrect paramters provided.\""},{"line_number":51,"context_line":"    return 1"},{"line_number":52,"context_line":"  fi"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_bd356747","line":50,"range":{"start_line":50,"start_character":27,"end_line":50,"end_character":36},"updated":"2020-06-05 03:02:38.000000000","message":"parameters","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"ad9b06afd9bc19b7f8d98fa7345e5433141c1276","unresolved":false,"context_lines":[{"line_number":47,"context_line":"function check_args() {"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  if [[ -z \"$1\" || -z \"$2\" || -z \"$3\" || -z \"$4\" ]]; then"},{"line_number":50,"context_line":"    echo \"ERROR: Incorrect paramters provided.\""},{"line_number":51,"context_line":"    return 1"},{"line_number":52,"context_line":"  fi"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_605e6677","line":50,"range":{"start_line":50,"start_character":27,"end_line":50,"end_character":36},"in_reply_to":"ff570b3c_bd356747","updated":"2020-06-08 07:15:40.000000000","message":"Done","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"24509729d0db5d2c6a978ed3b7c1bf0e466cb77e","unresolved":false,"context_lines":[{"line_number":143,"context_line":"}"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"# Wait for a pod to enter a specific state"},{"line_number":146,"context_line":"function wait_for_pod() {"},{"line_number":147,"context_line":"  POD\u003d$1"},{"line_number":148,"context_line":"  TARGET_STATE\u003d$2"},{"line_number":149,"context_line":"  CONTAINER_STATE\u003d${3:-\"1/1\"}"}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_e36d7ccc","line":146,"range":{"start_line":146,"start_character":0,"end_line":146,"end_character":25},"updated":"2020-06-05 03:02:38.000000000","message":"can these be done via\n\n   kubectl wait","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"ad9b06afd9bc19b7f8d98fa7345e5433141c1276","unresolved":false,"context_lines":[{"line_number":143,"context_line":"}"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"# Wait for a pod to enter a specific state"},{"line_number":146,"context_line":"function wait_for_pod() {"},{"line_number":147,"context_line":"  POD\u003d$1"},{"line_number":148,"context_line":"  TARGET_STATE\u003d$2"},{"line_number":149,"context_line":"  CONTAINER_STATE\u003d${3:-\"1/1\"}"}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_80ce1a2b","line":146,"range":{"start_line":146,"start_character":0,"end_line":146,"end_character":25},"in_reply_to":"ff570b3c_e36d7ccc","updated":"2020-06-08 07:15:40.000000000","message":"Thanks for the suggestion, I was able to clean this up and remove the superfluous functions.","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"24509729d0db5d2c6a978ed3b7c1bf0e466cb77e","unresolved":false,"context_lines":[{"line_number":216,"context_line":"  JOB\u003d$2"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"  # Cleanup the last attempted job if there is one"},{"line_number":219,"context_line":"  kubectl get job -n \"$NAMESPACE\" \"$JOB\" 2\u003e/dev/null"},{"line_number":220,"context_line":"  if [[ $? -eq 0 ]]; then"},{"line_number":221,"context_line":"    kubectl delete job -n \"$NAMESPACE\" \"$JOB\""},{"line_number":222,"context_line":"    wait_for_pod_death \"$JOB\""},{"line_number":223,"context_line":"    if [[ $? -ne 0 ]]; then"},{"line_number":224,"context_line":"      echo \"ERROR: could not destroy the $NAMESPACE $JOB job.\""}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_a385445c","line":221,"range":{"start_line":219,"start_character":0,"end_line":221,"end_character":45},"updated":"2020-06-05 03:02:38.000000000","message":"instead doing a get and check for this, can this be done using the flag:\n\n   --ignore-not-found","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":30746,"name":"Travis Neely","email":"travis.neely@att.com","username":"travis.neely@att.com"},"change_message_id":"ad9b06afd9bc19b7f8d98fa7345e5433141c1276","unresolved":false,"context_lines":[{"line_number":216,"context_line":"  JOB\u003d$2"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"  # Cleanup the last attempted job if there is one"},{"line_number":219,"context_line":"  kubectl get job -n \"$NAMESPACE\" \"$JOB\" 2\u003e/dev/null"},{"line_number":220,"context_line":"  if [[ $? -eq 0 ]]; then"},{"line_number":221,"context_line":"    kubectl delete job -n \"$NAMESPACE\" \"$JOB\""},{"line_number":222,"context_line":"    wait_for_pod_death \"$JOB\""},{"line_number":223,"context_line":"    if [[ $? -ne 0 ]]; then"},{"line_number":224,"context_line":"      echo \"ERROR: could not destroy the $NAMESPACE $JOB job.\""}],"source_content_type":"text/x-smarty","patch_set":26,"id":"ff570b3c_c0d772c0","line":221,"range":{"start_line":219,"start_character":0,"end_line":221,"end_character":45},"in_reply_to":"ff570b3c_a385445c","updated":"2020-06-08 07:15:40.000000000","message":"Same as above, was able to clean this up and remove the superfluous functions.","commit_id":"1cb36152cc29cae641a62bb08c148e37eb08c295"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"bb8dceb3bfecce456c5283dcaf9895b2fc00f90a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"function check_args() {"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  # There should always be 4 parameters"},{"line_number":50,"context_line":"  if [[ -z \"$1\" || -z \"$2\" || -z \"$3\" || -z \"$4\" ]]; then"},{"line_number":51,"context_line":"    echo \"ERROR: Incorrect parameters provided.\""},{"line_number":52,"context_line":"    return 1"},{"line_number":53,"context_line":"  fi"}],"source_content_type":"text/x-smarty","patch_set":32,"id":"ff570b3c_ae16a154","line":50,"range":{"start_line":50,"start_character":2,"end_line":50,"end_character":50},"updated":"2020-06-08 22:20:42.000000000","message":"is this not just:\n\n   [[ $# -ne 4 ]]?","commit_id":"a944d962c3c9e74c03df3b74dd85c18eb629fe9e"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"38ff5665e53d9a4a762d003a237e7b84f6528dd6","unresolved":false,"context_lines":[{"line_number":684,"context_line":"    return 1"},{"line_number":685,"context_line":"  fi"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":"  # If no arguments are passed, enter interactive mode"},{"line_number":688,"context_line":"  if [[ \"${#ARGS[@]}\" -eq 0 ]]; then"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"    while [[ ${ARGS[0]} !\u003d \"quit\" \u0026\u0026 ${ARGS[0]} !\u003d \"q\" ]]"},{"line_number":691,"context_line":"    do"},{"line_number":692,"context_line":"      menu"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"      read -rp \"selection: \" -a ARGS"},{"line_number":695,"context_line":""},{"line_number":696,"context_line":"      execute_selection \"${ARGS[@]}\""},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"      echo \"\""},{"line_number":699,"context_line":"      if [[ ${ARGS[0]} !\u003d \"quit\" \u0026\u0026 ${ARGS[0]} !\u003d \"q\" ]]; then"},{"line_number":700,"context_line":"        read -r -n1 -p \"press any key to continue...\""},{"line_number":701,"context_line":"      fi"},{"line_number":702,"context_line":"    done"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"  # Arguments are passed, execute the requested command then exit"},{"line_number":705,"context_line":"  else"}],"source_content_type":"text/x-smarty","patch_set":32,"id":"ff570b3c_f10cfc3a","line":702,"range":{"start_line":687,"start_character":2,"end_line":702,"end_character":8},"updated":"2020-06-08 22:19:51.000000000","message":"If this is to be ran via helm-toolkit, why is there an interactive option? Wouldn\u0027t this be ran automatically?","commit_id":"a944d962c3c9e74c03df3b74dd85c18eb629fe9e"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":28,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mysql\" || \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"mariadb\" ]]; then"},{"line_number":29,"context_line":"    source /tmp/mysqlutils.sh"},{"line_number":30,"context_line":"    export ONDEMAND_JOB\u003d\"mariadb-ondemand\""},{"line_number":31,"context_line":"    export DB_PODNAME\u003d\"mariadb-server-0\""},{"line_number":32,"context_line":"    export DB_SHORTNAME\u003d\"mariadb\""},{"line_number":33,"context_line":"  elif [[ \"$BACKUP_RESTORE_SCOPE\" \u003d\u003d \"etcd\" ]]; then"},{"line_number":34,"context_line":"    export ONDEMAND_JOB\u003d\"etcd-ondemand\""}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_b6870113","line":31,"range":{"start_line":31,"start_character":23,"end_line":31,"end_character":37},"updated":"2020-06-09 20:58:45.000000000","message":"This naively assumes that the direct hostname in the endpoints stanza hasn\u0027t been overwritten: https://github.com/openstack/openstack-helm-infra/blob/master/mariadb/templates/statefulset.yaml#L76\n\nThis also seems to assume the pod exists and is in a Ready state - that isn\u0027t always guaranteed to be the case.","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"  # There should always be 4 parameters"},{"line_number":52,"context_line":"  if [[ -z \"$4\" ]]; then"},{"line_number":53,"context_line":"    echo \"ERROR: Incorrect parameters provided.\""},{"line_number":54,"context_line":"    return 1"},{"line_number":55,"context_line":"  fi"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_b68c212f","line":53,"range":{"start_line":53,"start_character":10,"end_line":53,"end_character":47},"updated":"2020-06-09 20:58:45.000000000","message":"If you\u0027re just checking that four args have been provided, this should reflect that the incorrect number of args has been provided. This statement seems to indicate you\u0027re checking validity, not quantity","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# Ensure that the ondemand pod is running"},{"line_number":85,"context_line":"function ensure_ondemand_pod_exists() {"},{"line_number":86,"context_line":"  POD_LISTING\u003d$(kubectl get pod -n \"$NAMESPACE\" | grep \"$ONDEMAND_JOB\")"},{"line_number":87,"context_line":"  if [[ ! -z \"$POD_LISTING\" ]]; then"},{"line_number":88,"context_line":"    STATUS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $3}\u0027)"},{"line_number":89,"context_line":"    CONTAINERS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $2}\u0027)"},{"line_number":90,"context_line":"    if [[ $STATUS !\u003d \"Running\" || $CONTAINERS !\u003d \"1/1\" ]]; then"},{"line_number":91,"context_line":"      echo \"Found old on-demand job which is not running...killing it\""},{"line_number":92,"context_line":"      remove_job \"$NAMESPACE\" \"$ONDEMAND_JOB\""}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_d6e9d5b7","line":89,"range":{"start_line":86,"start_character":0,"end_line":89,"end_character":56},"updated":"2020-06-09 20:58:45.000000000","message":"Using something like jq makes this much more eloquent and readable","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    STATUS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $3}\u0027)"},{"line_number":89,"context_line":"    CONTAINERS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $2}\u0027)"},{"line_number":90,"context_line":"    if [[ $STATUS !\u003d \"Running\" || $CONTAINERS !\u003d \"1/1\" ]]; then"},{"line_number":91,"context_line":"      echo \"Found old on-demand job which is not running...killing it\""},{"line_number":92,"context_line":"      remove_job \"$NAMESPACE\" \"$ONDEMAND_JOB\""},{"line_number":93,"context_line":"      if [[ $? -ne 0 ]]; then"},{"line_number":94,"context_line":"        return 1"}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_56ee65b4","line":91,"range":{"start_line":91,"start_character":12,"end_line":91,"end_character":56},"updated":"2020-06-09 20:58:45.000000000","message":"What if the init containers are still running or the pods in a pending state due to issues with scheduling?","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    STATUS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $3}\u0027)"},{"line_number":89,"context_line":"    CONTAINERS\u003d$(echo \"$POD_LISTING\" | awk \u0027{print $2}\u0027)"},{"line_number":90,"context_line":"    if [[ $STATUS !\u003d \"Running\" || $CONTAINERS !\u003d \"1/1\" ]]; then"},{"line_number":91,"context_line":"      echo \"Found old on-demand job which is not running...killing it\""},{"line_number":92,"context_line":"      remove_job \"$NAMESPACE\" \"$ONDEMAND_JOB\""},{"line_number":93,"context_line":"      if [[ $? -ne 0 ]]; then"},{"line_number":94,"context_line":"        return 1"}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_b611c1b2","line":91,"range":{"start_line":91,"start_character":59,"end_line":91,"end_character":69},"updated":"2020-06-09 20:58:45.000000000","message":"https://imgur.com/ZiCTEPQ\n\nIf it\u0027s not running, the Completed pod is just being removed, not killed","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    return 1"},{"line_number":107,"context_line":"  fi"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"  ONDEMAND_POD\u003d$(kubectl get pod -n \"$NAMESPACE\" | grep \"$ONDEMAND_JOB\" | awk \u0027{print $1}\u0027)"},{"line_number":110,"context_line":"  kubectl wait --for condition\u003dready --timeout\u003d300s -n \"$NAMESPACE\" pod/\"${ONDEMAND_POD}\""},{"line_number":111,"context_line":"  if [[ $? -ne 0 ]]; then"},{"line_number":112,"context_line":"    return 1"}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_b676e10b","line":109,"range":{"start_line":109,"start_character":17,"end_line":109,"end_character":90},"updated":"2020-06-09 20:58:45.000000000","message":"using the `-o name` flag here gives you the name prefixed with pod/ that you\u0027re using below. Get rid of the awk","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":107,"context_line":"  fi"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"  ONDEMAND_POD\u003d$(kubectl get pod -n \"$NAMESPACE\" | grep \"$ONDEMAND_JOB\" | awk \u0027{print $1}\u0027)"},{"line_number":110,"context_line":"  kubectl wait --for condition\u003dready --timeout\u003d300s -n \"$NAMESPACE\" pod/\"${ONDEMAND_POD}\""},{"line_number":111,"context_line":"  if [[ $? -ne 0 ]]; then"},{"line_number":112,"context_line":"    return 1"},{"line_number":113,"context_line":"  fi"}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_967bddf2","line":110,"range":{"start_line":110,"start_character":68,"end_line":110,"end_character":89},"updated":"2020-06-09 20:58:45.000000000","message":"See above","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":145,"context_line":"  return 0"},{"line_number":146,"context_line":"}"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"function pod_name() {"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"  JOB\u003d$1"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"  # There should only be one matching pod"},{"line_number":153,"context_line":"  POD\u003d$(kubectl get pods -n \"$NAMESPACE\" | grep \"$JOB\" | awk \u0027{print $1}\u0027)"},{"line_number":154,"context_line":"  echo \"$POD\""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"}"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"# Params: \u003cnamespace\u003e \u003cjob\u003e"},{"line_number":159,"context_line":"function remove_job() {"}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_76e289a2","line":156,"range":{"start_line":148,"start_character":0,"end_line":156,"end_character":1},"updated":"2020-06-09 20:58:45.000000000","message":"Is this necessary? If you\u0027re just looking to get the pod name, I feel it\u0027d be more readable to just invoke `kubectl` to get the pod name with the -o flag each time. It\u0027d be a little more robust if you could also use label selectors to get the pod you\u0027re looking for instead of grep","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":162,"context_line":"  JOB\u003d$2"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"  # Cleanup the last attempted job if there is one, wait for the pod to be deleted."},{"line_number":165,"context_line":"  ONDEMAND_POD\u003d$(kubectl get pod -n \"$NAMESPACE\" | grep \"$ONDEMAND_JOB\" | awk \u0027{print $1}\u0027)"},{"line_number":166,"context_line":"  kubectl delete job --ignore-not-found -n \"$NAMESPACE\" \"$JOB\""},{"line_number":167,"context_line":"  kubectl wait --for\u003ddelete --timeout\u003d300s -n \"$NAMESPACE\" pod/\"${ONDEMAND_POD}\" \u0026\u003e/dev/null"},{"line_number":168,"context_line":"  if [[ $? -ne 0 ]]; then"}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_3601313b","line":165,"range":{"start_line":165,"start_character":15,"end_line":165,"end_character":91},"updated":"2020-06-09 20:58:45.000000000","message":"See above comment about the -o flag to get the name and using label selectors instead of grep","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"4a59644f305319ad54da9fc6fe47183f46820ecd","unresolved":false,"context_lines":[{"line_number":166,"context_line":"  kubectl delete job --ignore-not-found -n \"$NAMESPACE\" \"$JOB\""},{"line_number":167,"context_line":"  kubectl wait --for\u003ddelete --timeout\u003d300s -n \"$NAMESPACE\" pod/\"${ONDEMAND_POD}\" \u0026\u003e/dev/null"},{"line_number":168,"context_line":"  if [[ $? -ne 0 ]]; then"},{"line_number":169,"context_line":"    echo \"ERROR: could not destroy the $NAMESPACE $JOB job.\""},{"line_number":170,"context_line":"    return 1"},{"line_number":171,"context_line":"  fi"},{"line_number":172,"context_line":"}"}],"source_content_type":"text/x-smarty","patch_set":34,"id":"ff570b3c_d66f15fa","line":169,"range":{"start_line":169,"start_character":27,"end_line":169,"end_character":34},"updated":"2020-06-09 20:58:45.000000000","message":"nit: delete","commit_id":"544b81843656eaed163ff4767f477eb8d1176daf"}]}
