Skip to content

randgen: ensure template does not become stale#94840

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
postamar:followup-94027
Jan 7, 2023
Merged

randgen: ensure template does not become stale#94840
craig[bot] merged 1 commit intocockroachdb:masterfrom
postamar:followup-94027

Conversation

@postamar
Copy link
Copy Markdown

@postamar postamar commented Jan 6, 2023

This commit adds a unit test that ensures that the hard-coded table template is not stale in the face of RunPostDeserializationChanges.

Informs #94026.

Release note: None

@postamar postamar requested review from a team and knz January 6, 2023 14:40
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @postamar)


pkg/sql/catalog/randgen/templates.go line 200 at r1 (raw file):

		Version: 1,
		State:   descpb.DescriptorState_PUBLIC,
		Privileges: catpb.NewCustomSuperuserPrivilegeDescriptor(

I am confused by this. Why is this needed?
in tables.go line 177, the privileges are being overwritten.

@postamar
Copy link
Copy Markdown
Author

postamar commented Jan 6, 2023

It's needed to pass the test? It's nice to know that the hardcoded template hasn't rotted.

@knz
Copy link
Copy Markdown
Contributor

knz commented Jan 6, 2023

thanks

This commit adds a unit test that ensures that the hard-coded table
template is not stale in the face of RunPostDeserializationChanges.

Informs cockroachdb#94026.

Release note: None
@postamar
Copy link
Copy Markdown
Author

postamar commented Jan 6, 2023

Thanks for the review!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 6, 2023

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 7, 2023

Build succeeded:

@craig craig bot merged commit 763ad35 into cockroachdb:master Jan 7, 2023
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.

3 participants