Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Environment values containing '=' are truncated in --extra-docker-config

Đang mở
#679 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@Amadeus-22 đang làm issue này rồi.

Từ ngày 19/10/2026.

  • #680 của @Amadeus-22 — đang mở

Đá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
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cli

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 master branch
  • 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của QuantConnect/lean-cli

Tất cả issue của QuantConnect/lean-cli

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.