diff --git a/pkg/skaffold/build/cluster/kaniko.go b/pkg/skaffold/build/cluster/kaniko.go index 6947013abe6..ef527cd8769 100644 --- a/pkg/skaffold/build/cluster/kaniko.go +++ b/pkg/skaffold/build/cluster/kaniko.go @@ -44,6 +44,12 @@ const ( ) func (b *Builder) buildWithKaniko(ctx context.Context, out io.Writer, workspace string, artifactName string, artifact *latest.KanikoArtifact, tag string, requiredImages map[string]*string, platforms platform.Matcher) (string, error) { + log.Entry(ctx).Info("Start building with kaniko for artifact") + start := time.Now() + defer func() { + log.Entry(ctx).Infof("Building with kaniko completed in %s", time.Since(start)) + }() + // TODO: Implement building multi-platform images for cluster builder if platforms.IsMultiPlatform() { log.Entry(ctx).Warnf("multiple target platforms %q found for artifact %q. Skaffold doesn't yet support multi-platform builds for the docker builder. Consider specifying a single target platform explicitly. See https://skaffold.dev/docs/pipeline-stages/builders/#cross-platform-build-support", platforms.String(), artifactName) diff --git a/pkg/skaffold/deploy/cloudrun/deploy.go b/pkg/skaffold/deploy/cloudrun/deploy.go index 65584dc93db..d8dd0f170f7 100644 --- a/pkg/skaffold/deploy/cloudrun/deploy.go +++ b/pkg/skaffold/deploy/cloudrun/deploy.go @@ -297,7 +297,7 @@ func (d *Deployer) deployService(crclient *run.APIService, manifest []byte, out func (d *Deployer) deployJob(crclient *run.APIService, manifest []byte, out io.Writer) (*RunResourceName, error) { job := &run.Job{} if err := k8syaml.Unmarshal(manifest, job); err != nil { - return nil, sErrors.NewError(fmt.Errorf("unable to unmarshal Cloud Run Service config"), &proto.ActionableErr{ + return nil, sErrors.NewError(fmt.Errorf("unable to unmarshal Cloud Run Job config"), &proto.ActionableErr{ Message: err.Error(), ErrCode: proto.StatusCode_DEPLOY_READ_MANIFEST_ERR, }) @@ -440,7 +440,7 @@ func (d *Deployer) deleteRunService(crclient *run.APIService, out io.Writer, dry func (d *Deployer) deleteRunJob(crclient *run.APIService, out io.Writer, dryRun bool, manifest []byte) error { job := &run.Job{} if err := k8syaml.Unmarshal(manifest, job); err != nil { - return sErrors.NewError(fmt.Errorf("unable to unmarshal Cloud Run Service config"), &proto.ActionableErr{ + return sErrors.NewError(fmt.Errorf("unable to unmarshal Cloud Run Job config"), &proto.ActionableErr{ Message: err.Error(), ErrCode: proto.StatusCode_DEPLOY_READ_MANIFEST_ERR, }) diff --git a/pkg/skaffold/util/tar.go b/pkg/skaffold/util/tar.go index 96c39614a37..b2443faaeb0 100644 --- a/pkg/skaffold/util/tar.go +++ b/pkg/skaffold/util/tar.go @@ -29,6 +29,7 @@ import ( "github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/output/log" + timeutil "github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/util/time" ) type headerModifier func(*tar.Header) @@ -72,6 +73,11 @@ func CreateTar(ctx context.Context, w io.Writer, root string, paths []string) er } log.Entry(ctx).Infof("Creating tar file from %d file(s)", len(paths)) + start := time.Now() + defer func() { + log.Entry(ctx).Infof("Creating tar file completed in %s", timeutil.Humanize(time.Since(start))) + }() + for i, path := range paths { if err := addFileToTar(ctx, root, path, "", tw, nil); err != nil { return err @@ -81,7 +87,6 @@ func CreateTar(ctx context.Context, w io.Writer, root string, paths []string) er log.Entry(ctx).Infof("Added %d/%d files to tar file", i+1, len(paths)) } } - log.Entry(ctx).Info("Successfully created tar file") return nil }