Environment values containing '=' are truncated in --extra-docker-config
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 1/100
Direzione di ricerca
Start in lean/components/docker/lean_runner.py at LeanRunner.parse_extra_docker_config around line 972, then inspect its callers to understand how environment entries are passed through. Reproduce the truncation with the Python snippet in the issue; done means values containing = reach the container unchanged across the listed commands, with a regression test covering the examples. A linked open pull request (#680) is already addressing this issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Expected Behavior
environment entries passed as KEY=VALUE strings in --extra-docker-config are split on the first = only, like Docker does, so values that contain = reach the container unchanged:
lean backtest MyProject --extra-docker-config '{"environment": ["JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8", "TOKEN=abc=="]}'
# container env: JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8, TOKEN=abc==
Actual Behavior
LeanRunner.parse_extra_docker_config splits on every = and keeps only the first two parts, so everything after the second = is silently dropped:
{"JAVA_TOOL_OPTIONS": "-Dfile.encoding", "TOKEN": "abc"}
This breaks JVM -D options, base64 tokens and connection strings passed this way. It affects backtest, live, research, optimize and private-cloud start.
Potential Solution
Use item.split("=", 1) in lean/components/docker/lean_runner.py (line 972). I can open a PR with the fix and a test.
Reproducing the Problem
from lean.components.docker.lean_runner import LeanRunner
run_options = {}
LeanRunner.parse_extra_docker_config(run_options, {"environment": ["JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8", "TOKEN=abc=="]})
print(run_options["environment"])
System Information
lean-cli master at b4d724c, Python 3.12, 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
- Lingua principale
- Python
- Stelle
- 327
- Fork
- 170
- Merge medio
- 8g 14h
- PR unite (30g)
- 7
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di QuantConnect/lean-cli
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
QuantConnect/lean-cli#681 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
QuantConnect/lean-cli#661 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
QuantConnect/lean-cli#619 ·
-
Implements AutocompleteForse di nuovo libera @shreejaykurhade l’ha presa 208 giorni fa e non c’è nessuna pull request aperta. Apertafeature
QuantConnect/lean-cli#602 · 6 commenti · 3 reazioni · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
QuantConnect/lean-cli#579 ·
Tutte le issue di QuantConnect/lean-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
[Bug]: Queen's own Ollama model loses num_ctx when a running session switches to itForse già presa @anasamin26 l’ha presa oggi. Apertabug enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aden-hive/hive#7508 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
llm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BerriAI/litellm#47884 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug 🐛
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
netalertx/NetAlertX#1856 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno