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

BUG: tagging images leads to tag being appended to end of name #828

Closed
ihs-nick opened this issue Mar 23, 2021 · 5 comments
Closed

BUG: tagging images leads to tag being appended to end of name #828

ihs-nick opened this issue Mar 23, 2021 · 5 comments

Comments

@ihs-nick
Copy link
Contributor

When running function.deploy(), the value of tag is added at the end like "function-name-latest" instead of ":latest".

image

@Hedingber
Copy link
Contributor

Hedingber commented Mar 23, 2021

Hi @ihs-nick - thanks for reporting the issue!
The actual problem with here is not the tag, it's the fact that you have ./localhost:5000, as you can see : is not a valid for the repository name.
How did you set it ?
Note that in MLRun when the image starts with . that means it will be replaced with the configured default docker registry (in which : is valid obviously) so I guess you either should configure localhost:5000 as the default registry, and then image name should simply be .func-simple-demo-taxi-latest, or, set it manually, without the . prefix for auto completion - localhost:5000/func-simple-demo-taxi-latest

@ihs-nick
Copy link
Contributor Author

ihs-nick commented Mar 23, 2021

Hi @Hedingber, thank you for responding. I realize that there are two issues here. I fixed the issue with the remote build by manually overriding the spec like you said like below:

taxi_func.spec.image = 'host.docker.internal:5000/func-simple-demo-taxi-latest' 
taxi_func.spec.build.image = 'host.docker.internal:5000/func-simple-demo-taxi-latest'

however, if I add a tag, it is added to the end like "func-simple-demo-taxi-" which doesn't seem correct. If I look at my local docker registry it says "func-simple-demo-taxi-latest:latest". I think it should be "func-simple-demo-taxi:latest". Especially since the function name cannot exceed a certain amount of characters.

@Hedingber
Copy link
Contributor

Hi @ihs-nick,
You're right, I'll add a mission to fix this, and keep you updated on this

@nicklausbrown
Copy link

@Hedingber, I think I may have found the offending line while reviewing the source code. It is here:

return f".{repository}/func-{project}-{function.metadata.name}-{tag}"

ihs-nick added a commit to ihs-nick/mlrun that referenced this issue Apr 12, 2021
@Hedingber
Copy link
Contributor

Fixed by #860
Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants