Skip to content

Use bundled PostgreSQL for CLI CI - #1392

Merged
bgentry merged 1 commit into
masterfrom
bg/windows-ci-postgres
Sep 26, 2026
Merged

bgentry merged 1 commit into
masterfrom
bg/windows-ci-postgres

Conversation

@bgentry

@bgentry bgentry commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Windows CLI CI installs PostgreSQL through Chocolatey on every run. A Chocolatey HTTP 503 failed the job on #1387 before any CLI commands ran.

Both hosted runner images already include PostgreSQL. Start Ubuntu's bundled service and create river_dev with the existing credentials. On Windows, initialize a fresh cluster from the binaries exposed by PGBIN, wait for startup, and add the bundled client tools to PATH. This removes the external PostgreSQL setup action and its package downloads from the CLI job.

The CLI job follows each runner image's PostgreSQL version. The separate Linux test matrix covers PostgreSQL 14–18.

@bgentry
bgentry force-pushed the bg/windows-ci-postgres branch 2 times, most recently from e31b348 to f3a59ee Compare September 26, 2026 00:34
@bgentry
bgentry requested a review from brandur September 26, 2026 00:56
@bgentry
bgentry enabled auto-merge (squash) September 26, 2026 00:56
@brandur

brandur commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Shouldn't this remove the Chocolatey install somewhere too?

@bgentry
bgentry force-pushed the bg/windows-ci-postgres branch from f3a59ee to 87254c2 Compare September 26, 2026 13:43
The CLI job installs PostgreSQL through a setup action on both
platforms, and its Windows Chocolatey download can fail before any
CLI commands run when the package feed is unavailable.

Start the PostgreSQL service already present on Ubuntu and set its
credentials and database. On Windows, initialize a fresh cluster from
the runner's bundled binaries and expose its client tools to later
steps. Both paths use the runner's PostgreSQL without a package
download. The separate database test matrix retains version coverage.
@bgentry
bgentry force-pushed the bg/windows-ci-postgres branch from 87254c2 to 72f32da Compare September 26, 2026 13:43
@bgentry

bgentry commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

@brandur it was the setup-postgres action that was using chocolatey under the hood to install a specific Postgres version. However, after interrogating Codex about this I realized that Postgres 17 is included on all GHA latest images. IMO that is good enough for the purposes of the CLI tests and we don’t need to worry about testing an exact latest PG version.

I switched to that approach here which should make the runs faster and more reliable.

@bgentry bgentry changed the title Use bundled PostgreSQL for Windows CLI CI Use bundled PostgreSQL for CLI CI Sep 26, 2026
@brandur

brandur commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Ah gotcha. Okay.

@bgentry
bgentry merged commit c58ee4b into master Sep 26, 2026
15 checks passed
@bgentry
bgentry deleted the bg/windows-ci-postgres branch September 26, 2026 19:59
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