cloud pull --encrypt leaves the project without its key path and encrypts referenced libraries
Mantenedores costumam responder em até 3 dias
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 25/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Python
- Estrelas
- 329
- Forks
- 169
- Merge médio
- 4d 2h
- PRs com merge (30d)
- 11
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de QuantConnect/lean-cli
-
cloud live deploy: no Interactive Brokers (FIX) brokerage, --ib-fix-account / --ib-fix-user-name do not existTalvez já em andamento @quantconnect-kronos assumiu há 1 dia. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
QuantConnect/lean-cli#692 · 1 comentário ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
QuantConnect/lean-cli#681 ·
Mantenedores costumam responder em até 3 dias
-
lean cloud push overwrites read-only shared library filesTalvez já em andamento @Amadeus-22 assumiu há 3 dias. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
QuantConnect/lean-cli#661 · 2 comentários ·
Mantenedores costumam responder em até 3 dias
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
QuantConnect/lean-cli#619 ·
Mantenedores costumam responder em até 3 dias
-
Implements AutocompleteTalvez livre de novo @shreejaykurhade assumiu há 220 dias e não há nenhum pull request aberto. Abertafeature
QuantConnect/lean-cli#602 · 6 comentários · 3 reações · 1 responsável ·
Mantenedores costumam responder em até 3 dias
Todas as issues de QuantConnect/lean-cli
Issues semelhantes
-
Import errors are swallowed: PerthImplicitWatermarker silently becomes NoneTalvez já em andamento @JonRC assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
resemble-ai/Perth#23 ·
-
correction metadata
Dificuldade 2/5 Menos de uma hora Facilidade para iniciantes 65/100
acl-org/acl-anthology#10753 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
earthtojake/text-to-cad#758 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 70/100
DataTalksClub/faq#545 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia