Pull-induced rename leaves an in-project encryption key path pointing at the old directory
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
從lean/components/cloud/pull_manager.py開始,特別查看_pull_project及其對ProjectManager.rename_project_and_contents的呼叫;閱讀與 #742 相關的修正,並檢查ProjectManager.get_path_after_project_rename。查看 pull manager 中關於重新命名行為的測試,並新增涵蓋專案內一個鍵路徑及專案外一個鍵路徑的測試。完成條件是:內部鍵路徑指向重新命名後的目錄,而外部鍵路徑維持不變。
由索引模型根據 Issue 內容生成。
描述
Problem
When lean cloud pull finds a project on disk under a name the cloud project no longer has, it renames the local directory with ProjectManager.rename_project_and_contents (lean/components/cloud/pull_manager.py, _pull_project). A key file stored inside the project directory moves with it, but the project's encryption-key-path keeps the old location. The next lean cloud push of the project then fails to open the key.
This is the pull side of #742, which fixes the same case for push.
Reproduction
- Create a project
Project A, copy a registered encryption key into it asProject A/key.txt, runlean encrypt "Project A" --key "<abs path>/Project A/key.txt"andlean cloud push --project "Project A". - Rename the cloud project to
Project B(in the web IDE, orprojects/update). lean cloud pull --project "Project B": the local directory becomesProject B, withkey.txtinside, butProject B/config.jsonstill has"encryption-key-path": "<abs path>/Project A/key.txt".lean cloud push --project "Project B"printsCannot push 'Project B': [Errno 2] No such file or directory: '<abs path>/Project A/key.txt'.
Expected result
After the rename, a configured key inside the project directory is found at its new location, so the next push works. Keys outside the project directory keep their path. The fix for #742 adds ProjectManager.get_path_after_project_rename, which pull could reuse (suggestion).
- 主要語言
- 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 天內回覆