File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6666 key : ${{ github.repository }}-${{ inputs.turbo-cache-key }}-${{ github.event_name }}${{ github.event.pull_request.head.repo.fork && '-fork' || '' }}
6767 path : ./.turbo
6868
69+ # Bun retries a failed request itself, but a registry connection that stalls
70+ # without failing leaves `bun install` waiting until the job's own timeout
71+ # cancels it, the whole budget spent on one hung step. Healthy installs finish
72+ # in under three minutes cold, so an attempt past five is stalled: kill it and
73+ # retry. Any other failure is real and fails at once.
6974 - name : Install dependencies
7075 shell : bash
71- run : bun install --frozen-lockfile --ignore-scripts
76+ run : |
77+ for attempt in 1 2 3; do
78+ timeout --kill-after=30s 5m bun install --frozen-lockfile --ignore-scripts && exit 0
79+ status=$?
80+ if [ "$status" -ne 124 ] && [ "$status" -ne 137 ]; then exit "$status"; fi
81+ echo "::warning title=bun install stalled::attempt ${attempt} of 3 ran past 5 minutes"
82+ done
83+ echo "::error title=bun install stalled::all 3 attempts ran past 5 minutes"
84+ exit 1
Original file line number Diff line number Diff line change @@ -188,6 +188,11 @@ jobs:
188188 --values helm/sim/ci/kind-overlay.yaml \
189189 --wait --timeout 15m
190190
191+ # `--logs` prints the probe's output, so a failure says which URL refused.
192+ - name : Run helm test
193+ run : helm test sim --namespace sim --timeout 5m --logs
194+
195+ # After the test, so it also explains a failed probe, not only a failed install.
191196 - name : Diagnostics on failure
192197 if : failure()
193198 run : |
@@ -196,9 +201,7 @@ jobs:
196201 kubectl -n sim describe pods | tail -100 || true
197202 kubectl -n sim logs deploy/sim-app -c migrations --tail=50 || true
198203 kubectl -n sim logs deploy/sim-app --tail=80 || true
199-
200- - name : Run helm test
201- run : helm test sim --namespace sim --timeout 5m
204+ kubectl -n sim logs deploy/sim-realtime --tail=80 || true
202205
203206 # Resolved once and shared, so the two publish paths cannot package the same
204207 # immutable chart version with different appVersions -- they run in parallel,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v2
22name : sim
33description : A Helm chart for Sim - the open-source AI workspace where teams build, deploy, and manage AI agents
44type : application
5- version : 1.11.8
5+ version : 1.11.9
66appVersion : " v0.8.26"
77kubeVersion : " >=1.25.0-0"
88home : https://sim.ai
Original file line number Diff line number Diff line change @@ -40,15 +40,26 @@ spec:
4040 - -c
4141 - |
4242 set -eu
43- APP_URL="http://{{ include "sim.fullname" . }}-app:{{ .Values.app.service.port }}/"
44- echo "Probing $APP_URL"
45- wget -q -T {{ .Values.tests.timeoutSeconds }} --tries=1 --spider "$APP_URL"
43+ # A pod turns Ready before every node routes its Service to it, so a
44+ # probe sent the moment `helm install --wait` returns can be refused.
45+ # Each URL gets a minute to answer before the test fails.
46+ probe() {
47+ attempt=1
48+ while ! wget -q -T {{ .Values.tests.timeoutSeconds }} --spider "$1"; do
49+ if [ "$attempt" -ge 12 ]; then
50+ echo "FAILED: $1 did not answer after $attempt attempts"
51+ return 1
52+ fi
53+ echo "Attempt $attempt: $1 did not answer; retrying in 5s"
54+ attempt=$((attempt + 1))
55+ sleep 5
56+ done
57+ echo "OK: $1"
58+ }
59+ probe "http://{{ include "sim.fullname" . }}-app:{{ .Values.app.service.port }}/"
4660 {{- if .Values.realtime.enabled }}
47- RT_URL="http://{{ include "sim.fullname" . }}-realtime:{{ .Values.realtime.service.port }}/health"
48- echo "Probing $RT_URL"
49- wget -q -T {{ .Values.tests.timeoutSeconds }} --tries=1 --spider "$RT_URL"
61+ probe "http://{{ include "sim.fullname" . }}-realtime:{{ .Values.realtime.service.port }}/health"
5062 {{- end }}
51- echo "OK"
5263 resources :
5364 {{- toYaml .Values.tests.resources | nindent 8 }}
5465{{- end }}
You can’t perform that action at this time.
0 commit comments