From 61c4362faedf45a01152b557f6e576285a31325f Mon Sep 17 00:00:00 2001 From: Daniel Young Lee Date: Thu, 24 Jul 2025 12:29:36 -0700 Subject: [PATCH] fix: increase start delay for ASGI conformance tests to address flaky failures The ASGI conformance tests are failing sporadically with connection refused errors, where the server appears to not be ready when the test client attempts to connect. Hypothesis: The default 1-second start delay may be insufficient for Uvicorn/ASGI server startup in CI environments. This change increases startDelay to 5 seconds to match the buildpack integration tests, which have been running reliably. Note: The GitHub Action expects startDelay (camelCase) as an input parameter, which it then passes to the conformance test client as -start-delay flag. This is an attempt to diagnose and fix the intermittent failures - further investigation may be needed if the issue persists. --- .github/workflows/conformance-asgi.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/conformance-asgi.yml b/.github/workflows/conformance-asgi.yml index 8a61cd4c..1cdece9f 100644 --- a/.github/workflows/conformance-asgi.yml +++ b/.github/workflows/conformance-asgi.yml @@ -54,6 +54,7 @@ jobs: useBuildpacks: false validateMapping: false cmd: "'functions-framework --source tests/conformance/async_main.py --target write_http --signature-type http --asgi'" + startDelay: 5 - name: Run CloudEvents conformance tests uses: GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6 @@ -62,6 +63,7 @@ jobs: useBuildpacks: false validateMapping: false cmd: "'functions-framework --source tests/conformance/async_main.py --target write_cloud_event --signature-type cloudevent --asgi'" + startDelay: 5 - name: Run HTTP conformance tests declarative uses: GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6 @@ -70,6 +72,7 @@ jobs: useBuildpacks: false validateMapping: false cmd: "'functions-framework --source tests/conformance/async_main.py --target write_http_declarative --asgi'" + startDelay: 5 - name: Run CloudEvents conformance tests declarative uses: GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6 @@ -78,6 +81,7 @@ jobs: useBuildpacks: false validateMapping: false cmd: "'functions-framework --source tests/conformance/async_main.py --target write_cloud_event_declarative --asgi'" + startDelay: 5 - name: Run HTTP concurrency tests declarative uses: GoogleCloudPlatform/functions-framework-conformance/action@72a4f36b10f1c6435ab1a86a9ea24bda464cc262 # v1.8.6 @@ -86,6 +90,7 @@ jobs: useBuildpacks: false validateConcurrency: true cmd: "'functions-framework --source tests/conformance/async_main.py --target write_http_declarative_concurrent --asgi'" + startDelay: 5 # Note: Event (legacy) and Typed tests are not supported in ASGI mode # Note: validateMapping is set to false for CloudEvent tests because ASGI mode