From 1120e4f629313d8bf77591beecdaf7cdbb23b7db Mon Sep 17 00:00:00 2001 From: Jarek Kowalski Date: Tue, 22 Aug 2023 19:41:03 -0700 Subject: [PATCH] chore(ci): reenable check-locks after the fix was merged upstream (#3245) --- .github/workflows/lint.yml | 2 ++ internal/blobtesting/object_locking_map.go | 2 +- internal/cache/persistent_lru_cache.go | 4 +++- tools/tools.mk | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5f014e432..211693e7c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,3 +37,5 @@ jobs: if: ${{ !contains(matrix.os, 'ARMHF') }} - name: Lint run: make lint + - name: Check Locks + run: make check-locks diff --git a/internal/blobtesting/object_locking_map.go b/internal/blobtesting/object_locking_map.go index eb71b74e6..6fbb20c34 100644 --- a/internal/blobtesting/object_locking_map.go +++ b/internal/blobtesting/object_locking_map.go @@ -14,7 +14,7 @@ "github.com/kopia/kopia/repo/blob" ) -var ErrBlobLocked = errors.New("cannot alter object before retention period expires") +var ErrBlobLocked = errors.New("cannot alter object before retention period expires") // +checklocksignore type entry struct { value []byte diff --git a/internal/cache/persistent_lru_cache.go b/internal/cache/persistent_lru_cache.go index c56b2261b..4148264ff 100644 --- a/internal/cache/persistent_lru_cache.go +++ b/internal/cache/persistent_lru_cache.go @@ -37,7 +37,9 @@ type PersistentCache struct { storageProtection cacheprot.StorageProtection sweep SweepSettings timeNow func() time.Time - lastCacheWarning time.Time + + // +checklocks:listCacheMutex + lastCacheWarning time.Time description string diff --git a/tools/tools.mk b/tools/tools.mk index c2eb8507b..e96476660 100644 --- a/tools/tools.mk +++ b/tools/tools.mk @@ -103,7 +103,7 @@ endif # tool versions GOLANGCI_LINT_VERSION=1.54.0 -CHECKLOCKS_VERSION=release-20221026.0 +CHECKLOCKS_VERSION=e8c1fff214d0ecf02cfe5aa9c62d11174130c339 NODE_VERSION=18.16.0 HUGO_VERSION=0.113.0 GOTESTSUM_VERSION=1.10.0