Environment values containing '=' are truncated in --extra-docker-config
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 1/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 327
- Fork
- 170
- Merge trung bình
- 8 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của QuantConnect/lean-cli
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
QuantConnect/lean-cli#681 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
QuantConnect/lean-cli#661 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
QuantConnect/lean-cli#619 ·
-
Implements AutocompleteCó thể làm lại được @shreejaykurhade đã nhận 207 ngày trước và không có pull request nào đang mở. Đang mởfeature
QuantConnect/lean-cli#602 · 6 bình luận · 3 reaction · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
QuantConnect/lean-cli#579 ·
Tất cả issue của QuantConnect/lean-cli
Issue tương tự
-
Uninstall guide omits the CloudWatch log groups AWS CodeBuild creates for useCodeBuild pipelinesĐang mởbug documentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
awslabs/visual-asset-management-system#552 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
netbox status: needs triage type: documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
netbox-community/netbox#23460 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
awslabs/threat-composer#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ansys/pyansys-common-mcp#213 ·
Maintainer thường phản hồi trong vòng 3 ngày