Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Parse custom images with ":" in their name #160

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

phoevos
Copy link
Contributor

@phoevos phoevos commented Aug 31, 2023

For 3 of the images (i.e. explainers), the charm attempts to separate the image name from the tag, splitting the string in two using : as a separator. However, this breaks the installation if the image name contains that special character, which could be the case if a local container registry address is provided for instance (e.g. 172.17.0.2:5000/kserve/alibi-explainer:latest).

Use rsplit to ensure that the rightmost part of the string (following the last :) is parsed as the tag.

Closes #159

For 3 of the images (i.e. explainers), the charm attempts to separate
the image name from the tag, splitting the string in two using `:` as a
separator. However, this breaks the installation if the image name
contains that special character, which could be the case if a local
container registry address is provided for instance (e.g.
172.17.0.2:5000/kserve/alibi-explainer:latest).

Use `rsplit` to ensure that the rightmost part of the string (following
the last `:`) is parsed as the tag.

Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@canonical.com>
@phoevos phoevos requested a review from a team August 31, 2023 08:52
@phoevos phoevos merged commit a29b905 into main Aug 31, 2023
@phoevos phoevos deleted the kf-4276-fix-image-parsing branch August 31, 2023 09:26
misohu pushed a commit that referenced this pull request Sep 26, 2023
For 3 of the images (i.e. explainers), the charm attempts to separate
the image name from the tag, splitting the string in two using `:` as a
separator. However, this breaks the installation if the image name
contains that special character, which could be the case if a local
container registry address is provided for instance (e.g.
`172.17.0.2:5000/kserve/alibi-explainer:latest`).

Use `rsplit` to ensure that the rightmost part of the string (following
the last `:`) is parsed as the tag.

Closes #159 

Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Charm fails to parse custom images with : in their name
2 participants