Docker image with a registry port cannot be parsed
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 45/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Python
- Étoiles
- 327
- Forks
- 170
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de QuantConnect/lean-cli
-
project-create generates an invalid class name when the project name starts with a digitPeut-être pris @Amadeus-22 l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 Moins d'une heure Accessibilité débutants 40/100
QuantConnect/lean-cli#673 ·
-
lean cloud live deploy --notify-webhooks fails when the address is a URLPeut-être pris @Amadeus-22 l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 48/100
QuantConnect/lean-cli#671 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
QuantConnect/lean-cli#661 · 1 commentaire ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
QuantConnect/lean-cli#619 ·
-
Implements AutocompletePeut-être à nouveau libre @shreejaykurhade l’a pris il y a 196 jours, et aucune pull request n’est ouverte. Ouvertefeature
QuantConnect/lean-cli#602 · 6 commentaires · 3 réactions · 1 personne assignée ·
Toutes les issues de QuantConnect/lean-cli
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
UKGovernmentBEIS/inspect_ai#5802 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
no-human-ai/no_human#660 ·
Les mainteneurs répondent en général sous 1 jour
-
Add a Security Insights v2 fileOuvertedocumentation good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
documentation need help question
Difficulté 1/5 1-3 heures Accessibilité débutants 66/100
phonology024/babelscribe#26 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100