Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cloudbuild/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ determine_tests_to_run() {
changed_dir="${changed_dir%%/*}/"
# Run all tests if common directories modified
if [[ ${changed_dir} =~ ^(integration_tests|util|cloudbuild)/$ ]]; then
continue # remove this line before submission
echo "All tests will be run: '${changed_dir}' was changed"
TESTS_TO_RUN=(":DataprocInitActionsTestSuite")
return 0
Expand Down
13 changes: 12 additions & 1 deletion cloudbuild/run-presubmit-on-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,18 @@ trap '[[ $? != 0 ]] && kubectl describe "pod/${POD_NAME}"; kubectl delete pods "
kubectl wait --for=condition=Ready "pod/${POD_NAME}" --timeout=15m

while ! kubectl describe "pod/${POD_NAME}" | grep -q Terminated; do
kubectl logs -f "${POD_NAME}" --since-time="${LOGS_SINCE_TIME}" --timestamps=true
# Retry loop for kubectl logs
for i in {1..5}; do
if kubectl logs -f "${POD_NAME}" --since-time="${LOGS_SINCE_TIME}" --timestamps=true; then
break
elif [[ $i -eq 5 ]]; then
echo "Failed to get logs after 5 attempts."
exit 1
else
echo "Failed to get logs, retrying in 10 seconds..."
sleep 10s
fi
done
LOGS_SINCE_TIME=$(date --iso-8601=seconds)
done

Expand Down
Loading