lean cloud live deploy --notify-webhooks fails when the address is a URL
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 327
- Fork
- 170
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di QuantConnect/lean-cli
-
project-create generates an invalid class name when the project name starts with a digitForse già presa @Amadeus-22 l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 40/100
QuantConnect/lean-cli#673 ·
-
Docker image with a registry port cannot be parsedForse già presa @Amadeus-22 l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
QuantConnect/lean-cli#669 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
QuantConnect/lean-cli#661 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
QuantConnect/lean-cli#619 ·
-
Implements AutocompleteForse di nuovo libera @shreejaykurhade l’ha presa 200 giorni fa e non c’è nessuna pull request aperta. Apertafeature
QuantConnect/lean-cli#602 · 6 commenti · 3 reazioni · 1 assegnatario ·
Tutte le issue di QuantConnect/lean-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
task
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
danparshall/claude_researcher#87 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
datajoint/datajoint-python#1586 ·
I maintainer di solito rispondono entro 1 giorno
-
1D intercept of length 1 is accepted as `fix_params` in population GLM with more than 1 unitForse già presa @dhvani7014 l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
flatironinstitute/nemos#642 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Broken links in the docsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
uniswap-python/uniswap-python#487 ·