The Hosted UI sign-in journey binds a fixed port and fails when it is already in use

未关闭 适合新手
#1,888 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
85/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
playwright, typescript
领域
testing

调研方向

从 frontend/tests/e2e/hosted-ui-sign-in.journey.spec.ts 开始,重点查看 beforeAll 中的模拟 API 设置,以及第 260 行附近的 listen 调用。检查服务器如何公开分配给它的地址,以及 journey 如何将该地址传递给前端。当 journey 能够使用可用端口可靠启动,且七项测试全部通过时,即为完成。

由索引模型根据 Issue 内容生成。

描述

bug

The Hosted UI sign-in journey (frontend/tests/e2e/hosted-ui-sign-in.journey.spec.ts) starts its stub API on a fixed address, 127.0.0.1:55550 (HOSTED_UI_E2E_API_PORT ?? 55550, lines 43-44; the listen call in beforeAll, around line 260). On a runner where that port is already taken, the journey cannot start.

Measured

  • PR QA Gate run 42868240753, job 130022854757 ("Browser E2E"), step 14 "Run the browser journeys": Error: listen EADDRINUSE: address already in use 127.0.0.1:55550, on the first attempt and again on Playwright's one retry, which runs the spec again from the start, so nothing in this spec still held the port.
  • All 7 journeys in the spec got no result: 1 failed, 6 did not run; the other 76 journeys passed.
  • No other spec or workflow names port 55549 or 55550.
  • The same spec passed on another runner about 21 seconds earlier (job 130026182487), and on every other Browser E2E run today.

Inferred, not measured

55550 lies inside Linux's default ephemeral port range (32768-60999), so a socket the job had already opened could have been using it as its local port.

Expected

The journey takes a free port (for example, listen on port 0 and read the assigned port back), or chooses one outside the ephemeral range, so it cannot collide with another socket on the runner.

Impact

Test-only: no shipped code is affected. The failure looks like a product failure in the required Browser E2E check, so it should be fixed to keep that check trustworthy.

🤖 Generated with Claude Code

https://claude.ai/code/session_019CNVFcEPovQW1L3b1vWqGH

主要语言
Python
星标
0
派生
4
平均合并
7 小时 30 分钟
30 天内合并 PR
468

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Controlvar/controlvar 的其他 Issue

查看 Controlvar/controlvar 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。