cloud pull --encrypt leaves the project without its key path and encrypts referenced libraries
維護者通常 6 天內回覆
評估
研究方向
Start with PullManager._pull_project and pull_projects, then compare the encryption-key handling with encrypt.py and decrypt.py; the issue also points to push_manager.py for how associated libraries are handled. Check the relevant tests for pull encryption behavior. Done means encrypt and decrypt keep the project config consistent, and pulled libraries are not encrypted; a linked pull request is already open.
由索引模型根據 Issue 內容生成。
描述
Expected Behavior
lean cloud pull --encrypt --key <key> leaves the local project in the same state as lean encrypt --key <key>: files encrypted, encrypted: true and encryption-key-path in the project config, so a later lean cloud push keeps the cloud project encrypted. --decrypt removes encryption-key-path, like lean decrypt. Referenced libraries are pulled as they are in the cloud, the same way lean cloud push --encrypt already leaves them unencrypted.
Actual Behavior
PullManager._pull_projectsetsencryptedbut never sets or removesencryption-key-path.PushManager._push_projectonly re-encrypts when that path is present, so a plain push afterpull --encryptuploads the encrypted file contents as source code withencryption_key='':
$ lean cloud pull --project "Python Project" --encrypt --key key.txt # cloud project was not encrypted
$ lean cloud push --project "Python Project"
# projects/update is called with main.py = 'iFdKTV...==' (ciphertext) and encryption_key = ''
The cloud project ends up unencrypted, with ciphertext as its code. After pull --decrypt, the stale encryption-key-path stays in the config.
PullManager.pull_projectspasses the encryption action and key to every pulled project, including the libraries it adds.pull --project P --encrypttherefore encrypts the shared libraryLibrary/Lon disk and marks itencrypted: true. The push side deliberately skips associated libraries (push_manager.py, "we don't encrypt those"), so the two commands disagree.
Potential Solution
In _pull_project, set encryption-key-path on encrypt and delete it on decrypt, as encrypt.py/decrypt.py do. In pull_projects, apply the encryption action only to the projects that were asked for, not to the libraries added afterwards. I have a PR ready with the fix and tests (fail on master, pass with the fix).
Reproducing the Problem
Run the two commands above on an unencrypted cloud project with a registered key. For the library case, use a project that references a library and check Library/<name>/main.py after the pull.
System Information
lean-cli master at 1873571, Linux.
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- 主要語言
- Python
- 星號
- 329
- 分支
- 169
- 平均合併
- 4 天 18 小時
- 30 天內合併 PR
- 9
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
QuantConnect/lean-cli 的其他 Issue
-
cloud live deploy: no Interactive Brokers (FIX) brokerage, --ib-fix-account / --ib-fix-user-name do not exist可能已有人在做 @quantconnect-kronos 今天認領。 未關閉
難度 4/5 3-5 天 新手友好度 25/100
QuantConnect/lean-cli#692 · 1 則留言 ·
維護者通常 6 天內回覆
-
lean live deploy skips the localhost host rewrite and symbol map mount for brokerage settings可能已有人在做 @pcbeingused333 於 2 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 68/100
QuantConnect/lean-cli#690 ·
維護者通常 6 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
QuantConnect/lean-cli#681 ·
維護者通常 6 天內回覆
-
lean cloud push overwrites read-only shared library files可能已有人在做 @Amadeus-22 於 2 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 55/100
QuantConnect/lean-cli#661 · 2 則留言 ·
維護者通常 6 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
QuantConnect/lean-cli#619 ·
維護者通常 6 天內回覆
查看 QuantConnect/lean-cli 的全部 Issue
相似的 Issue
-
URLValidator ignores an explicit empty scheme allowlist可能已有人在做 @IlyaKhalafi 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
tortoise/tortoise-orm#2393 ·
維護者通常 2 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 62/100
frappe/frappe_docker#2046 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
-
complete_box_iou_loss / complete_box_iou: NaN gradients for zero-height boxes, NaN for point boxes未關閉
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
AXI SMU SPEC
難度 2/5 1-3 小時 新手友好度 62/100
tenstorrent/tt-oca-harness#3556 ·
維護者通常 1 天內回覆