Skip to content

Commit

Permalink
Merge #79892
Browse files Browse the repository at this point in the history
79892: cli: extend `gen settings-list` r=andf-crl,nickvigilante a=knz

Fixes #80097

We want to have a way to print all settings with their class and
visibility for internal investigations.

This is also useful for public-facing documentation, where we want to
split settings according to what users can expect from SET CLUSTER
SETTINGS.

The generated files are as follows:

- `settings-for-tenant.txt`: a TSV file containing settings that
  tenants can access (i.e. excluding `system-only` settings which
  cannot be set/accessed by tenants).

  NEW: a new `class` column, containing either:

  - `tenant-rw`: the tenant can use both SHOW and SET
  - `tenant-ro`: the tenant can use only SHOW

- `settings.html`: complete list of settings.

  NEW: the same `class` column as above. This column
  also contain  `system-only` setting in this file.

  Also, a new `visibility` column, which separates
  public vs reserved settings.

Co-authored-by: Raphael 'kena' Poss <[email protected]>
  • Loading branch information
craig[bot] and knz committed Apr 3, 2023
2 parents 65d9792 + 944f33b commit 2e56a48
Show file tree
Hide file tree
Showing 5 changed files with 507 additions and 467 deletions.
4 changes: 2 additions & 2 deletions docs/generated/settings/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
genrule(
name = "settings",
outs = ["settings.html"],
cmd = "$(location //pkg/cmd/cockroach-short) gen settings-list --format=rawhtml > $@",
cmd = "$(location //pkg/cmd/cockroach-short) gen settings-list --show-class --format=rawhtml --class-header-label 'Supported Deployments' --class-labels 'Dedicated/Self-Hosted,Serverless/Dedicated/Self-Hosted (read-only),Serverless/Dedicated/Self-Hosted' > $@",
exec_tools = ["//pkg/cmd/cockroach-short"],
visibility = [
":__pkg__",
Expand All @@ -12,7 +12,7 @@ genrule(
genrule(
name = "settings_for_tenants",
outs = ["settings-for-tenants.txt"],
cmd = "$(location //pkg/cmd/cockroach-short) gen settings-list --without-system-only > $@",
cmd = "$(location //pkg/cmd/cockroach-short) gen settings-list --show-class --without-system-only > $@",
exec_tools = ["//pkg/cmd/cockroach-short"],
visibility = [
":__pkg__",
Expand Down
Loading

0 comments on commit 2e56a48

Please sign in to comment.