Skip to content

Commit fb87c72

Browse files
authored
Add middleware version to logs (#76)
1 parent 3556b1d commit fb87c72

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/controller/function_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
248248
function.MarkMiddlewareNotUpToDateIntentionally("SkipMiddlewareUpdate", "Skipping middleware update as update is disabled (source: %s)", source)
249249
// Don't return - continue to update deployment status
250250
} else {
251-
logger.Info("Function is not on latest middleware and middleware update is enabled. Will redeploy")
252-
function.MarkMiddlewareNotUpToDate("MiddlewareOutdated", "Middleware is outdated, redeploying")
251+
logger.Info(fmt.Sprintf("Function is not on latest middleware (%q vs %q) and middleware update is enabled. Will redeploy", latestMiddleware, functionDescribe.Middleware.Version))
252+
function.MarkMiddlewareNotUpToDate("MiddlewareOutdated", "Middleware is outdated (%s available), redeploying...", latestMiddleware)
253253

254254
function.Status.Middleware.PendingRebuild = true
255255

@@ -271,7 +271,7 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
271271
function.Status.Middleware.Available = nil // if function is on latest, we don't need to show this field
272272
}
273273
} else {
274-
logger.Info("Function is deployed with latest middleware. No need to redeploy")
274+
logger.Info(fmt.Sprintf("Function is deployed with latest middleware (%s). No need to redeploy", functionDescribe.Middleware.Version))
275275
function.MarkMiddlewareUpToDate()
276276
function.Status.Middleware.Available = nil // if function is on latest, we don't need to show this field
277277
}

0 commit comments

Comments
 (0)