cockroachdb / cockroachdb/cockroach

roachtest/mixedversion: detect removed cluster settings

Open
#143,548 1 comment 0 reactions 0 assignees View on GitHub
A-testeng-foundations C-enhancement E-starter T-testeng
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently, we lack an automated facility for detecting and disabling _removed_ cluster settings. A recent example [1] illustrates the issue. The PR which removed `kv.snapshot_receiver.excise.enabled` passed CI; i.e., it got lucky. The failure didn't manifest until hours later when an unrelated PR failed on `acceptance/version-upgrade`. The reason is that the mixedversion `planMutators` contained the aforementioned cluster setting mutator; it gets inserted into a plan according to a random distribution (p=0.3 at the time of writing).

The process for removing cluster settings entails updating `retiredSettings` (in `registry.go`). We could query that map and exclude cluster setting mutators, which have been removed. However, the earliest version of when the cluster setting was removed is encoded as a leading _comment_. Of course, we know how to parse Go ASTs, but even there, extracting comments isn't particularly intuitive. Perhaps a better approach is to switch to an easy-to-parse data format (e.g., yaml) and use `//go:embed retiredSettings.yaml`

[1] https://github.com/cockroachdb/cockroach/pull/142704
[2] https://github.com/cockroachdb/cockroach/blob/5e81fe31d376939e4acb3edd2429d12d7850b343/pkg/settings/registry.go#L261

Jira issue: CRDB-48904

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.