reflex run --frontend-only / --backend-only fails when rxconfig sets the ports
维护者通常 2 天内回复
评估
调研方向
issue 指向 reflex/reflex.py 中的 run() 和 _run();阅读配置端口的应用方式,以及单侧模式如何验证端口。检查 reflex run --frontend-only 和 --backend-only 的现有测试,然后补充对已配置端口和显式端口标志的测试。完成条件是:已配置的端口不再阻止单侧运行,而针对未运行一侧的显式标志仍会报错。
由索引模型根据 Issue 内容生成。
描述
Problem
reflex run --frontend-only and reflex run --backend-only exit at once when rxconfig.py sets frontend_port or backend_port.
Repro
# rxconfig.py
import reflex as rx
config = rx.Config(app_name="app", frontend_port=3653, backend_port=8653)
$ reflex run --env prod --frontend-only
Cannot specify --backend-port when not running backend.
$ reflex run --env prod --backend-only
Cannot specify --frontend-port when not running frontend.
The same happens in dev. No port flag is given on the command line.
Cause
run() in reflex/reflex.py fills both ports from the config before it calls _run():
frontend_port = frontend_port or config.frontend_port
backend_port = backend_port or config.backend_port
_run() then rejects a port for the side that does not run. It cannot tell a port from the config from a --frontend-port / --backend-port flag.
Expected
A port from the config does not block a single-side run. Only an explicit flag for the side that does not run is an error. Moving the config fallback below the running-mode check would do this.
Workaround
Remove the ports from rxconfig.py and pass --frontend-port or --backend-port to each run.
- 主要语言
- Python
- 星标
- 29k
- 派生
- 1.8k
- 平均合并
- 3 天 5 小时
- 30 天内合并 PR
- 187
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
reflex-dev/reflex 的其他 Issue
-
Add a `SetVar` backed by the JS `Set` object可能已有人在做 @FarhanAliRaza 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
reflex-dev/reflex#7623 · 2 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
reflex-dev/reflex#7260 · 2 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
reflex-dev/reflex#7148 · 1 条评论 ·
维护者通常 2 天内回复
-
ClientStateVar: a component that mounts while the value is non-default never re-renders on the push back to the default可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
reflex-dev/reflex#6823 · 1 条评论 ·
维护者通常 2 天内回复
-
support redis v8未关闭feature request
难度 1/5 1 小时以内 新手友好度 88/100
reflex-dev/reflex#6764 · 3 条评论 · 1 个 reaction ·
维护者通常 2 天内回复
查看 reflex-dev/reflex 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
aws-samples/sample-per-model-bedrock#639 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 86/100
awslabs/visual-asset-management-system#937 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
project-codeflare/codeflare-sdk#1195 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
pandas-dev/pandas-stubs#2051 ·
维护者通常 1 天内回复