lean cloud push exits 0 when a project can't be pushed
维护者通常 1 天内回复
评估
调研方向
从 lean/commands/cloud/push.py 开始,追踪 PushManager.push_projects 的返回值是如何处理的;issue 指出,该方法在 push 失败时已经会返回 False。检查 lean cloud push 的现有测试,然后验证在尝试所有请求的项目后,失败的项目或库 push 会产生非零退出码,同时保留警告消息。
由索引模型根据 Issue 内容生成。
描述
Problem
lean cloud push exits 0 when it could not push a project. It prints a warning such as:
[1/1] Pushing 'Example'
Cannot push 'Example': The project could not be saved as another collaborator
controls the write permission. Request write permission from your collaborator
#CbnquaQ7LCY6
Please pull any required changes and push with --force
and then returns success. Scripts and CI that chain commands on its exit status, such as lean cloud push --project Example && lean cloud backtest Example, then backtest the cloud's previous files and report that as a result for the local changes.
#718 made lean cloud backtest/optimize/live deploy --push stop with exit code 1 in this case. That PR intentionally kept lean cloud push itself unchanged, so this is still the behavior in 1.0.234.
Reproduction (1.0.234)
lean create-project Example --language pythonandlean cloud push --project Example.- Edit
main.pyin the cloud from another client, such as the web IDE or an MCP client. That client now holds the project's write lock. - Change the local
main.pyand runlean cloud push --project Example; echo $?.
Observed: the Cannot push warning above, then 0. The cloud file keeps the other client's version.
Expected
When any requested project or library can't be pushed, lean cloud push exits nonzero after it has tried all of them. It keeps the same warnings. PushManager.push_projects already returns False in this case (#718), and lean/commands/cloud/push.py ignores that return value.
This changes the exit status that scripts see for a failed push. That is the reason for the change, but it is still a behavior change for callers.
- 主要语言
- Python
- 星标
- 335
- 派生
- 172
- 平均合并
- 6 小时 54 分钟
- 30 天内合并 PR
- 37
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
QuantConnect/lean-cli 的其他 Issue
-
priority:P2
难度 2/5 1-3 小时 新手友好度 75/100
QuantConnect/lean-cli#792 ·
维护者通常 1 天内回复
-
priority:P2
难度 2/5 1-3 小时 新手友好度 74/100
QuantConnect/lean-cli#786 ·
维护者通常 1 天内回复
-
priority:P2
难度 2/5 1-3 小时 新手友好度 72/100
QuantConnect/lean-cli#785 ·
维护者通常 1 天内回复
-
A partially written live command result aborts polling with JSONDecodeError可能已有人在做 @pcbeingused333 于 3 天前认领。 未关闭priority:P2
难度 2/5 1-3 小时 新手友好度 72/100
QuantConnect/lean-cli#784 ·
维护者通常 1 天内回复
-
Container lookup failures during result polling are masked by UnboundLocalError可能已有人在做 @pcbeingused333 于 5 天前认领。 未关闭priority:P2
难度 2/5 1-3 小时 新手友好度 80/100
QuantConnect/lean-cli#783 ·
维护者通常 1 天内回复
查看 QuantConnect/lean-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
pimutils/vdirsyncer#1242 ·
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
open-webui/open-webui#35360 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
-
Suggest link: Destiny Verify (MIT zero-dependency pre-commit security, citation & link hygiene CLI)未关闭
难度 1/5 1 小时以内 新手友好度 68/100
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复