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 天內回覆