)]}'
{"nagios/plugins/pv_disk_utilization.py":[{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"# need to export path to configuration file. should work faster"},{"line_number":12,"context_line":"if os.getenv(\"KUBECONFIG\") is not None:"},{"line_number":13,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d{}\".format(os.environ[\"KUBECONFIG\"])"},{"line_number":14,"context_line":"else:"},{"line_number":15,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d/etc/kubernetes/admin/kubeconfig.yaml\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_4a7ef36d","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":27},"updated":"2020-02-06 05:39:14.000000000","message":"os.getenv supports an optional second default parameter [0]. There is no need for this if-else.\n\n[0] https://docs.python.org/3.8/library/os.html#os.getenv","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"f4971091ed00b01bf21b511fa07b2a6807af1885","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"# need to export path to configuration file. should work faster"},{"line_number":12,"context_line":"if os.getenv(\"KUBECONFIG\") is not None:"},{"line_number":13,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d{}\".format(os.environ[\"KUBECONFIG\"])"},{"line_number":14,"context_line":"else:"},{"line_number":15,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d/etc/kubernetes/admin/kubeconfig.yaml\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_52d3cf37","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":27},"in_reply_to":"3fa7e38b_1e2b3aea","updated":"2020-02-10 16:34:39.000000000","message":"Thanks for clearing it Tin, I have updated the patch-set 5 with changes mentioned. Please review when you get the time.\nAppreciate that!","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"7eb811f33c08156f83ca9f87857d46af1901de4f","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"# need to export path to configuration file. should work faster"},{"line_number":12,"context_line":"if os.getenv(\"KUBECONFIG\") is not None:"},{"line_number":13,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d{}\".format(os.environ[\"KUBECONFIG\"])"},{"line_number":14,"context_line":"else:"},{"line_number":15,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d/etc/kubernetes/admin/kubeconfig.yaml\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_975e4012","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":27},"in_reply_to":"3fa7e38b_2bedaf8c","updated":"2020-02-06 22:34:08.000000000","message":"The if-else logic is required for the fact here, suppose if the user set the KUBECONFIG and script check for it is to be not none. The assignment of CONFIG variable used in line 29 is going to fail. This if-else block, take care of CONFIG variable to be assigned. The same case holds true for KUBECTL, but the KUBECTL variable for sure is not used anywhere else.","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"# need to export path to configuration file. should work faster"},{"line_number":12,"context_line":"if os.getenv(\"KUBECONFIG\") is not None:"},{"line_number":13,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d{}\".format(os.environ[\"KUBECONFIG\"])"},{"line_number":14,"context_line":"else:"},{"line_number":15,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d/etc/kubernetes/admin/kubeconfig.yaml\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_2bedaf8c","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":27},"in_reply_to":"3fa7e38b_4a7ef36d","updated":"2020-02-06 19:08:31.000000000","message":"I will change it to.\n\nif os.getenv(\"KUBECONFIG\") is None:\n  \"KUBECONFIG\u003d/etc/kubernetes/admin/kubeconfig.yaml\"","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"aefb75ecc1a99cec413422bdeacd4e08a4f99233","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"# need to export path to configuration file. should work faster"},{"line_number":12,"context_line":"if os.getenv(\"KUBECONFIG\") is not None:"},{"line_number":13,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d{}\".format(os.environ[\"KUBECONFIG\"])"},{"line_number":14,"context_line":"else:"},{"line_number":15,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d/etc/kubernetes/admin/kubeconfig.yaml\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_1e2b3aea","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":27},"in_reply_to":"3fa7e38b_975e4012","updated":"2020-02-07 21:42:19.000000000","message":"I think my original statement wasn\u0027t sufficiently clear. Can this thing not be written as:\n\n    CONFIG \u003d os.getenv(\u0027KUBECONFIG\u0027, \u0027/etc/kubernetes/admin/kubeconfig.yaml\u0027)\n\nand change L29 to \n\nkubectl \u003d \"KUBECONFIG\u003d{config} {kubectl} ...\"","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d{}\".format(os.environ[\"KUBECONFIG\"])"},{"line_number":14,"context_line":"else:"},{"line_number":15,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d/etc/kubernetes/admin/kubeconfig.yaml\""},{"line_number":16,"context_line":"if os.getenv(\"KUBECTL\") is not None:"},{"line_number":17,"context_line":"    KUBECTL \u003d os.environ[\"KUBECTL\"]"},{"line_number":18,"context_line":"else:"},{"line_number":19,"context_line":"    KUBECTL \u003d \"/usr/local/bin/kubectl\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_2a7b777a","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":25},"updated":"2020-02-06 05:39:14.000000000","message":"is it expected there is an environment variable called KUBECTL that points to the kubectl executable?","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d{}\".format(os.environ[\"KUBECONFIG\"])"},{"line_number":14,"context_line":"else:"},{"line_number":15,"context_line":"    CONFIG \u003d \"KUBECONFIG\u003d/etc/kubernetes/admin/kubeconfig.yaml\""},{"line_number":16,"context_line":"if os.getenv(\"KUBECTL\") is not None:"},{"line_number":17,"context_line":"    KUBECTL \u003d os.environ[\"KUBECTL\"]"},{"line_number":18,"context_line":"else:"},{"line_number":19,"context_line":"    KUBECTL \u003d \"/usr/local/bin/kubectl\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_abc51f37","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":25},"in_reply_to":"3fa7e38b_2a7b777a","updated":"2020-02-06 19:08:31.000000000","message":"The script logic is not expecting the KUBECTL to be a existing environment variable. It will see if the variable is not set it will assign it. This is done just incase to make sure if user haven\u0027t already loaded the that variable. Which is most of cases is not going to be true so the script will export the variable on line 19.","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":21,"context_line":"OPTIONS \u003d {"},{"line_number":22,"context_line":"           \u0027read\u0027: \"-o json\","},{"line_number":23,"context_line":"           \u0027ns\u0027: \"-n\","},{"line_number":24,"context_line":"           \u0027exec\u0027: \"\""},{"line_number":25,"context_line":"          }"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"logger \u003d logging.getLogger(os.path.splitext(os.path.basename(sys.argv[0]))[0])"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_ca91839d","line":24,"range":{"start_line":24,"start_character":11,"end_line":24,"end_character":21},"updated":"2020-02-06 05:39:14.000000000","message":"is this used anywhere?","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":21,"context_line":"OPTIONS \u003d {"},{"line_number":22,"context_line":"           \u0027read\u0027: \"-o json\","},{"line_number":23,"context_line":"           \u0027ns\u0027: \"-n\","},{"line_number":24,"context_line":"           \u0027exec\u0027: \"\""},{"line_number":25,"context_line":"          }"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"logger \u003d logging.getLogger(os.path.splitext(os.path.basename(sys.argv[0]))[0])"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_0b89d31c","line":24,"range":{"start_line":24,"start_character":11,"end_line":24,"end_character":21},"in_reply_to":"3fa7e38b_ca91839d","updated":"2020-02-06 19:08:31.000000000","message":"I will go ahead and remove it.","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"logger \u003d logging.getLogger(os.path.splitext(os.path.basename(sys.argv[0]))[0])"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"kubectl \u003d \"{config} {kubectl} {options} {namespace}\".format(config\u003dCONFIG,"},{"line_number":30,"context_line":"                                                            kubectl\u003dKUBECTL,"},{"line_number":31,"context_line":"                                                            namespace\u003dOPTIONS[\"ns\"],"},{"line_number":32,"context_line":"                                                            options\u003dOPTIONS[\"read\"])"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"OK       \u003d 0    # 0 - Service is OK"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_ea8c7f82","line":32,"range":{"start_line":29,"start_character":60,"end_line":32,"end_character":83},"updated":"2020-02-06 05:39:14.000000000","message":"can this not be using the OPTIONS dictionary to do the formatting?","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"logger \u003d logging.getLogger(os.path.splitext(os.path.basename(sys.argv[0]))[0])"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"kubectl \u003d \"{config} {kubectl} {options} {namespace}\".format(config\u003dCONFIG,"},{"line_number":30,"context_line":"                                                            kubectl\u003dKUBECTL,"},{"line_number":31,"context_line":"                                                            namespace\u003dOPTIONS[\"ns\"],"},{"line_number":32,"context_line":"                                                            options\u003dOPTIONS[\"read\"])"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"OK       \u003d 0    # 0 - Service is OK"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_4ba6ebae","line":32,"range":{"start_line":29,"start_character":60,"end_line":32,"end_character":83},"in_reply_to":"3fa7e38b_ea8c7f82","updated":"2020-02-06 19:08:31.000000000","message":"I can add the \"-n\" and \"-o json\" to line 29 and remove the OPTIONS","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":37,"context_line":"CRITICAL \u003d 2    # 2 - Service is in a CRITICAL status."},{"line_number":38,"context_line":"UNKNOWN  \u003d 3    # 3 - Service status is UNKNOWN"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class CustomFormatter(argparse.RawDescriptionHelpFormatter,"},{"line_number":41,"context_line":"                      argparse.ArgumentDefaultsHelpFormatter):"},{"line_number":42,"context_line":"    pass"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_8a8b8b67","line":41,"range":{"start_line":40,"start_character":0,"end_line":41,"end_character":62},"updated":"2020-02-06 05:39:14.000000000","message":"is this CustomFormatter needed?","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"CRITICAL \u003d 2    # 2 - Service is in a CRITICAL status."},{"line_number":38,"context_line":"UNKNOWN  \u003d 3    # 3 - Service status is UNKNOWN"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class CustomFormatter(argparse.RawDescriptionHelpFormatter,"},{"line_number":41,"context_line":"                      argparse.ArgumentDefaultsHelpFormatter):"},{"line_number":42,"context_line":"    pass"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_cb7dfb1e","line":41,"range":{"start_line":40,"start_character":0,"end_line":41,"end_character":62},"in_reply_to":"3fa7e38b_8a8b8b67","updated":"2020-02-06 19:08:31.000000000","message":"This class is needed for parser object at line 49.","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                                     formatter_class\u003dCustomFormatter)"},{"line_number":51,"context_line":"    g \u003d parser.add_argument_group(\"monitoring settings\")"},{"line_number":52,"context_line":"    g.add_argument(\"--application\", \"-a\", action\u003d\"store\","},{"line_number":53,"context_line":"                   help\u003d\"Application specification of the pod\",required\u003dTrue)"},{"line_number":54,"context_line":"    g.add_argument(\"--component\", \"-co\", action\u003d\"store\","},{"line_number":55,"context_line":"                   help\u003d\"component specification of the pod\",required\u003dTrue)"},{"line_number":56,"context_line":"    g.add_argument(\"--namespace\", \"-n\",  action\u003d\"store\","}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_4ae3533b","line":53,"range":{"start_line":53,"start_character":63,"end_line":53,"end_character":64},"updated":"2020-02-06 05:39:14.000000000","message":"nit: there should be spaces after ,","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                                     formatter_class\u003dCustomFormatter)"},{"line_number":51,"context_line":"    g \u003d parser.add_argument_group(\"monitoring settings\")"},{"line_number":52,"context_line":"    g.add_argument(\"--application\", \"-a\", action\u003d\"store\","},{"line_number":53,"context_line":"                   help\u003d\"Application specification of the pod\",required\u003dTrue)"},{"line_number":54,"context_line":"    g.add_argument(\"--component\", \"-co\", action\u003d\"store\","},{"line_number":55,"context_line":"                   help\u003d\"component specification of the pod\",required\u003dTrue)"},{"line_number":56,"context_line":"    g.add_argument(\"--namespace\", \"-n\",  action\u003d\"store\","}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_4b982b75","line":53,"range":{"start_line":53,"start_character":63,"end_line":53,"end_character":64},"in_reply_to":"3fa7e38b_4ae3533b","updated":"2020-02-06 19:08:31.000000000","message":"I will add it. Thanks for pointing it out.","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"a3f8de14145cad3b88ffcfadb15ec74509d6e00b","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        logger.debug(\"Pods are running on hosts {hs}\".format(hs\u003dk8_hosts))"},{"line_number":117,"context_line":"    except Exception as e:"},{"line_number":118,"context_line":"        logger.error(\"Failed to get k8 host for the pods {excetion}\".format(exception\u003de))"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    try:"},{"line_number":121,"context_line":"        podname_hostname_cmd \u003d \"{command} {ns} get pods -l application\u003d{app},component\u003d{comp}|egrep \u0027hostname|nodeName\u0027|grep -v topologyKey\".format("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_a666bb55","line":118,"range":{"start_line":118,"start_character":58,"end_line":118,"end_character":66},"updated":"2020-02-06 14:51:42.000000000","message":"exception. Can this not just be:\n\n   logger.error(\"Failed to get k8 host for the pods\", e)\n\n?","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        logger.debug(\"Pods are running on hosts {hs}\".format(hs\u003dk8_hosts))"},{"line_number":117,"context_line":"    except Exception as e:"},{"line_number":118,"context_line":"        logger.error(\"Failed to get k8 host for the pods {excetion}\".format(exception\u003de))"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    try:"},{"line_number":121,"context_line":"        podname_hostname_cmd \u003d \"{command} {ns} get pods -l application\u003d{app},component\u003d{comp}|egrep \u0027hostname|nodeName\u0027|grep -v topologyKey\".format("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_abc43f62","line":118,"range":{"start_line":118,"start_character":58,"end_line":118,"end_character":66},"in_reply_to":"3fa7e38b_a666bb55","updated":"2020-02-06 19:08:31.000000000","message":"It can be, but i can change that. I was trying to follow the same syntax overall","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                command\u003dkubectl,"},{"line_number":123,"context_line":"                ns\u003dnamespace,"},{"line_number":124,"context_line":"                app\u003dapplication,"},{"line_number":125,"context_line":"                comp\u003dcomponent) + \"|awk -F\u0027:\u0027 \u0027{print $2}\u0027|tr -d \u0027,\u0027 |tr -d \u0027\\\"\u0027|tr -d \u0027\\ \u0027|sed \u0027$!N;s/\\\\n/:/\u0027\""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        pod_host_key_pair \u003d os.popen(podname_hostname_cmd).read().strip().split(\"\\n\")"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_2af057fc","line":125,"range":{"start_line":125,"start_character":31,"end_line":125,"end_character":39},"updated":"2020-02-06 05:39:14.000000000","message":"why not put this into the original command instead of doing a separate concatenation.","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":138,"context_line":"         pv_capacity_curl \u003d \"curl -s {h}:10255/metrics |grep {ns}|grep -i {app}|grep -v backup|grep kubelet_volume_stats_capacity_bytes\".format("},{"line_number":139,"context_line":"                 h\u003dhost,"},{"line_number":140,"context_line":"                 ns\u003dnamespace,"},{"line_number":141,"context_line":"                 app\u003dapplication) + \"|awk \u0027{print $2}\u0027\""},{"line_number":142,"context_line":"         pv_utilization_curl \u003d \"curl -s {h}:10255/metrics |grep  {ns}|grep -i {app}|grep -v backup|grep kubelet_volume_stats_used_bytes\".format("},{"line_number":143,"context_line":"                 h\u003dhost,"},{"line_number":144,"context_line":"                 ns\u003dnamespace,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_cad66355","line":141,"range":{"start_line":141,"start_character":34,"end_line":141,"end_character":37},"updated":"2020-02-06 05:39:14.000000000","message":"ditto","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":138,"context_line":"         pv_capacity_curl \u003d \"curl -s {h}:10255/metrics |grep {ns}|grep -i {app}|grep -v backup|grep kubelet_volume_stats_capacity_bytes\".format("},{"line_number":139,"context_line":"                 h\u003dhost,"},{"line_number":140,"context_line":"                 ns\u003dnamespace,"},{"line_number":141,"context_line":"                 app\u003dapplication) + \"|awk \u0027{print $2}\u0027\""},{"line_number":142,"context_line":"         pv_utilization_curl \u003d \"curl -s {h}:10255/metrics |grep  {ns}|grep -i {app}|grep -v backup|grep kubelet_volume_stats_used_bytes\".format("},{"line_number":143,"context_line":"                 h\u003dhost,"},{"line_number":144,"context_line":"                 ns\u003dnamespace,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_8bc9437b","line":141,"range":{"start_line":141,"start_character":34,"end_line":141,"end_character":37},"in_reply_to":"3fa7e38b_cad66355","updated":"2020-02-06 19:08:31.000000000","message":"$2 variable of awk was having issue inside the string.format function. I will try to see if i find a way to add it as one string.","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":142,"context_line":"         pv_utilization_curl \u003d \"curl -s {h}:10255/metrics |grep  {ns}|grep -i {app}|grep -v backup|grep kubelet_volume_stats_used_bytes\".format("},{"line_number":143,"context_line":"                 h\u003dhost,"},{"line_number":144,"context_line":"                 ns\u003dnamespace,"},{"line_number":145,"context_line":"                 app\u003dapplication) + \"|awk \u0027{print $2}\u0027\""},{"line_number":146,"context_line":"         pv_capacity \u003d os.popen(pv_capacity_curl).read().strip()"},{"line_number":147,"context_line":"         pv_utilization \u003d os.popen(pv_utilization_curl).read().strip()"},{"line_number":148,"context_line":"         logger.debug(\"PV utilisatin in bytes for pod running on host {hs} is {upv}\".format("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_ead1df5b","line":145,"range":{"start_line":145,"start_character":33,"end_line":145,"end_character":38},"updated":"2020-02-06 05:39:14.000000000","message":"ditto","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":142,"context_line":"         pv_utilization_curl \u003d \"curl -s {h}:10255/metrics |grep  {ns}|grep -i {app}|grep -v backup|grep kubelet_volume_stats_used_bytes\".format("},{"line_number":143,"context_line":"                 h\u003dhost,"},{"line_number":144,"context_line":"                 ns\u003dnamespace,"},{"line_number":145,"context_line":"                 app\u003dapplication) + \"|awk \u0027{print $2}\u0027\""},{"line_number":146,"context_line":"         pv_capacity \u003d os.popen(pv_capacity_curl).read().strip()"},{"line_number":147,"context_line":"         pv_utilization \u003d os.popen(pv_utilization_curl).read().strip()"},{"line_number":148,"context_line":"         logger.debug(\"PV utilisatin in bytes for pod running on host {hs} is {upv}\".format("}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_ebb23705","line":145,"range":{"start_line":145,"start_character":33,"end_line":145,"end_character":38},"in_reply_to":"3fa7e38b_ead1df5b","updated":"2020-02-06 19:08:31.000000000","message":"$2 variable of awk was having issue inside the string.format function. I will try to see if i find a way to add it as one string.","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ee4ad8f0a47b5193ba080d92ac290eaa485959fa","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    options \u003d parse_args()"},{"line_number":219,"context_line":"    setup_logging(options)"},{"line_number":220,"context_line":"    if options.maxutilization:"},{"line_number":221,"context_line":"       MAX_UTILIZATION \u003d float(options.maxutilization.strip())"},{"line_number":222,"context_line":"    logger.debug(\"checking pv utlization of pod {application} {component} in {namespace}\".format(application\u003doptions.application,"},{"line_number":223,"context_line":"                                                                                               component\u003doptions.component,"},{"line_number":224,"context_line":"                                                                                               namespace\u003doptions.namespace))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_4accb3bd","line":221,"range":{"start_line":221,"start_character":7,"end_line":221,"end_character":62},"updated":"2020-02-06 05:39:14.000000000","message":"why not specify the option as a float in argparse so you don\u0027t need to do a cast here","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"},{"author":{"_account_id":30705,"name":"Jasvinder Singh Kwatra","email":"js581j@att.com","username":"js581j"},"change_message_id":"09c7d814a322a231efd5f08c89ff4990e3cccd9c","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    options \u003d parse_args()"},{"line_number":219,"context_line":"    setup_logging(options)"},{"line_number":220,"context_line":"    if options.maxutilization:"},{"line_number":221,"context_line":"       MAX_UTILIZATION \u003d float(options.maxutilization.strip())"},{"line_number":222,"context_line":"    logger.debug(\"checking pv utlization of pod {application} {component} in {namespace}\".format(application\u003doptions.application,"},{"line_number":223,"context_line":"                                                                                               component\u003doptions.component,"},{"line_number":224,"context_line":"                                                                                               namespace\u003doptions.namespace))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_6be5e706","line":221,"range":{"start_line":221,"start_character":7,"end_line":221,"end_character":62},"in_reply_to":"3fa7e38b_4accb3bd","updated":"2020-02-06 19:08:31.000000000","message":"I will fix this. Thanks for pointing.","commit_id":"3833f1f4df775c521b91f0e5a191e46e2f4413ad"}]}
