Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#679 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@Amadeus-22 がすでに取り組んでいます。

2026年10月19日 から。

  • #680 @Amadeus-22 による — オープン

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
1/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
cli

調査の方向性

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 master branch
  • I have confirmed that this is not a duplicate issue by searching issues
主要言語
Python
スター
327
フォーク
170
平均マージ
8日 14時間
マージ済み PR(30日)
7

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantConnect/lean-cli のほかの issue

QuantConnect/lean-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。