Index: common/auth/internal/disk_cache.go |
diff --git a/common/auth/internal/disk_cache.go b/common/auth/internal/disk_cache.go |
index 27a5ce53e2a8015c3c9a750f495a316a0d52910b..95433e64d56f93a09c5e57d8c5066fd350880aec 100644 |
--- a/common/auth/internal/disk_cache.go |
+++ b/common/auth/internal/disk_cache.go |
@@ -15,9 +15,9 @@ import ( |
"golang.org/x/oauth2" |
"github.com/luci/luci-go/common/clock" |
- "github.com/luci/luci-go/common/errors" |
"github.com/luci/luci-go/common/logging" |
"github.com/luci/luci-go/common/retry" |
+ "github.com/luci/luci-go/common/retry/transient" |
) |
const ( |
@@ -198,7 +198,7 @@ func (c *DiskTokenCache) writeCacheFile(cache *cacheFile, now time.Time) error { |
// a retry in updateCacheFile. |
if err = os.Rename(tmp.Name(), c.absPath()); err != nil { |
cleanup() |
- return errors.WrapTransient(err) |
+ return transient.Tag.Apply(err) |
} |
return nil |
} |
@@ -222,7 +222,7 @@ func (c *DiskTokenCache) updateCacheFile(cb func(*cacheFile, time.Time) bool) er |
Multiplier: 1.5, |
} |
} |
- return retry.Retry(c.Context, retry.TransientOnly(retryParams), func() error { |
+ return retry.Retry(c.Context, transient.Only(retryParams), func() error { |
cache, err := c.readCacheFile() |
if err != nil { |
return err |