Skip to content

testutil: point latestPatchInSeries at the CockroachDB release catalog - #293

Merged
rail merged 2 commits into
mainfrom
rail/release-catalog
Sep 25, 2026
Merged

rail merged 2 commits into
mainfrom
rail/release-catalog

Conversation

@rail

@rail rail commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

internal/testutil/cluster.go's latestPatchInSeries resolves
CRDB_TEST_SERIES (used by CI's integration-test matrix) into a concrete
patch version by fetching CockroachDB release metadata. It read
cockroachdb/docs' releases.yml, which is now a stale mirror of the
CockroachDB release catalog
(https://binaries.cockroachdb.com/releases/v1/releases.yaml) and will
stop being maintained.

This switches the reader to the catalog:

  • The catalog's top level is a schema_version/releases mapping, not a
    bare list.
  • Releases are keyed by version, not release_name.
  • There's no cloud_only field to filter on; the catalog never lists
    cloud-only builds.
  • Added an HTTP status check and a schema_version check (must be 1),
    neither of which the old code had.

Checked old vs. new against live data for the two series this repo's CI
actually pins (25.4, 24.3): 24.3 is unchanged (v24.3.36), 25.4
now correctly resolves to the newer v25.4.17 instead of v25.4.16,
since the docs copy is missing that patch.

No other files in the repo reference the old schema.

The first commit replaces internal/http/testdata/{ca,node}.crt: node.crt expired on 2026-09-24, which fails TestClientTLSConfig on main too.

@cockroachlabs-cla-agent

cockroachlabs-cla-agent Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

testdata/node.crt expired on 2026-09-24, so TestClientTLSConfig fails:
"x509: certificate has expired or is not yet valid". The CA key was
never committed, so node.crt cannot be re-signed by the old CA;
ca.crt is replaced too.

The new certificates keep the subjects, key usages and extensions of
the old ones, and node.key is unchanged. The CA is valid for 20 years
and node.crt for 10, until 2036. node.crt no longer lists a developer
machine hostname as a SAN; the tests only need localhost.
StartCluster resolves "latest patch in a given series" by fetching
CockroachDB release metadata and picking the newest non-withdrawn
patch. It read cockroachdb/docs' releases.yml, which is now a stale
mirror of the CockroachDB release catalog
(https://binaries.cockroachdb.com/releases/v1/releases.yaml) and will
stop being maintained.

Switch to the catalog: its top level is a schema_version/releases
mapping rather than a bare list, releases are keyed by "version"
rather than "release_name", and there is no cloud_only field since the
catalog never lists cloud-only builds. Also check the HTTP status of
the download and reject any schema_version other than 1, neither of
which the old code did.
@rail
rail force-pushed the rail/release-catalog branch from d546398 to 0d59bbd Compare September 25, 2026 02:05
@rail
rail requested a review from sravotto September 25, 2026 02:09

@sravotto sravotto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - thanks for fixing this.

@rail
rail merged commit 73f3965 into main Sep 25, 2026
10 checks passed
@rail
rail deleted the rail/release-catalog branch September 25, 2026 10:37
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.

2 participants