Skip to content

release-26.2: roachtest: scope db-console endpoint IDs per test invocation#170654

Merged
trunk-io[bot] merged 1 commit into
cockroachdb:release-26.2from
kyle-a-wong:blathers/backport-release-26.2-170293
May 21, 2026
Merged

release-26.2: roachtest: scope db-console endpoint IDs per test invocation#170654
trunk-io[bot] merged 1 commit into
cockroachdb:release-26.2from
kyle-a-wong:blathers/backport-release-26.2-170293

Conversation

@kyle-a-wong

Copy link
Copy Markdown
Contributor

Backport 1/1 commits from #170293 on behalf of @kyle-a-wong.


Summary

db-console/endpoints and db-console/mixed-version-endpoints are both
registered in the Nightly suite and can be picked up by separate roachtest
worker goroutines that share a single process (default --parallelism=10).
Both tests called initializeSchemaAndIDs, which wrote to the package-level
globals tableID, databaseID, and fingerprintID. The mixed-version test
re-ran initialization on every InMixedVersion upgrade step.

Because the two tests run against different clusters whose tpcc database/table
land at different IDs (a fresh v26.x cluster gives tpcc id ~104; a cluster
started at v24.3 and upgraded through migrations lands much higher), one
worker's writes silently corrupted the other worker's substitutions in
fillPlaceholders. The observed symptom in #170167initializeSchemaAndIDs
logs databaseID: 104 but the URL is built with database_metadata/170/
matches a write between the log and the placeholder substitution exactly.

This change replaces the globals with an endpointIDs value returned from
initializeSchemaAndIDs and threaded through testEndpoints
testEndpointfillPlaceholders. The DEBUG-404 logging block added in
a9b7a41 is left in place for one more confirming run; it can be removed
in a follow-up.

Fixes: #170167

Epic: none
Release note: None


Release justification:

`db-console/endpoints` and `db-console/mixed-version-endpoints` are both
registered in the Nightly suite and can be picked up by separate roachtest
worker goroutines that share a single process (default `--parallelism=10`).
Both tests called `initializeSchemaAndIDs`, which wrote to the package-level
globals `tableID`, `databaseID`, and `fingerprintID`. The mixed-version test
re-ran initialization on every `InMixedVersion` upgrade step.

Because the two tests run against different clusters whose tpcc database/table
land at different IDs (a fresh v26.x cluster gives tpcc id ~104; a cluster
started at v24.3 and upgraded through migrations lands much higher), one
worker's writes silently corrupted the other worker's substitutions in
`fillPlaceholders`. The observed symptom in cockroachdb#170167 — `initializeSchemaAndIDs`
logs `databaseID: 104` but the URL is built with `database_metadata/170/` —
matches a write between the log and the placeholder substitution exactly.

Replace the globals with an `endpointIDs` value returned from
`initializeSchemaAndIDs` and threaded through `testEndpoints` →
`testEndpoint` → `fillPlaceholders`.

Fixes: cockroachdb#170167

Release note: None
@kyle-a-wong kyle-a-wong force-pushed the blathers/backport-release-26.2-170293 branch from 8abe3c8 to 718c58e Compare May 20, 2026 15:53
@blathers-crl blathers-crl Bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels May 20, 2026
@trunk-io

trunk-io Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

😎 Merged successfully - details.

@blathers-crl

blathers-crl Bot commented May 20, 2026

Copy link
Copy Markdown

Thanks for opening a backport.

Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate.

@blathers-crl blathers-crl Bot added backport Label PR's that are backports to older release branches T-observability labels May 20, 2026
@cockroach-teamcity

Copy link
Copy Markdown
Member

This change is Reviewable

@blathers-crl blathers-crl Bot added the backport-test-only Used to denote the backport has only non-production changes label May 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

/trunk merge

@trunk-io trunk-io Bot merged commit 5f8a78e into cockroachdb:release-26.2 May 21, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches backport-test-only Used to denote the backport has only non-production changes blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. T-observability v26.2.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants