Skip to content

fix(test): stop the live smoke suite inheriting the loopback server list - #14583

Merged
erichare merged 1 commit into
release-1.12.0from
fix/live-smoke-webserver-isolation
Aug 15, 2026
Merged

fix(test): stop the live smoke suite inheriting the loopback server list#14583
erichare merged 1 commit into
release-1.12.0from
fix/live-smoke-webserver-isolation

Conversation

@erichare

@erichare erichare commented Aug 15, 2026

Copy link
Copy Markdown
Member

The Live provider smoke tests job failed on its first ever run (nightly 31863695147) before executing a single test:

Error: http://localhost:3000 is already used, make sure that nothing is running
on the port/url or set reuseExistingServer:true in config.webServer.

Cause

playwright.live.config.ts builds itself with defineConfig(baseConfig, {...}), expecting its webServer list to replace the base one. Multi-argument defineConfig concatenates array options instead. The live run therefore starts five servers:

# from server port
1 base openai-compatible loopback fixture 8787
2 base backend, OPENAI_BASE_URL=127.0.0.1:8787/v1 7860
3 base npm start, proxy → 7860 3000
4 live backend (real providers) 7861
5 live npm start, proxy → 7861 3000 — clashes with #3

reuseExistingServer: false turns the duplicate port into a hard failure. The job log matches exactly: two complete alembic migration runs inside one playwright test invocation, then the port error.

Why this matters more than a red X

The clash was masking the real defect. Without it, the tests would have driven the base frontend on 3000 — whose proxy targets the 7860 backend wired to the loopback fixture — and every "live provider" assertion would have passed without ever reaching a real provider. That is precisely the leak the config's own comment claims to prevent:

The live smoke deliberately owns a separate server list so neither that fixture nor its OPENAI_BASE_URL can leak into the real-provider check.

The crash was preventing a false green.

Fix

Spread baseConfig instead of passing it as defineConfig's first argument, so webServer is overridden rather than appended to. A comment records why, since reverting to the two-argument form silently reintroduces the bug.

Verification

Bundled the real config with esbuild and inspected the resolved webServer list:

BEFORE - webServer entries: 5
node tests/fixtures/openai-compati  ->  port undefined
uv run uvicorn --factory langflow.  ->  port 7860
npm start                           ->  port 3000
uv run uvicorn --factory langflow.  ->  port 7861
npm start                           ->  port 3000

AFTER  - webServer entries: 2
uv run uvicorn --factory langflow.  ->  port 7861
npm start                           ->  port 3000

testDir: ./tests/live and testIgnore: [] are unchanged by the switch, as are projects and use.

Notes

playwright.live.config.ts arrived in d65b98f (#14540); no earlier nightly ran a smoke job at all, so this is the config's first execution. The job is continue-on-error: true, so it is not blocking the nightly.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved live testing configuration to prevent conflicting server definitions.
    • Ensured the correct server port and provider routing are used during live test runs.
    • Added documentation explaining the configuration behavior.

playwright.live.config.ts built itself with defineConfig(baseConfig, {...}),
expecting its webServer list to replace the base one. Multi-argument
defineConfig concatenates array options instead, so the live run started five
servers rather than two: the loopback OpenAI fixture, the base backend on 7860
pointed at that fixture, the base frontend on 3000, then the live backend on
7861 and a second frontend on 3000. The duplicate port 3000 with
reuseExistingServer:false failed the job before a single test ran.

The port clash was masking the real defect. Without it the suite would have
driven the base frontend, whose proxy targets the 7860 backend running against
the loopback fixture, so every "live provider" assertion would have passed
without reaching a real provider -- exactly the leak the config's comment says
it prevents.

Spreading baseConfig overrides webServer instead of appending to it. Verified
by bundling the real config: 5 webServer entries before (two on port 3000),
2 after (7861 backend, 3000 frontend), with testDir and testIgnore unchanged.
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f5a0ea4-e7f6-499f-8880-3a78f2296a36

📥 Commits

Reviewing files that changed from the base of the PR and between db1e058 and 9eaeed2.

📒 Files selected for processing (1)
  • src/frontend/playwright.live.config.ts

Walkthrough

The Playwright live configuration now spreads baseConfig into defineConfig. The change prevents separate configuration arguments from being concatenated and documents the resulting server selection and provider routing.

Changes

Playwright live configuration

Layer / File(s) Summary
Merge base and live settings
src/frontend/playwright.live.config.ts
The configuration spreads baseConfig into the live override object. A comment documents the server-port and provider-routing behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 9eaee

This change makes the live smoke suite start only its real-provider backend and frontend instead of inheriting loopback fixtures and a duplicate port-3000 server. No actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 8 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Quality And Coverage ⚠️ Warning The PR changes live server routing but adds no regression test; the only existing Playwright test is a smoke test that checks only visible, non-empty output and cannot prove real-provider routing. Add a Playwright/config regression test that asserts the resolved live webServer list has only ports 7861 and 3000, uses the live proxy target, and excludes loopback fixture settings.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing the live smoke suite from inheriting the loopback server list.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Test Coverage For New Implementations ✅ Passed placeholder
Test File Naming And Structure ✅ Passed PASS: The PR changes only Playwright configuration; no test file was added or modified. The existing live test uses Playwright fixtures and a descriptive test name.
Excessive Mock Usage Warning ✅ Passed The commit changes only Playwright configuration, adds no mock-based tests, and removes the inherited loopback fixture from the live smoke suite.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/live-smoke-webserver-isolation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@erichare
erichare merged commit 89ed738 into release-1.12.0 Aug 15, 2026
25 of 28 checks passed
@erichare
erichare deleted the fix/live-smoke-webserver-isolation branch August 15, 2026 04:25
@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

@github-actions

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 53%
53.1% (78256/147367) 70.92% (11081/15623) 48.74% (1830/3754)

Unit Test Results

Tests Skipped Failures Errors Time
6138 0 💤 0 ❌ 0 🔥 20m 44s ⏱️

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.08%. Comparing base (b11166e) to head (9eaeed2).
⚠️ Report is 5 commits behind head on release-1.12.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-1.12.0   #14583      +/-   ##
==================================================
- Coverage           64.82%   59.08%   -5.75%     
==================================================
  Files                2454     2417      -37     
  Lines              250987   241646    -9341     
  Branches            34977    19885   -15092     
==================================================
- Hits               162709   142782   -19927     
- Misses              86214    96800   +10586     
  Partials             2064     2064              
Flag Coverage Δ
frontend 53.10% <ø> (-9.70%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 940 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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