Docker image with a registry port cannot be parsed
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Start at DockerImage.parse in lean/models/docker.py and reproduce the two failing cases from the issue. The rule is to treat only a final colon segment without / as the tag; add cases covering registry ports and tags to the existing DockerImage parse tests (look under tests/) so both parse and error paths are covered. Note that linked PR #670 is already open against this issue, so confirm with maintainers before starting.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Expected Behavior
An image hosted on a registry that listens on a port, for example localhost:5000/lean or registry.example.com:5000/quantconnect/lean:123, can be used with --image and with lean config set engine-image / research-image.
Actual Behavior
DockerImage.parse splits on every colon, so the registry port is read as the tag:
localhost:5000/lean -> DockerImage(name='localhost', tag='5000/lean')
localhost:5000/lean:latest -> ValueError: too many values to unpack (expected 2)
Potential Solution
Only treat what follows the last colon as the tag, and only when it does not contain a /. I can open a PR with the fix and tests.
Reproducing the Problem
from lean.models.docker import DockerImage
DockerImage.parse("localhost:5000/lean")
DockerImage.parse("localhost:5000/lean:latest")
System Information
lean-cli master at 20e58aa, Python 3.13, 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
- Vorherrschende Sprache
- Python
- Sterne
- 327
- Forks
- 169
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus QuantConnect/lean-cli
-
project-create generates an invalid class name when the project name starts with a digitEvtl. vergeben @Amadeus-22 hat das vor 1 Tag übernommen. Offen
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 40/100
QuantConnect/lean-cli#673 ·
-
lean cloud live deploy --notify-webhooks fails when the address is a URLEvtl. vergeben @Amadeus-22 hat das vor 1 Tag übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 48/100
QuantConnect/lean-cli#671 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
QuantConnect/lean-cli#661 · 1 Kommentar ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
QuantConnect/lean-cli#619 ·
-
Implements AutocompleteEvtl. wieder frei @shreejaykurhade hat das vor 194 Tagen übernommen, und es ist kein Pull Request offen. Offenfeature
QuantConnect/lean-cli#602 · 6 Kommentare · 3 Reaktionen · 1 zugewiesene Person ·
Alle Issues in QuantConnect/lean-cli
Ähnliche Issues
-
changelog investigate
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
ramnes/notion-sdk-py#409 ·
-
good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
lindicaphxag-tech/kaggle#28 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
BSData/horus-heresy-3rd-edition#3211 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug tests
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag