Skip to content
Merged
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
35 changes: 31 additions & 4 deletions .github/workflows/ci-host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,39 @@ jobs:
set +e
dbus-run-session -- $TEST_CMD 2>&1 | tee /tmp/test-output.log
exit_code=${PIPESTATUS[0]}
if [ $exit_code -ne 0 ] && grep -q "ChunkLoadError" /tmp/test-output.log; then

# Transient chunk-fetch failures present as `ChunkLoadError` under
# webpack and as `Failed to fetch dynamically imported module` /
# `NetworkError when attempting to fetch resource` under Vite.
# Retry the whole shard once when we detect any of these.
RETRY_PATTERN='ChunkLoadError|Failed to fetch dynamically imported module|NetworkError when attempting to fetch resource'
if [ $exit_code -ne 0 ] && grep -Eq "$RETRY_PATTERN" /tmp/test-output.log; then
echo ""
echo "::warning::ChunkLoadError detected — retrying shard ${{ matrix.shardIndex }}..."
echo "::warning::Transient chunk-fetch failure detected — retrying shard ${{ matrix.shardIndex }}"
echo "::group::Matched lines (first 5)"
grep -E "$RETRY_PATTERN" /tmp/test-output.log | head -5 || true
echo "::endgroup::"
echo ""
dbus-run-session -- $TEST_CMD
exit_code=$?

dbus-run-session -- $TEST_CMD 2>&1 | tee /tmp/test-output-retry.log
Comment thread
habdelra marked this conversation as resolved.
retry_exit_code=${PIPESTATUS[0]}
if [ $retry_exit_code -eq 0 ]; then
echo "::notice::Shard ${{ matrix.shardIndex }} recovered on retry — original failure was a transient chunk-fetch flake"
# Promote the retry's log so downstream steps (memory-report
# extraction, baseline check / update) read from the successful
# run, not the failed first attempt.
mv /tmp/test-output-retry.log /tmp/test-output.log
exit_code=0
else
echo "::error::Shard ${{ matrix.shardIndex }} failed twice after chunk-fetch retry — investigate as a deterministic failure, not a flake"
if grep -Eq "$RETRY_PATTERN" /tmp/test-output-retry.log; then
echo "::warning::Retry hit the same transient pattern again — possible persistent network or asset-serving issue"
echo "::group::Retry-run matched lines (first 5)"
grep -E "$RETRY_PATTERN" /tmp/test-output-retry.log | head -5 || true
echo "::endgroup::"
fi
exit_code=$retry_exit_code
fi
fi
exit $exit_code
env:
Expand Down
Loading