fix: repair langbot internal validation
This commit is contained in:
@@ -1504,16 +1504,13 @@ kubectl -n ${target.namespace} get deploy ${serviceName} -o json >"$tmp/deploy.j
|
||||
deploy_rc=$?
|
||||
kubectl -n ${target.namespace} get deploy ${target.publicExposure.frpc.deploymentName} -o json >"$tmp/frpc.json" 2>"$tmp/frpc.err"
|
||||
frpc_rc=$?
|
||||
kubectl -n ${target.namespace} exec deploy/${serviceName} -c langbot -- python - <<'PY2' >"$tmp/http.out" 2>"$tmp/http.err"
|
||||
import json
|
||||
import urllib.request
|
||||
kubectl -n ${target.namespace} exec deploy/${serviceName} -c langbot -- python -c 'import json, urllib.request
|
||||
try:
|
||||
with urllib.request.urlopen("http://127.0.0.1:5300/api/v1/system/info", timeout=10) as resp:
|
||||
print(json.dumps({"ok": 200 <= resp.status < 500, "status": resp.status, "bytes": len(resp.read())}))
|
||||
except Exception as exc:
|
||||
print(json.dumps({"ok": False, "error": str(exc)}))
|
||||
raise
|
||||
PY2
|
||||
raise' >"$tmp/http.out" 2>"$tmp/http.err"
|
||||
http_rc=$?
|
||||
python3 - "$deploy_rc" "$frpc_rc" "$http_rc" "$tmp/deploy.json" "$tmp/deploy.err" "$tmp/frpc.json" "$tmp/frpc.err" "$tmp/http.out" "$tmp/http.err" <<'PY'
|
||||
import json, sys
|
||||
|
||||
Reference in New Issue
Block a user