From 3689ac173665145ea0fc542fc9f918f47d1b997b Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Thu, 13 Jun 2024 10:02:10 +0200 Subject: [PATCH] Fix `pull-timeout` flag for `crictl pull` We need to specify the right timeout. Fixes a flaking CI test in `e2e` as well. Signed-off-by: Sascha Grunert --- cmd/crictl/image.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/crictl/image.go b/cmd/crictl/image.go index a6f0ee5ae6..3c4410ed75 100644 --- a/cmd/crictl/image.go +++ b/cmd/crictl/image.go @@ -126,7 +126,7 @@ var pullImageCommand = &cli.Command{ return err } } - timeout := c.Duration("timeout") + timeout := c.Duration("pull-timeout") r, err := PullImageWithSandbox(imageClient, imageName, auth, sandbox, ann, timeout) if err != nil { return fmt.Errorf("pulling image: %w", err) @@ -664,7 +664,7 @@ func PullImageWithSandbox(client internalapi.ImageManagerService, image string, defer cancel() if timeout > 0 { - logrus.Debugf("Using context with timeout of %s", timeout) + logrus.Debugf("Using pull context with timeout of %s", timeout) ctx, cancel = context.WithTimeout(ctx, timeout) defer cancel() }