Skip to content

De-flake HTTP E2E: replace rate-limited GitHub API call with httpbingo.org#284

Merged
pinodeca merged 1 commit into
mainfrom
tjgreen42/deflake-http-e2e
Jul 2, 2026
Merged

De-flake HTTP E2E: replace rate-limited GitHub API call with httpbingo.org#284
pinodeca merged 1 commit into
mainfrom
tjgreen42/deflake-http-e2e

Conversation

@tjgreen42

Copy link
Copy Markdown
Contributor

Problem

tests/e2e/sql/06_http_and_ssrf.sql's "JSON API with vars and loop" case fetched https://api.github.com/repos/microsoft/duroxide/commits. GitHub's API rate limit makes that request fail intermittently in CI (TEST FAILED: GitHub API fetch status = failed), flaking the whole E2E job.

Change

Point the case at https://httpbingo.org/get — the same non-rate-limited HTTP test endpoint the rest of this file already uses — so it is deterministic. Both hosts are already in the http-allow-test-domains allowlist, so no code change is needed.

Test

./scripts/test-e2e-local.sh 06_http_and_ssrf passes.

…o.org

The 06_http_and_ssrf E2E test's "JSON API with vars and loop" case fetched
https://api.github.com/repos/microsoft/duroxide/commits, whose rate limit
makes the request fail intermittently in CI ("GitHub API fetch status =
failed"), flaking the whole E2E job. Point it at https://httpbingo.org/get
instead — the same non-rate-limited endpoint the rest of this file already
uses — so the case is deterministic. Both hosts are already in the
http-allow-test-domains allowlist, so no code change is needed.
@tjgreen42 tjgreen42 marked this pull request as ready for review July 1, 2026 22:04
@tjgreen42 tjgreen42 requested a review from pinodeca July 1, 2026 22:04

@pinodeca pinodeca 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.

From Opus 4.8:

Minor nit (non-blocking)

httpbingo.org runs go-httpbin, which returns args and headers as arrays of strings (multi-valued), unlike the original httpbin.org which returns scalars. So:

body->'args'->>'source'          -- stores  ["pg_durable"]      (not  pg_durable)
body->'headers'->>'User-Agent'   -- stores  ["pg_durable-test"] (not  pg_durable-test)

The test still passes because it only asserts result_count > 0, and url (the ON CONFLICT key) is a scalar. But the source / user_agent columns—and the final display SELECT—will contain JSON-array-serialized text rather than clean scalars. If you want the displayed values to look right, index the first element:

body->'args'->'source'->>0,
body->'headers'->'User-Agent'->>0

@pinodeca pinodeca merged commit 64d832b into main Jul 2, 2026
5 checks passed
@pinodeca pinodeca deleted the tjgreen42/deflake-http-e2e branch July 2, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants