Environment values containing '=' are truncated in --extra-docker-config
評估
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- Python
- 星號
- 329
- 分支
- 170
- 平均合併
- 8 天 14 小時
- 30 天內合併 PR
- 7
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
QuantConnect/lean-cli 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 48/100
QuantConnect/lean-cli#681 ·
-
難度 4/5 3-5 天 新手友好度 55/100
QuantConnect/lean-cli#661 · 1 則留言 ·
-
難度 5/5 一週以上 新手友好度 25/100
QuantConnect/lean-cli#619 ·
-
Implements Autocomplete可能重新可做 @shreejaykurhade 於 209 天前認領,目前沒有進行中的 PR。 未關閉feature
QuantConnect/lean-cli#602 · 6 則留言 · 3 個 reaction · 已指派 1 人 ·
-
難度 4/5 3-5 天 新手友好度 35/100
QuantConnect/lean-cli#579 ·
查看 QuantConnect/lean-cli 的全部 Issue
相似的 Issue
-
難度 1/5 1-3 小時 新手友好度 88/100
fossasia/visdom-dev#69 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
BUG: PROD: v1.3.0-beta Onboarding Profile Picture Misaligns When Name Validation Error Appears可能已有人在做 @RitikaSen27 今天認領。 未關閉bug good first issue
難度 2/5 1-3 小時 新手友好度 82/100
AOSSIE-Org/PictoPy#1647 · 2 則留言 ·
維護者通常 2 天內回覆
-
[oblt-aw][autodoc] Update workflow docs for gh-aw v0.92.5 and detector permission scope可能已有人在做 @github-actions 今天認領。 未關閉
難度 1/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆