deploy fails to redeploy due to global config
还没有人认领这个 Issue。
评估
调研方向
首先跟踪 deploy 命令如何在项目的 rsconnect-python 目录和全局位置 /Users/{ME}/Library/Application Support/rsconnect-python 中读取和写入状态。使用示例应用程序 ID 重现删除并重新部署的操作序列,然后确定项目移动后状态应如何处理。当重新部署能够创建新应用程序且不依赖全局状态时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Replaces https://github.com/posit-dev/connect/issues/30437
System details
OS Version : OSX Sonoma
Problem Statement
Creating it as a "bug" because it could be perceived as one from the users.
Steps to Reproduce
- Deploy an application (I'm using a streamlit dashboard, but shouldn't matter)
- The application is deployed with an ID, for example:
87a2d580-58fd-4e85-9027-c7946958806c
- The application is deployed with an ID, for example:
- Delete the application
Removed application 87a2d580-58fd-4e85-9027-c7946958806c ("main")
- Deploy the same application again
- The deploy fails with an error:
Posit Connect reported an error (calling /__api__/applications/87a2d580-58fd-4e85-9027-c7946958806c): The requested object does not exist.
- The deploy fails with an error:
Actual Behavior
The deploy fails because it tries to reuse an application that was deleted.
This happens even when the user deletes the rsconnect-python directory from the application itself.
That is caused by rsconnect-python saving a global state in /Users/{ME}/Library/Application Support/rsconnect-python where the application ID is stored.
There are 3 problems that I see:
- The user is unable to deploy the application again after deleting it
rsconnect-pythonbehaviour is different based on the computer where it gets run as the global state is different- Moving the project directory around causes a mismatch between the global state and the project state (because the global state stores the PATH) even though the project is the same and its state didn't change.
Expected Behavior
- Doing the deploy again succeeds and creates a new application
- There is no global state.
- I think it's perfectly reasonable to store the state in the application itself (as it already does within the
$PROJECT_DIR/rsconnect-pythonsubdirectory) so that it can be committed.
- I think it's perfectly reasonable to store the state in the application itself (as it already does within the
- 主要语言
- Python
- 星标
- 38
- 派生
- 28
- 平均合并
- 10 小时 32 分钟
- 30 天内合并 PR
- 7
环境准备
- 没有 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 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
posit-dev/rsconnect-python#543 · 2 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 72/100
posit-dev/rsconnect-python#513 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
posit-dev/rsconnect-python#178 ·
-
bug
难度 4/5 3-5 天 新手友好度 50/100
posit-dev/rsconnect-python#857 ·
查看 posit-dev/rsconnect-python 的全部 Issue
相似的 Issue
-
New Internship未关闭new_internship
难度 1/5 1 小时以内 新手友好度 70/100
-
[BUG] Reports tab: "Unban" button tooltip shows raw `{{ip}}` placeholder instead of the IP address未关闭bug javascript ui
难度 2/5 1-3 小时 新手友好度 68/100
bunkerity/bunkerweb#4001 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 92/100
PedestrianDynamics/pyFDS-Evac#476 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
google/differential-privacy#516 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
adobe-fonts/source-serif#153 ·