Skip to content

sql: skip doc generation for CREATE/ALTER TENANT#91995

Closed
adityamaru wants to merge 1 commit intocockroachdb:masterfrom
adityamaru:pull-help-text
Closed

sql: skip doc generation for CREATE/ALTER TENANT#91995
adityamaru wants to merge 1 commit intocockroachdb:masterfrom
adityamaru:pull-help-text

Conversation

@adityamaru
Copy link
Copy Markdown
Contributor

Release note: None

@adityamaru adityamaru requested a review from a team November 16, 2022 16:46
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

// %Text:
// ALTER TENANT { <tenant_id> | ALL } SET CLUSTER SETTING <var> { TO | = } <value>
// ALTER TENANT { <tenant_id> | ALL } RESET CLUSTER SETTING <var>
// %SeeAlso: SET CLUSTER SETTING
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could these still be here so that if we do start generating docs we have it already?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe this also populates the output of \h ALTER TENANT which is something we want to hide as well.

if err := p.RequireAdminRole(ctx, op); err != nil {
return roachpb.TenantID{}, err
}
if err := rejectIfCantCoordinateMultiTenancy(p.ExecCfg().Codec, op); err != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what does this change do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

rejectIfCantCoordinateMultiTenancy ensures that only the system tenant can call CreateTenant. Previously, CreateTenant would fail later when it goes to write to system.tenants since that table doesn't exist in a secondary tenant. Instead, we get a better error by calling this method at the top of CreateTenant.

@adityamaru adityamaru requested a review from rafiss November 16, 2022 17:27
Copy link
Copy Markdown
Contributor

@lidorcarmel lidorcarmel left a comment

Choose a reason for hiding this comment

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

this pr looks correct, but let's first decide whether we need to drop or keep all of that?

Reviewed 8 of 9 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru and @rafiss)


docs/generated/sql/bnf/stmt_block.bnf line 2240 at r2 (raw file):

	( role_option ) ( ( role_option ) )*

typed_literal ::=

why did some blocks move? if we have to move some things maybe worth putting those in a separate commit?

@rafiss
Copy link
Copy Markdown
Collaborator

rafiss commented Feb 1, 2023

@adityamaru do we need this PR still?

@rafiss rafiss added the X-noremind Bots won't notify about PRs with X-noremind label Feb 10, 2023
@adityamaru
Copy link
Copy Markdown
Contributor Author

do we need this PR still?

I'm going to close this as it'll be easier to open a new PR given how much everything has changed. I've filed #97064 to track this.

@adityamaru adityamaru closed this Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-disaster-recovery X-noremind Bots won't notify about PRs with X-noremind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants