Skip to content

bug: keep '=' in extra docker config environment values - #680

Open
Amadeus-22 wants to merge 1 commit into
QuantConnect:masterfrom
Amadeus-22:bug-679-extra-docker-env-equals
Open

Amadeus-22 wants to merge 1 commit into
QuantConnect:masterfrom
Amadeus-22:bug-679-extra-docker-env-equals

Conversation

@Amadeus-22

Copy link
Copy Markdown
Contributor

Closes #679.

  • --extra-docker-config '{"environment": ["JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8", "TOKEN=abc=="]}' passed {"JAVA_TOOL_OPTIONS": "-Dfile.encoding", "TOKEN": "abc"} to the container: LeanRunner.parse_extra_docker_config split KEY=VALUE strings on every = and kept the first two parts.
  • They are now split on the first = only, as Docker does. Entries given as [key, value] pairs and the dict form are unchanged.
  • Added a test with a JVM -D option and a base64-padded value. It fails on master and passes with the fix.
  • pytest tests/components/docker tests/commands/test_backtest.py tests/commands/test_research.py passes (119 passed, 6 skipped, Python 3.12) and python static_analysis.py is clean.

🤖 Generated with Claude Code

Split KEY=VALUE environment entries on the first '=' only, so values
like -Dfile.encoding=UTF-8 or base64 tokens are not truncated.

Closes QuantConnect#679

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant