Skip to content

[E2E] Use routed CURLFile upload fixture - #3893

Merged
adamziel merged 1 commit into
trunkfrom
adamziel/fix-flaky-e2e
Jul 3, 2026
Merged

[E2E] Use routed CURLFile upload fixture#3893
adamziel merged 1 commit into
trunkfrom
adamziel/fix-flaky-e2e

Conversation

@adamziel

@adamziel adamziel commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

What?

Replaces the flaky CURLFile uploads via curl_exec() should work test dependency on https://httpbin.org/post with a Playwright-routed upload endpoint.

The routed endpoint keeps the test in-process and still verifies that curl_exec() succeeds with a CURLFile multipart upload request, without depending on a third-party echo service.

Why?

The failed CI log showed the request reached httpbin.org through the local CORS proxy, but httpbin.org returned 503 Service Temporarily Unavailable:

HTTP_CODE:503 FILE_RECEIVED:NO BODY:
503 Service Temporarily Unavailable

That makes the test fail when the external service is down or rate-limited, even though Playground's CURLFile upload path is working.

Testing Instructions

  • git diff --check
  • CI
@adamziel
adamziel requested review from a team, Copilot and mho22 and removed request for Copilot July 3, 2026 12:33
@adamziel
adamziel force-pushed the adamziel/fix-flaky-e2e branch from f2f6db8 to dec0546 Compare July 3, 2026 12:48
Copilot AI review requested due to automatic review settings July 3, 2026 12:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the CURLFile e2e test to remove reliance on httpbin.org by using a local upload-echo fixture served via the existing CORS proxy dev server, reducing CI flakiness.

Changes:

  • Added a local upload endpoint URL (based on CORS_PROXY_PORT) for the curl_exec() upload test.
  • Reduced the uploaded payload size and updated test documentation to reflect the new local-only behavior.
  • Introduced a PHP fixture that echoes uploaded file contents as JSON.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/playground/website/playwright/e2e/blueprints.spec.ts Switches the e2e upload test from httpbin to a local fixture endpoint and adjusts payload/docs.
packages/playground/php-cors-proxy/tests/fixtures/curlfile-upload-test.php Adds a local PHP echo endpoint that returns uploaded file contents for the e2e test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +20
foreach ($_FILES as $name => $file) {
$files[$name] = file_get_contents($file['tmp_name']);
}
$files[$name] = file_get_contents($file['tmp_name']);
}

echo json_encode(['files' => $files]);
Comment on lines +457 to +459
const uploadEndpoint = `http://127.0.0.1:${
process.env.CORS_PROXY_PORT ?? '5263'
}/tests/fixtures/curlfile-upload-test.php`;
@adamziel adamziel changed the title [E2E] Use local CURLFile upload fixture Jul 3, 2026
@adamziel
adamziel force-pushed the adamziel/fix-flaky-e2e branch 2 times, most recently from 6a7f54d to 1f4e2d2 Compare July 3, 2026 13:22
@adamziel adamziel changed the title [E2E] Stabilize flaky test: use local CURLFile upload fixture instead of a remote URL Jul 3, 2026
@adamziel
adamziel force-pushed the adamziel/fix-flaky-e2e branch 2 times, most recently from 512f8c8 to 1eb5c17 Compare July 3, 2026 13:40
@adamziel
adamziel force-pushed the adamziel/fix-flaky-e2e branch from 1eb5c17 to f0dd663 Compare July 3, 2026 13:58
@adamziel
adamziel merged commit cdfcd31 into trunk Jul 3, 2026
53 checks passed
@adamziel
adamziel deleted the adamziel/fix-flaky-e2e branch July 3, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment