mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-12 20:46:47 +00:00
Fix e2e tests infinite looping when waiting for resources (#2496)
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
This commit is contained in:
52
.github/workflows/e2e-test-linux-vm.yaml
vendored
52
.github/workflows/e2e-test-linux-vm.yaml
vendored
@@ -21,6 +21,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
default-setup:
|
default-setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
||||||
env:
|
env:
|
||||||
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
||||||
@@ -55,11 +56,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -84,11 +86,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -107,6 +110,7 @@ jobs:
|
|||||||
|
|
||||||
single-namespace-setup:
|
single-namespace-setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
||||||
env:
|
env:
|
||||||
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
||||||
@@ -143,11 +147,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -172,11 +177,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -195,6 +201,7 @@ jobs:
|
|||||||
|
|
||||||
dind-mode-setup:
|
dind-mode-setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
||||||
env:
|
env:
|
||||||
WORKFLOW_FILE: arc-test-dind-workflow.yaml
|
WORKFLOW_FILE: arc-test-dind-workflow.yaml
|
||||||
@@ -229,11 +236,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -259,11 +267,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -282,6 +291,7 @@ jobs:
|
|||||||
|
|
||||||
kubernetes-mode-setup:
|
kubernetes-mode-setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
||||||
env:
|
env:
|
||||||
WORKFLOW_FILE: "arc-test-kubernetes-workflow.yaml"
|
WORKFLOW_FILE: "arc-test-kubernetes-workflow.yaml"
|
||||||
@@ -321,11 +331,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -355,11 +366,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -378,6 +390,7 @@ jobs:
|
|||||||
|
|
||||||
auth-proxy-setup:
|
auth-proxy-setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
||||||
env:
|
env:
|
||||||
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
||||||
@@ -412,11 +425,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -453,11 +467,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -476,6 +491,7 @@ jobs:
|
|||||||
|
|
||||||
anonymous-proxy-setup:
|
anonymous-proxy-setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
||||||
env:
|
env:
|
||||||
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
||||||
@@ -510,11 +526,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -545,11 +562,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -568,6 +586,7 @@ jobs:
|
|||||||
|
|
||||||
self-signed-ca-setup:
|
self-signed-ca-setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
|
||||||
env:
|
env:
|
||||||
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
WORKFLOW_FILE: "arc-test-workflow.yaml"
|
||||||
@@ -602,11 +621,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
echo "Timeout waiting for controller pod with label app.kubernetes.io/name=gha-runner-scale-set-controller"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l app.kubernetes.io/name=gha-runner-scale-set-controller
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
@@ -629,11 +649,12 @@ jobs:
|
|||||||
cat ${{ github.workspace }}/mitmproxy/mitmproxy-ca-cert.pem
|
cat ${{ github.workspace }}/mitmproxy/mitmproxy-ca-cert.pem
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for mitmproxy generate its CA cert"
|
echo "Timeout waiting for mitmproxy generate its CA cert"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
sudo cp ${{ github.workspace }}/mitmproxy/mitmproxy-ca-cert.pem ${{ github.workspace }}/mitmproxy/mitmproxy-ca-cert.crt
|
sudo cp ${{ github.workspace }}/mitmproxy/mitmproxy-ca-cert.pem ${{ github.workspace }}/mitmproxy/mitmproxy-ca-cert.crt
|
||||||
sudo chown runner ${{ github.workspace }}/mitmproxy/mitmproxy-ca-cert.crt
|
sudo chown runner ${{ github.workspace }}/mitmproxy/mitmproxy-ca-cert.crt
|
||||||
@@ -661,11 +682,12 @@ jobs:
|
|||||||
echo "Pod found: $POD_NAME"
|
echo "Pod found: $POD_NAME"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ "$count" -ge 10 ]; then
|
if [ "$count" -ge 60 ]; then
|
||||||
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
echo "Timeout waiting for listener pod with label actions.github.com/scale-set-name=$ARC_NAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
count=$((count+1))
|
||||||
done
|
done
|
||||||
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
kubectl wait --timeout=30s --for=condition=ready pod -n arc-systems -l actions.github.com/scale-set-name=$ARC_NAME
|
||||||
kubectl get pod -n arc-systems
|
kubectl get pod -n arc-systems
|
||||||
|
|||||||
Reference in New Issue
Block a user