diff --git a/codebundles/curl-http-ok/runbook.robot b/codebundles/curl-http-ok/runbook.robot index e644708e..ff1075f1 100644 --- a/codebundles/curl-http-ok/runbook.robot +++ b/codebundles/curl-http-ok/runbook.robot @@ -19,12 +19,6 @@ Checking HTTP URL Is Available And Timely ${curl_rsp}= RW.CLI.Run Cli ... cmd=curl -o /dev/null -w '{"http_code": \%{http_code}, "time_total": \%{time_total}}' -s ${URL} ... render_in_commandlist=true - # ${owner_details_dict}= Evaluate json.loads(r"${OWNER_DETAILS}") - # ${owner_details_dict}= Evaluate json.loads(r'''${OWNER_DETAILS}''') json - - # ${owner_kind}= Set Variable ${owner_details_dict['kind']} - # ${owner_name}= Set Variable ${owner_details_dict['name']} - # ${owner_namespace}= Set Variable ${owner_details_dict['namespace']} ${owner_kind}= RW.CLI.Run Cli ... cmd=echo '${OWNER_DETAILS}' | jq -r .kind | sed 's/ *$//' | tr -d '\n' ... include_in_history=False diff --git a/codebundles/k8s-namespace-healthcheck/runbook.robot b/codebundles/k8s-namespace-healthcheck/runbook.robot index 945adae9..9d6bdb24 100644 --- a/codebundles/k8s-namespace-healthcheck/runbook.robot +++ b/codebundles/k8s-namespace-healthcheck/runbook.robot @@ -260,10 +260,6 @@ Troubleshoot Workload Status Conditions In Namespace `${NAMESPACE}` ... cmd=echo "${item["name"]}" | sed 's/ *$//' | tr -d '\n' ... env=${env} ... include_in_history=False - # ${object_status_string}= Replace String ${item["conditions"]} ' " - # ${object_status_string}= Replace String ${object_status_string} False false - # ${object_status_string}= Replace String ${object_status_string} True true - # ${object_status_string}= Replace String ${object_status_string} None null ${object_status_string}= RW.CLI.Run Cli ... cmd=echo "${item["conditions"]}" | sed 's/True/true/g; s/False/false/g; s/None/null/g; s/'\\''/\"/g' ... env=${env} @@ -280,9 +276,11 @@ Troubleshoot Workload Status Conditions In Namespace `${NAMESPACE}` ... include_in_history=False # FIXME: There's an odd condition where a pod with a name like this: jx-preview-gc-jobs-28337580-464vm produces no matches # as it's disappered, but events still linger. Need to catch this error later and validate a fix - IF len($item_owner.stdout) > 0 and ($item_owner.stdout) != "No resource found" + IF len($item_owner.stdout) > 0 and ($item_owner.stdout) != "No resource found\n" ${owner_kind} ${owner_name}= Split String ${item_owner.stdout} ${SPACE} ${owner_name}= Replace String ${owner_name} \n ${EMPTY} + ELSE + ${owner_kind} ${owner_name}= Set Variable "" END ${item_next_steps}= RW.CLI.Run Bash File ... bash_file=workload_next_steps.sh