Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrades: fix desc ID sequence definition to match expectation #93610

Conversation

ajwerner
Copy link
Contributor

Before this change, the test fails with:

Diff:
@@ -29,11 +29,11 @@
 	"lastUpdated" TIMESTAMP NOT NULL DEFAULT now():::TIMESTAMP,
 	"valueType" STRING NULL,
 	CONSTRAINT "primary" PRIMARY KEY (name ASC),
 	FAMILY "fam_0_name_value_lastUpdated_valueType" (name, value, "lastUpdated", "valueType")
 );
-CREATE SEQUENCE public.descriptor_id_seq MINVALUE 1 MAXVALUE 9223372036854775807 INCREMENT 1 START 1;
+CREATE SEQUENCE public.descriptor_id_seq MINVALUE 1 MAXVALUE 9223372036854775807 INCREMENT 1 START 104;
 CREATE TABLE public.tenants (
 	id INT8 NOT NULL,
 	active BOOL NOT NULL DEFAULT true,
 	info BYTES NULL,
 	name STRING NULL AS (crdb_internal.pb_to_json('cockroach.sql.sqlbase.TenantInfo':::STRING, info)->>'name':::STRING) VIRTUAL,
----

This was revealed by #93487 which fixed the broken roachtest. Expect a few more of these.
Fixes: #93602

Release note: None

@ajwerner ajwerner requested a review from a team December 14, 2022 15:46
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@postamar postamar left a comment

Choose a reason for hiding this comment

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

LGTM

pkg/upgrade/upgrades/desc_id_sequence_for_system_tenant.go Outdated Show resolved Hide resolved
Before this change, the test fails with:

```
Diff:
@@ -29,11 +29,11 @@
 	"lastUpdated" TIMESTAMP NOT NULL DEFAULT now():::TIMESTAMP,
 	"valueType" STRING NULL,
 	CONSTRAINT "primary" PRIMARY KEY (name ASC),
 	FAMILY "fam_0_name_value_lastUpdated_valueType" (name, value, "lastUpdated", "valueType")
 );
-CREATE SEQUENCE public.descriptor_id_seq MINVALUE 1 MAXVALUE 9223372036854775807 INCREMENT 1 START 1;
+CREATE SEQUENCE public.descriptor_id_seq MINVALUE 1 MAXVALUE 9223372036854775807 INCREMENT 1 START 104;
 CREATE TABLE public.tenants (
 	id INT8 NOT NULL,
 	active BOOL NOT NULL DEFAULT true,
 	info BYTES NULL,
 	name STRING NULL AS (crdb_internal.pb_to_json('cockroach.sql.sqlbase.TenantInfo':::STRING, info)->>'name':::STRING) VIRTUAL,
----

```

This was revealed by cockroachdb#93487 which fixed the broken roachtest. Expect a few more
of these.
Fixes: cockroachdb#93602

Release note: None
@ajwerner ajwerner force-pushed the ajwerner/fix-systemschemavalidation-on-master branch from 570b8dd to 691e50b Compare December 14, 2022 19:30
@ajwerner
Copy link
Contributor Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Dec 14, 2022

Build succeeded:

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.

roachtest: systemschema/validate-after-version-upgrade failed
3 participants