lean cloud live deploy --notify-webhooks fails when the address is a URL
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Python
- Estrelas
- 327
- Forks
- 169
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de QuantConnect/lean-cli
-
project-create generates an invalid class name when the project name starts with a digitTalvez já em andamento @Amadeus-22 assumiu há 1 dia. Aberta
Dificuldade 2/5 Menos de uma hora Facilidade para iniciantes 40/100
QuantConnect/lean-cli#673 ·
-
Docker image with a registry port cannot be parsedTalvez já em andamento @Amadeus-22 assumiu há 1 dia. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 45/100
QuantConnect/lean-cli#669 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
QuantConnect/lean-cli#661 · 1 comentário ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
QuantConnect/lean-cli#619 ·
-
Implements AutocompleteTalvez livre de novo @shreejaykurhade assumiu há 194 dias e não há nenhum pull request aberto. Abertafeature
QuantConnect/lean-cli#602 · 6 comentários · 3 reações · 1 responsável ·
Todas as issues de QuantConnect/lean-cli
Issues semelhantes
-
Link Checker ReportAbertaautomated issue report
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
RapidAI/RapidOCRDocs#119 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
btclib-org/btclib-node#1833 ·
Mantenedores costumam responder em até 1 dia
-
IRIS reader: no-data velocity bins (DB_VEL, DB_VELC) returned as 0.0 m/s instead of NaNTalvez já em andamento @syedhamidali assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 80/100
elodin-sys/elodin#890 ·
Mantenedores costumam responder em até 1 dia