diff --git a/pkg/blobinfocache/internal/test/test.go b/pkg/blobinfocache/internal/test/test.go index cf5da09921..2247ee6605 100644 --- a/pkg/blobinfocache/internal/test/test.go +++ b/pkg/blobinfocache/internal/test/test.go @@ -197,8 +197,9 @@ func assertCandidatesMatch2(t *testing.T, scopeName string, expected []candidate Digest: ev.d, CompressionOperation: op, CompressionAlgorithm: algo, - UnknownLocation: false, - Location: types.BICLocationReference{Opaque: scopeName + ev.lr}, + // FIXME: CompressionAnnotations are probably going to be necessary. + UnknownLocation: false, + Location: types.BICLocationReference{Opaque: scopeName + ev.lr}, } } assertCandidatesMatch2Native(t, e, actual) @@ -513,6 +514,8 @@ func testGenericCandidateLocations2(t *testing.T, cache blobinfocache.BlobInfoCa // Tests of candidate filtering // ---------------------------- + // FIXME: Set chunked correctly, incl. annotations + // FIXME: Test expected annotations. for _, e := range digestNameSetFiltering { cache.RecordKnownLocation(transport, scope, e.d, types.BICLocationReference{Opaque: scopeName + e.n}) } @@ -553,6 +556,7 @@ func testGenericCandidateLocations2(t *testing.T, cache blobinfocache.BlobInfoCa }, res) // Compression algorithm filters + // FIXME: Test zstd / chunked relationship and uses res = cache.CandidateLocations2(transport, scope, digestFilteringUncompressed, blobinfocache.CandidateLocations2Options{ CanSubstitute: true, RequiredCompression: &compression.Gzip, diff --git a/pkg/blobinfocache/sqlite/sqlite.go b/pkg/blobinfocache/sqlite/sqlite.go index 15f5f99441..9d99edeafd 100644 --- a/pkg/blobinfocache/sqlite/sqlite.go +++ b/pkg/blobinfocache/sqlite/sqlite.go @@ -162,7 +162,8 @@ func transaction[T any](sqc *cache, fn func(tx *sql.Tx) (T, error)) (T, error) { return db, func() { db.Close() }, nil }() if err != nil { - var zeroRes T // A zero value of T + logrus.Errorf("SQL error %v", err) // FIXME: DROP? + var zeroRes T // A zero value of T return zeroRes, err } defer closeDB()