Skip to content

fix(e2e): audio/images propagation predicates tolerate transport failures#589

Merged
jarvis9443 merged 1 commit into
mainfrom
fix/audio-e2e-propagation-guard
Jun 11, 2026
Merged

fix(e2e): audio/images propagation predicates tolerate transport failures#589
jarvis9443 merged 1 commit into
mainfrom
fix/audio-e2e-propagation-guard

Conversation

@jarvis9443

@jarvis9443 jarvis9443 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

CI flake root-cause (seen on #587's e2e job): audio-images-usage-e2e polls waitConfigPropagation with a bare fetch — when the DP drops the connection mid-multipart-write while the route is still propagating, the predicate throws TypeError: fetch failed (EPIPE) instead of returning false, failing the spec. Both call sites now wrap the probe in try/catch → false, the same contract every other spec's predicate follows. Test-only change.

Summary by CodeRabbit

  • Tests
    • Enhanced audio and image generation endpoint tests to more robustly handle connection failures during propagation verification, improving test reliability without affecting user-facing functionality.

Part of api7/AISIX-Cloud#519 (surfaced while landing finding B.8's PR).

Closes api7/AISIX-Cloud#519

…ures

waitConfigPropagation polled with a bare fetch: a connection the DP
drops mid-write while the route is still propagating (EPIPE) threw out
of the predicate and failed the spec. Wrap in try/catch -> false, the
same contract every other spec's predicate uses.
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 71ad7ae8-290c-4f47-b7e8-7f662679c901

📥 Commits

Reviewing files that changed from the base of the PR and between 20cd4a4 and d558b10.

📒 Files selected for processing (1)
  • tests/e2e/src/cases/audio-images-usage-e2e.test.ts

📝 Walkthrough

Walkthrough

Updates E2E test propagation readiness checks for both /v1/images/generations and /v1/audio/transcriptions endpoints. The tests now wrap fetch requests in try/catch blocks during waitConfigPropagation to treat transport errors as "not ready yet" instead of propagation failure, then assert HTTP 200 and poll metrics for usage events after propagation completes.

Changes

Propagation readiness with transport error tolerance

Layer / File(s) Summary
Error-tolerant propagation gating for image and audio tests
tests/e2e/src/cases/audio-images-usage-e2e.test.ts
Images and audio usage-event readiness checks wrap fetch requests in try/catch to treat transport failures as transient "not ready" signals during propagation polling, advancing only when the request succeeds with .ok.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the audio/images propagation predicates in E2E tests to handle transport failures gracefully.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

@jarvis9443 jarvis9443 merged commit 6341e5a into main Jun 11, 2026
7 checks passed
@jarvis9443 jarvis9443 deleted the fix/audio-e2e-propagation-guard branch June 11, 2026 08:14
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.

1 participant