Skip to content

Commit

Permalink
Merge #90066
Browse files Browse the repository at this point in the history
90066: clusterversion: define 22.2 and 23.1 start r=dt a=dt

See commits.

Epic: none.

Co-authored-by: David Taylor <[email protected]>
  • Loading branch information
craig[bot] and dt committed Oct 17, 2022
2 parents 1c02afc + c2e366e commit 98b1e0c
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/generated/settings/settings-for-tenants.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,4 +300,4 @@ trace.jaeger.agent string the address of a Jaeger agent to receive traces using
trace.opentelemetry.collector string address of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as <host>:<port>. If no port is specified, 4317 will be used.
trace.span_registry.enabled boolean true if set, ongoing traces can be seen at https://<ui>/#/debug/tracez
trace.zipkin.collector string the address of a Zipkin instance to receive traces, as <host>:<port>. If no port is specified, 9411 will be used.
version version 1000022.1-76 set the active cluster version in the format '<major>.<minor>'
version version 1000022.2-2 set the active cluster version in the format '<major>.<minor>'
2 changes: 1 addition & 1 deletion docs/generated/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,6 @@
<tr><td><code>trace.opentelemetry.collector</code></td><td>string</td><td><code></code></td><td>address of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as <host>:<port>. If no port is specified, 4317 will be used.</td></tr>
<tr><td><code>trace.span_registry.enabled</code></td><td>boolean</td><td><code>true</code></td><td>if set, ongoing traces can be seen at https://<ui>/#/debug/tracez</td></tr>
<tr><td><code>trace.zipkin.collector</code></td><td>string</td><td><code></code></td><td>the address of a Zipkin instance to receive traces, as <host>:<port>. If no port is specified, 9411 will be used.</td></tr>
<tr><td><code>version</code></td><td>version</td><td><code>1000022.1-76</code></td><td>set the active cluster version in the format '<major>.<minor>'</td></tr>
<tr><td><code>version</code></td><td>version</td><td><code>1000022.2-2</code></td><td>set the active cluster version in the format '<major>.<minor>'</td></tr>
</tbody>
</table>
4 changes: 2 additions & 2 deletions pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ select crdb_internal.get_vmodule()
query T
select regexp_replace(regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''), '10000', '');
----
22.1
22.2

query ITTT colnames
select node_id, component, field, regexp_replace(regexp_replace(value, '^\d+$', '<port>'), e':\\d+', ':<port>') as value from crdb_internal.node_runtime_info
Expand Down Expand Up @@ -442,7 +442,7 @@ select * from crdb_internal.gossip_alerts
query T
select regexp_replace(regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''), '10000', '');
----
22.1
22.2

user root

Expand Down
24 changes: 24 additions & 0 deletions pkg/clusterversion/cockroach_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ const (
// heuristics to identify invalid table descriptors for userfile-related
// descriptors.
FixUserfileRelatedDescriptorCorruption

// V22_2 is CockroachDB v22.2. It's used for all v22.2.x patch releases.
V22_2

// V23_1_Start demarcates the start of cluster versions stepped through during
// the process of upgrading from 22.2 to 23.1.
V23_1Start

// *************************************************
// Step (1): Add new versions here.
// Do not add new versions to a patch release.
Expand Down Expand Up @@ -496,6 +504,14 @@ var rawVersionsSingleton = keyedVersions{
Key: FixUserfileRelatedDescriptorCorruption,
Version: roachpb.Version{Major: 22, Minor: 1, Internal: 76},
},
{
Key: V22_2,
Version: roachpb.Version{Major: 22, Minor: 2, Internal: 0},
},
{
Key: V23_1Start,
Version: roachpb.Version{Major: 22, Minor: 2, Internal: 2},
},
// *************************************************
// Step (2): Add new versions here.
// Do not add new versions to a patch release.
Expand Down Expand Up @@ -544,6 +560,14 @@ var versionsSingleton = func() keyedVersions {
return rawVersionsSingleton
}()

// V23_1 is a placeholder that will eventually be replaced by the actual 23.1
// version Key, but in the meantime it points to the latest Key. The placeholder
// is defined so that it can be referenced in code that simply wants to check if
// a cluster is running 23.1 and has completed all associated migrations; most
// version gates can use this instead of defining their own version key if all
// simply need to check is that the cluster has upgraded to 23.1.
var V23_1 = versionsSingleton[len(versionsSingleton)-1].Key

// TODO(irfansharif): clusterversion.binary{,MinimumSupported}Version
// feels out of place. A "cluster version" and a "binary version" are two
// separate concepts.
Expand Down
6 changes: 4 additions & 2 deletions pkg/clusterversion/key_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/sql/logictest/testdata/logic_test/crdb_internal
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ select crdb_internal.get_vmodule()
query T
select regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', '');
----
1000022.1
1000022.2

query ITTT colnames
select node_id, component, field, regexp_replace(regexp_replace(value, '^\d+$', '<port>'), e':\\d+', ':<port>') as value from crdb_internal.node_runtime_info
Expand Down Expand Up @@ -693,7 +693,7 @@ select * from crdb_internal.node_inflight_trace_spans
query T
select regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', '');
----
1000022.1
1000022.2

user root

Expand Down Expand Up @@ -1187,4 +1187,4 @@ true
user root

statement ok
REVOKE SYSTEM MODIFYCLUSTERSETTING FROM testuser
REVOKE SYSTEM MODIFYCLUSTERSETTING FROM testuser

0 comments on commit 98b1e0c

Please sign in to comment.