Skip to content

Commit 04af15a

Browse files
committed
[imgbuilder] Support forceRebuild
1 parent e37f208 commit 04af15a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/image-builder/pkg/orchestrator/orchestrator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ func (o *Orchestrator) Build(req *protocol.BuildRequest, resp protocol.ImageBuil
322322
if err != nil {
323323
return status.Errorf(codes.Internal, "cannot check if image is already built: %q", err)
324324
}
325-
if exists {
325+
if exists && !req.GetForceRebuild() {
326326
// If the workspace image exists, so should the baseimage if we've built it.
327327
// If we didn't build it and the base image doesn't exist anymore, getWorkspaceImageRef will have failed to resolve the baseref.
328328
baserefAbsolute, err := o.getAbsoluteImageRef(ctx, baseref, auth.AllowedAuthForAll)

0 commit comments

Comments
 (0)