lean cloud live deploy --notify-webhooks fails when the address is a URL
評価
調査の方向性
Start at lean/commands/cloud/live/deploy.py where --notify-webhooks values are split on colons and headers on =; parse only trailing NAME=VALUE segments as headers, keep the remaining prefix as the address, and split each header on the first =. Add test cases with real URLs (with and without headers, plus a header value containing =) alongside the existing customAddress:header1=value1 tests, and run the test suite for the deploy command. Done means --notify-webhooks "https://example.com/hook:Authorization=abc" parses cleanly with no IndexError. Note: PR #672 already targets this issue, so check its state before claiming the work.
索引モデルが issue の本文から書いたものです。
説明
Expected Behavior
--notify-webhooks accepts a webhook URL, following the documented url:HEADER_1=VALUE_1:HEADER_2=VALUE_2 format, for example --notify-webhooks "https://example.com/hook:Authorization=abc".
Actual Behavior
The value is split on every colon, so the https: scheme (and a port, if any) is cut off the address and the rest of the URL is treated as a header. Any real URL ends with:
IndexError: list index out of range
at lean/commands/cloud/live/deploy.py (header.split("=")[1]). The same happens with no headers at all (https://example.com/hook). A header value containing = is truncated: Authorization=Basic dXNlcjpwYXNz== is sent as Basic dXNlcjpwYXNz.
The existing tests only use customAddress:header1=value1, which has no colon in the address.
Potential Solution
Treat only the trailing NAME=VALUE parts as headers, keep the rest as the address, and split each header on the first =. I can open a PR with the fix and tests.
Reproducing the Problem
lean cloud live deploy "My Project" --brokerage "Paper Trading" --node live --auto-restart yes \
--notify-order-events yes --notify-insights yes --data-provider-live QuantConnect \
--notify-webhooks "https://example.com/hook:Authorization=abc"
System Information
lean-cli master at 20e58aa, 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
- スター
- 327
- フォーク
- 169
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QuantConnect/lean-cli のほかの issue
-
project-create generates an invalid class name when the project name starts with a digit対応中かも @Amadeus-22 が 1 日前に担当しました。 オープン
難易度 2/5 1時間未満 初心者へのやさしさ 40/100
QuantConnect/lean-cli#673 ·
-
Docker image with a registry port cannot be parsed対応中かも @Amadeus-22 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
QuantConnect/lean-cli#669 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
QuantConnect/lean-cli#661 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
QuantConnect/lean-cli#619 ·
-
Implements Autocomplete再び着手できるかも @shreejaykurhade が 194 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンfeature
QuantConnect/lean-cli#602 · コメント 6 件 · リアクション 3 件 · 担当者 1 名 ·
QuantConnect/lean-cli の issue をすべて見る
似ている issue
-
area/install reliability
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
FluidNumerics/fluid-walk-blocker#191 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
TransformerLensOrg/TransformerLens#1868 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
climate-analytics-lab/jax-gcm#1057 ·
メンテナーはふだん 1 日以内に返信