lean cloud live deploy --notify-webhooks fails when the address is a URL
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 327
- Forks
- 170
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de QuantConnect/lean-cli
-
project-create generates an invalid class name when the project name starts with a digitPosiblemente ocupada @Amadeus-22 la tomó hace 1 día. Abierto
Dificultad 2/5 Menos de una hora Aptitud para principiantes 40/100
QuantConnect/lean-cli#673 ·
-
Docker image with a registry port cannot be parsedPosiblemente ocupada @Amadeus-22 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
QuantConnect/lean-cli#669 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
QuantConnect/lean-cli#661 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
QuantConnect/lean-cli#619 ·
-
Implements AutocompleteQuizá libre de nuevo @shreejaykurhade la tomó hace 194 días y no hay ningún pull request abierto. Abiertofeature
QuantConnect/lean-cli#602 · 6 comentarios · 3 reacciones · 1 asignado ·
Todos los issues de QuantConnect/lean-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
rpm-software-management/mock#1824 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
jpata/particleflow#520 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue hacktoberfest
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
gridhead/gi-loadouts#699 ·
Los mantenedores suelen responder en 13 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
FinanceFlash/unvibecode#206 ·
Los mantenedores suelen responder en 1 día