Skip to content

Commit

Permalink
roachtest: bump fixtures for 20.1 (to 20.1.6)
Browse files Browse the repository at this point in the history
And address fallout from `roachprod` changes around cluster
initialization (#51329). Touches #54761.

Release note: None
  • Loading branch information
irfansharif authored and jayshrivastava committed Oct 8, 2020
1 parent 5ff0d05 commit de16997
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
Binary file modified pkg/cmd/roachtest/fixtures/1/checkpoint-v20.1.tgz
Binary file not shown.
Binary file modified pkg/cmd/roachtest/fixtures/2/checkpoint-v20.1.tgz
Binary file not shown.
Binary file modified pkg/cmd/roachtest/fixtures/3/checkpoint-v20.1.tgz
Binary file not shown.
Binary file modified pkg/cmd/roachtest/fixtures/4/checkpoint-v20.1.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ func PredecessorVersion(buildVersion version.Version) (string, error) {
// (see runVersionUpgrade). The same is true for adding a new key to this
// map.
verMap := map[string]string{
"20.2": "20.1.4",
"20.2": "20.1.6",
"20.1": "19.2.9",
"19.2": "19.1.11",
"19.1": "2.1.9",
Expand Down
17 changes: 13 additions & 4 deletions pkg/cmd/roachtest/versionupgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,12 @@ func runVersionUpgrade(ctx context.Context, t *test, c *cluster, buildVersion ve
// is necessary after every release. For example, the day `master` becomes
// the 20.2 release, this test will fail because it is missing a fixture for
// 20.1; run the test (on 20.1) with the bool flipped to create the fixture.
// Check it in (instructions are on the 'checkpointer' struct) and off we
// go.
// Check it in (instructions will be logged below) and off we go.
if false {
// The version to create/update the fixture for. Must be released (i.e.
// can download it from the homepage); if that is not the case use the
// empty string which uses the local cockroach binary.
newV := "19.2.6"
newV := "20.1.6"
predV, err := PredecessorVersion(*version.MustParse("v" + newV))
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -506,8 +505,18 @@ func makeVersionFixtureAndFatal(
// compatible).
name := checkpointName(u.binaryVersion(ctx, t, 1).String())
u.c.Stop(ctx, c.All())
// TODO(irfansharif): This will need replacement, or a suitable
// alternative, for when we strip out rocksdb entirely. This will
// fail with an opaque error if building the cockroach binary
// without rocksdb (`make buildshort`).
c.Run(ctx, c.All(), cockroach, "debug", "rocksdb", "--db={store-dir}",
"checkpoint", "--checkpoint_dir={store-dir}/"+name)
// The `cluster-bootstrapped` marker can already be found within
// store-dir, but the rocksdb checkpoint step above does not pick it
// up as it isn't recognized by RocksDB. We copy the marker
// manually, it's necessary for roachprod created clusters. See
// #54761.
c.Run(ctx, c.Node(1), "cp", "{store-dir}/cluster-bootstrapped", "{store-dir}/"+name)
c.Run(ctx, c.All(), "tar", "-C", "{store-dir}/"+name, "-czf", "{log-dir}/"+name+".tgz", ".")
t.Fatalf(`successfully created checkpoints; failing test on purpose.
Expand All @@ -516,7 +525,7 @@ result:
for i in 1 2 3 4; do
mkdir -p pkg/cmd/roachtest/fixtures/${i} && \
mv artifacts/acceptance/version-upgrade/run_1/${i}.logs/checkpoint-*.tgz \
mv artifacts/acceptance/version-upgrade/run_1/logs/${i}.unredacted/checkpoint-*.tgz \
pkg/cmd/roachtest/fixtures/${i}/
done
`)
Expand Down

0 comments on commit de16997

Please sign in to comment.