-
Notifications
You must be signed in to change notification settings - Fork 158
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
The version of the function is wrong when publishing with the specified function tag. #505
Comments
This happens on the version you built by yourself including this PR #490 ? |
Yes, but it doesn't matter. func getServingImage(fn *openfunction.Function) string {
if fn.Status.Revision == nil ||
fn.Status.Revision.ImageDigest == "" {
return fn.Spec.Image
}
array := strings.Split(fn.Spec.Image, "@")
repo := fn.Spec.Image
if len(array) > 1 {
repo = array[0]
}
return repo + "@" + fn.Status.Revision.ImageDigest
} |
When the build is skiped, the |
This problem will not occur if you specify the tag alone or use the source code to build alone. |
Would it be better to not include the func (r *FunctionReconciler) createServingSpec(fn *openfunction.Function) openfunction.ServingSpec {
if fn.Spec.Serving == nil {
return openfunction.ServingSpec{}
}
spec := openfunction.ServingSpec{
Version: fn.Spec.Version,
Image: getServingImage(fn),
ImageCredentials: fn.Spec.ImageCredentials,
ServingImpl: *fn.Spec.Serving.DeepCopy(),
}
return spec
} util.Hash(servingSpec) |
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
@wanjunlei @wrongerror what do you think? |
I think the best solution is to clean up the revision when the image changes. |
Description
A clear and concise description of what the bug is.
Specify the image tag when publishing the function. The actual function version will always be the previous version built based on the source code.
Environmental
Tell us what your cluster environment is like, e.g.
Expected behavior
Tell us what should happen.
The right version wil run in serving.
Actual behavior
The actual function version will always be the previous version built based on the source code.
To Reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: