Skip to content

Commit

Permalink
Only display running pod logs in CI
Browse files Browse the repository at this point in the history
Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
  • Loading branch information
sivanantha321 committed Mar 7, 2024
1 parent b621a28 commit 23a5847
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ func probeIngress(url string) (bool, error) {
defer cancel()
req, err := http.NewRequestWithContext(ctx, http.MethodGet, target, nil)
if err != nil {
return isReady, errors.Wrapf(err, "failed to probe ingress %s", target)
return isReady, errors.Wrapf(err, "failed to create ingress probe request %s", target)
}
// ProbeKey is the name of a header that can be added to requests to probe the ingress.
// Requests with this header will not be passed to the user container or included in request metrics.
Expand All @@ -497,6 +497,8 @@ func probeIngress(url string) (bool, error) {
}
if resp.StatusCode == http.StatusOK {
isReady = true
} else {
log.V(1).Error(fmt.Errorf("failed to probe ingress"), "Failed to probe ingress", "url", target)
}
return isReady, nil
}
Expand Down
8 changes: 4 additions & 4 deletions test/scripts/gh-actions/status-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ kubectl logs -l control-plane=kserve-controller-manager -n kserve -c manager --t
echo "::endgroup::"

echo "::group::Predictor Pod logs"
for pod in $(kubectl get pods -l 'component in (predictor)' -o jsonpath='{.items[*].metadata.name}' -n kserve-ci-e2e-test); do
for pod in $(kubectl get pods -l 'component in (predictor)' --field-selector=status.phase!=Terminating -o jsonpath='{.items[*].metadata.name}' -n kserve-ci-e2e-test); do
echo "===================================== Logs for Predictor Pod: $pod ========================================="
kubectl logs "$pod" -c kserve-container -n kserve-ci-e2e-test --tail 500
echo "================================================================================================================"
done
echo "::endgroup::"

echo "::group::Transformer Pod logs"
for pod in $(kubectl get pods -l 'component in (transformer)' -o jsonpath='{.items[*].metadata.name}' -n kserve-ci-e2e-test); do
for pod in $(kubectl get pods -l 'component in (transformer)' --field-selector=status.phase!=Terminating -o jsonpath='{.items[*].metadata.name}' -n kserve-ci-e2e-test); do
echo "===================================== Logs for Transformer Pod: $pod ======================================="
kubectl logs "$pod" -c kserve-container -n kserve-ci-e2e-test --tail 500
echo "================================================================================================================"
done
echo "::endgroup::"

echo "::group::Explainer Pod logs"
for pod in $(kubectl get pods -l 'component in (explainer)' -o jsonpath='{.items[*].metadata.name}' -n kserve-ci-e2e-test); do
for pod in $(kubectl get pods -l 'component in (explainer)' --field-selector=status.phase!=Terminating -o jsonpath='{.items[*].metadata.name}' -n kserve-ci-e2e-test); do
echo "===================================== Logs for Explainer Pod: $pod ========================================="
kubectl logs "$pod" -c kserve-container -n kserve-ci-e2e-test --tail 500
echo "================================================================================================================"
done
echo "::endgroup::"

echo "::group::InferenceGraph Pod logs"
for pod in $(kubectl get pods -l 'serving.kserve.io/inferencegraph=model-chainer' -o jsonpath='{.items[*].metadata.name}' -n kserve-ci-e2e-test); do
for pod in $(kubectl get pods -l 'serving.kserve.io/inferencegraph=model-chainer' --field-selector=status.phase!=Terminating -o jsonpath='{.items[*].metadata.name}' -n kserve-ci-e2e-test); do
echo "===================================== Logs for Graph Pod: $pod ========================================="
kubectl logs "$pod" -c user-container -n kserve-ci-e2e-test --tail 500
echo "================================================================================================================"
Expand Down

0 comments on commit 23a5847

Please sign in to comment.