--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": ...},並查看指定了 node 的 ManifestDataEnvironment.environment_management 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
-
Task select patterns with uppercase letters never match可能已有人在做 @manobhisriram 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
app: scripts status: backlog type: housekeeping
難度 1/5 1-3 小時 新手友好度 88/100
netbox-community/netbox-scripts#239 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
developmentseed/titiler-cmr#341 ·
維護者通常 1 天內回覆
-
Card tables add "..." to every value in a DataFrame column when any value is longer than 30 characters可能已有人在做 @omkarbandikatte 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆