Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
137630: go.mod: bump Pebble to 42bb0f47f1c5 r=rickystewart a=jbowens

Changes:

 * [`42bb0f47`](cockroachdb/pebble@42bb0f47) cache: tiny tweaks to readShard
 * [`e12d2c0a`](cockroachdb/pebble@e12d2c0a) metamorphic: allow KeyFormat to customize formatting of keys
 * [`af3c4e6d`](cockroachdb/pebble@af3c4e6d) metamorphic: allow KeyFormats to specify parse functions for keys
 * [`8a1bd363`](cockroachdb/pebble@8a1bd363) metamorphic: add KeyFormat type
 * [`06528112`](cockroachdb/pebble@06528112) internal/compact: defer retrieval of external values
 * [`d556bba4`](cockroachdb/pebble@d556bba4) sstable: optimize allocation of uncompressed buffers
 * [`924a6698`](cockroachdb/pebble@924a6698) sstable: don't clone the last key for each data buffer
 * [`4949684b`](cockroachdb/pebble@4949684b) cache,db: de-dup concurrent attempts to read the same block
 * [`ab9741a3`](cockroachdb/pebble@ab9741a3) arenaskl: remove node.allocSize field
 * [`0f9bf63d`](cockroachdb/pebble@0f9bf63d) cockroachkvs: add TestKeySchema_KeySeeker
 * [`f8627724`](cockroachdb/pebble@f8627724) cockroachkvs: add TestKeySchema_KeyWriter
 * [`d713b4dc`](cockroachdb/pebble@d713b4dc) cockroachkvs: fix seek keys in testdata/seek
 * [`415dace2`](cockroachdb/pebble@415dace2) go.mod: add github.com/olekukonko/tablewriter
 * [`567ce9bf`](cockroachdb/pebble@567ce9bf) cockroachkvs: add TestKeySchema_RandomKeys
 * [`39980a61`](cockroachdb/pebble@39980a61) cockroachkvs: move from internal/crdbtest

Release note: none.
Epic: none.

137730: clusterversion: make SkipWhenMinSupportedVersionIsAtLeast take Key r=dt a=dt

Using the int 24 or 25 doesn't work because of offsetting, ie. 1000024>25, even though 24 < 25. Instead let's just use Keys -- the only way we really want code to talk about versions anyway. We can and should let MinSupported be a key > 0, so this should still allow the desired behavior of simply raising MinSupported and have the test start skipping itself.

Release note: none.
Epic: none.

Co-authored-by: Jackson Owens <[email protected]>
Co-authored-by: David Taylor <[email protected]>
  • Loading branch information
3 people committed Dec 19, 2024
3 parents 2f430dc + 4652187 + f6ec5e8 commit 5d3823e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
6 changes: 3 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1845,10 +1845,10 @@ def go_deps():
patches = [
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch",
],
sha256 = "dfd82d8e65c0b4cf44629de5ad07104a327c80d2cd515a387fc008f6051df040",
strip_prefix = "github.com/cockroachdb/[email protected]20241206160845-91e091aa3637",
sha256 = "aaaf950e1cca1dd6e254b9a01a7267a9d4d509f0aacb8dd09134d50557c1a6b8",
strip_prefix = "github.com/cockroachdb/[email protected]20241217154139-42bb0f47f1c5",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241206160845-91e091aa3637.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241217154139-42bb0f47f1c5.zip",
],
)
go_repository(
Expand Down
2 changes: 1 addition & 1 deletion build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gostdlib/com_github_cockroachdb_gostdlib-v1.19.0.zip": "c4d516bcfe8c07b6fc09b8a9a07a95065b36c2855627cb3514e40c98f872b69e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20241215232642-bb51bb14a506.zip": "920068af09e3846d9ebb4e4a7787ff1dd10f3989c5f940ad861b0f6a9f824f6e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/metamorphic/com_github_cockroachdb_metamorphic-v0.0.0-20231108215700-4ba948b56895.zip": "28c8cf42192951b69378cf537be5a9a43f2aeb35542908cc4fe5f689505853ea",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241206160845-91e091aa3637.zip": "dfd82d8e65c0b4cf44629de5ad07104a327c80d2cd515a387fc008f6051df040",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241217154139-42bb0f47f1c5.zip": "aaaf950e1cca1dd6e254b9a01a7267a9d4d509f0aacb8dd09134d50557c1a6b8",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/redact/com_github_cockroachdb_redact-v1.1.5.zip": "11b30528eb0dafc8bc1a5ba39d81277c257cbe6946a7564402f588357c164560",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/returncheck/com_github_cockroachdb_returncheck-v0.0.0-20200612231554-92cdbca611dd.zip": "ce92ba4352deec995b1f2eecf16eba7f5d51f5aa245a1c362dfe24c83d31f82b",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/stress/com_github_cockroachdb_stress-v0.0.0-20220803192808-1806698b1b7b.zip": "3fda531795c600daf25532a4f98be2a1335cd1e5e182c72789bca79f5f69fcc1",
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ require (
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55
github.com/cockroachdb/gostdlib v1.19.0
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506
github.com/cockroachdb/pebble v0.0.0-20241206160845-91e091aa3637
github.com/cockroachdb/pebble v0.0.0-20241217154139-42bb0f47f1c5
github.com/cockroachdb/redact v1.1.5
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd
github.com/cockroachdb/stress v0.0.0-20220803192808-1806698b1b7b
Expand Down Expand Up @@ -206,7 +206,7 @@ require (
github.com/montanaflynn/stats v0.7.0
github.com/mozillazg/go-slugify v0.2.0
github.com/nightlyone/lockfile v1.0.0
github.com/olekukonko/tablewriter v0.0.5-0.20200416053754-163badb3bac6
github.com/olekukonko/tablewriter v0.0.5
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799
github.com/otan/gopgkrb5 v1.0.3
github.com/petermattis/goid v0.0.0-20211229010228-4d14c490ee36
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,8 @@ github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 h1:ASDL+UJcILM
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506/go.mod h1:Mw7HqKr2kdtu6aYGn3tPmAftiP3QPX63LdK/zcariIo=
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895 h1:XANOgPYtvELQ/h4IrmPAohXqe2pWA8Bwhejr3VQoZsA=
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895/go.mod h1:aPd7gM9ov9M8v32Yy5NJrDyOcD8z642dqs+F0CeNXfA=
github.com/cockroachdb/pebble v0.0.0-20241206160845-91e091aa3637 h1:DHpvNh7WubKNL0yv0nIK318JbMxQo5/CZA1C26KBGJc=
github.com/cockroachdb/pebble v0.0.0-20241206160845-91e091aa3637/go.mod h1:wHj0OgGL0nFHFvlAnluKoJIF+bg5meM676MxW1G6GXg=
github.com/cockroachdb/pebble v0.0.0-20241217154139-42bb0f47f1c5 h1:Q0yPfmBNeWIdDiYNQ+XoeceRHJsUbA6+asfzd4NWMs8=
github.com/cockroachdb/pebble v0.0.0-20241217154139-42bb0f47f1c5/go.mod h1:ewJSTQ30qIuX6FeYX+2M37Ghn6r0r2I+g0jDIcTdUXM=
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
Expand Down
12 changes: 4 additions & 8 deletions pkg/clusterversion/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

package clusterversion

import (
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
)
import "github.com/cockroachdb/cockroach/pkg/testutils/skip"

// TestingClusterVersion is a ClusterVersion that tests can use when they don't
// want to go through a Settings object.
Expand All @@ -22,10 +19,9 @@ var TestingClusterVersion = ClusterVersion{
// Used for upgrade tests that require support for a previous version; it allows
// experimenting with bumping MinSupported and limiting how many things must be
// fixed in the same PR that bumps it.
func SkipWhenMinSupportedVersionIsAtLeast(t skip.SkippableTest, major, minor int) {
func SkipWhenMinSupportedVersionIsAtLeast(t skip.SkippableTest, v Key) {
t.Helper()
v := roachpb.Version{Major: int32(major), Minor: int32(minor)}
if MinSupported.Version().AtLeast(v) {
skip.IgnoreLint(t, "test disabled when MinVersion >= %d.%d", major, minor)
if MinSupported.Version().AtLeast(v.Version()) {
skip.IgnoreLintf(t, "test disabled when MinVersion >= %s", v)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestPreparedTransactionsTable(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

clusterversion.SkipWhenMinSupportedVersionIsAtLeast(t, 25, 1)
clusterversion.SkipWhenMinSupportedVersionIsAtLeast(t, clusterversion.V25_1)

clusterArgs := base.TestClusterArgs{
ServerArgs: base.TestServerArgs{
Expand Down

0 comments on commit 5d3823e

Please sign in to comment.