--disable-env-management-node is ignored by Connect: manifest uses "node" instead of "nodejs"
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 rsconnect/bundle.py 中的 make_nodejs_manifest 开始,其中 environment_management 被写成 {"node": ...},并查看 ManifestDataEnvironment.environment_management 这个指定了 node 的 Literal 类型。将键名(以及顶层运行时段)改为 nodejs,然后在 tests/ 的 bundle 测试套件中现有 Node.js 清单测试旁添加一个针对生成清单键的断言,并运行该文件。完成标准是:清单写入 environment.environment_management.nodejs,且新测试在修改前失败、修改后通过。
由索引模型根据 Issue 内容生成。
描述
rsconnect deploy nodejs --disable-env-management-node (and env_management_node=False in the API) has no effect: Posit Connect still installs npm packages.
Cause
make_nodejs_manifest writes the setting under the key node:
"environment": {
"environment_management": {"node": false}
}
Posit Connect reads environment.environment_management.nodejs, the same key the rsconnect R package writes (envManagementNodejs). Connect ignores the node key, so the bundle falls back to the server's NodeJs.EnvironmentManagement setting.
The relevant code is in rsconnect/bundle.py:
ManifestDataEnvironment.environment_managementis typeddict[Literal["python", "r", "node"], bool].make_nodejs_manifestsetsmanifest_environment["environment_management"] = {"node": env_management_node}.
Suggested fix
Write nodejs instead of node in environment.environment_management, and update the Literal type to match. Add a test that asserts the key.
For consistency, the top-level runtime section is also written as "node". rsconnect (R) writes it as "nodejs", which matches metadata.appmode. Connect doesn't currently read any fields from that section, so it has no visible effect today. It's still worth renaming at the same time.
Steps to reproduce
- On a Connect server with Node.js enabled and
NodeJs.EnvironmentManagementleft at its default (true), runrsconnect deploy nodejs --disable-env-management-node <dir>. - Read the deployment log. Connect runs
npm install, and the generatedmanifest.jsoncontains"environment_management": {"node": false}.
- 主要语言
- Python
- 星标
- 38
- 派生
- 28
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 59
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
posit-dev/rsconnect-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
posit-dev/rsconnect-python#786 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
posit-dev/rsconnect-python#543 · 2 条评论 ·
维护者通常 1 天内回复
-
Write no installer preference for uv.lock bundles可能已有人在做 @tdstein 于 2 天前认领。 未关闭enhancement ready-for-agent
posit-dev/rsconnect-python#996 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Evaluate Python dependency source precedence可能已有人在做 @tdstein 于 13 天前认领。 未关闭enhancement ready-for-agent
难度 4/5 1-2 天 新手友好度 52/100
posit-dev/rsconnect-python#975 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 50/100
posit-dev/rsconnect-python#857 · 1 条评论 ·
维护者通常 1 天内回复
查看 posit-dev/rsconnect-python 的全部 Issue
相似的 Issue
-
app: scripts status: backlog type: housekeeping
难度 1/5 1-3 小时 新手友好度 88/100
netbox-community/netbox-scripts#239 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
LmeSzinc/AzurLaneAutoScript#6194 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
micronaut-projects/micronaut-core#14585 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
langgenius/graphon#443 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复