Skip to content

backupccl: add multi-region test to TestRestoreOldVersions#69725

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
otan-cockroach:backup_test
Sep 3, 2021
Merged

backupccl: add multi-region test to TestRestoreOldVersions#69725
craig[bot] merged 1 commit intocockroachdb:masterfrom
otan-cockroach:backup_test

Conversation

@otan
Copy link
Copy Markdown
Contributor

@otan otan commented Sep 2, 2021

Release justification: test-only change

Release note: None

Resolves #67650

@otan otan requested review from a team, ajstorm and shermanCRL and removed request for a team September 2, 2021 02:20
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@ajstorm ajstorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 18 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan and @shermanCRL)


pkg/ccl/backupccl/restore_old_versions_test.go, line 294 at r1 (raw file):

}

func runOldVersionMultiRegionTest(exportDir string) func(t *testing.T) {

This LGTM, but I'm wondering if we need to test a few more permutations. For example, what about table level restore? We currently don't support it for MR tables into MR databases (which we should validate), but we do support non-MR tables into MR databases.


pkg/ccl/backupccl/restore_old_versions_test.go, line 326 at r1 (raw file):

		})
		defer tc.Stopper().Stop(ctx)
		require.NoError(t, os.Symlink(exportDir, filepath.Join(dir, "foo")))

Nit: why "foo"? Does it make sense to give this a more descriptive name? Something like "localBackupDir"?

Copy link
Copy Markdown
Contributor Author

@otan otan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajstorm and @shermanCRL)


pkg/ccl/backupccl/restore_old_versions_test.go, line 294 at r1 (raw file):

Previously, ajstorm (Adam Storm) wrote…

This LGTM, but I'm wondering if we need to test a few more permutations. For example, what about table level restore? We currently don't support it for MR tables into MR databases (which we should validate), but we do support non-MR tables into MR databases.

eh there's other tests that already do this no?


pkg/ccl/backupccl/restore_old_versions_test.go, line 326 at r1 (raw file):

Previously, ajstorm (Adam Storm) wrote…

Nit: why "foo"? Does it make sense to give this a more descriptive name? Something like "localBackupDir"?

Copy paste. All the other tests do this.

Copy link
Copy Markdown
Collaborator

@ajstorm ajstorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan and @shermanCRL)


pkg/ccl/backupccl/restore_old_versions_test.go, line 294 at r1 (raw file):

Previously, otan (Oliver Tan) wrote…

eh there's other tests that already do this no?

Yes, but not for older versions. When we relax the restrictions, I'd think we'd want to ensure that they work on older versions. Not suggesting we do it here (although maybe we should), but another issue/PR could be warranted.


pkg/ccl/backupccl/restore_old_versions_test.go, line 326 at r1 (raw file):

Previously, otan (Oliver Tan) wrote…

Copy paste. All the other tests do this.

Why be like everyone else?

@otan
Copy link
Copy Markdown
Contributor Author

otan commented Sep 2, 2021


pkg/ccl/backupccl/restore_old_versions_test.go, line 294 at r1 (raw file):

Previously, ajstorm (Adam Storm) wrote…

Yes, but not for older versions. When we relax the restrictions, I'd think we'd want to ensure that they work on older versions. Not suggesting we do it here (although maybe we should), but another issue/PR could be warranted.

Yeah I'd think there's a million cases to test in theory, I don't buy its too much more exciting. In general I'd rather a randomised backup restore test.

@otan
Copy link
Copy Markdown
Contributor Author

otan commented Sep 2, 2021


pkg/ccl/backupccl/restore_old_versions_test.go, line 326 at r1 (raw file):

Previously, ajstorm (Adam Storm) wrote…

Why be like everyone else?

Just want to fit in

Release justification: test-only change

Release note: None
@ajstorm ajstorm self-requested a review September 2, 2021 22:13
Copy link
Copy Markdown
Collaborator

@ajstorm ajstorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: We can debate the value of the table-level test offline.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ajstorm and @shermanCRL)


pkg/ccl/backupccl/restore_old_versions_test.go, line 294 at r1 (raw file):

Previously, otan (Oliver Tan) wrote…

Yeah I'd think there's a million cases to test in theory, I don't buy its too much more exciting. In general I'd rather a randomised backup restore test.

The fact that the enum isn't coming along for the ride makes things more interesting IMO. Doesn't have to be this PR, but I do think that we should open an issue.

@ajstorm ajstorm self-requested a review September 2, 2021 22:13
Copy link
Copy Markdown
Collaborator

@ajstorm ajstorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: with feeling this time.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ajstorm and @shermanCRL)

@otan
Copy link
Copy Markdown
Contributor Author

otan commented Sep 3, 2021

bors r=ajstorm

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Sep 3, 2021

Build succeeded:

@craig craig bot merged commit 42e5f94 into cockroachdb:master Sep 3, 2021
adityamaru added a commit to adityamaru/cockroach that referenced this pull request Jan 10, 2023
This change removes an old MR backup that was being
restored and tested against. There were no instructions
on how to regenerate the fixture in cockroachdb#69725 so it is being
deleted.

Release note: None
adityamaru added a commit to adityamaru/cockroach that referenced this pull request Mar 10, 2023
This change removes an old MR backup that was being
restored and tested against. There were no instructions
on how to regenerate the fixture in cockroachdb#69725 so it is being
deleted.

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

backupccl: add multi-region tests to RestoreAllVersions

3 participants