Skip to content

Conversation

@samrose
Copy link
Collaborator

@samrose samrose commented Jan 26, 2026

  1. latestOnly Parameter Support (d20cab0)
  • Added a latestOnly parameter that flows through makeOurPostgresPkgs → makePostgresBin → makePostgres
  • When latestOnly=true, only the latest version of each extension is built (instead of all historical versions)
  • Creates new psql_17_slim package using this parameter
  1. Extension Updates (db96c62)
  • Updated ~28 extension files in nix/ext/ to support the latestOnly parameter
  • Notable: wrappers alone has 13 versions → 1 when slim, saving significant space
  1. Supporting Files
  • Added nix/packages/image-size-analyzer.nix - tool to analyze image sizes
  • Added docs/plans/2026-01-21-psql-slim-latest-only.md - implementation plan
  • Added nix/docs/image-size-analyzer-usage.md - usage documentation
  • Updated Dockerfiles (Dockerfile-15, Dockerfile-17, Dockerfile-orioledb-17)
  • Various ansible config cleanups and renames

Expected Impact

  • Estimated size reduction: ~1GB+ (~40-60% smaller images)
  • Primary savings from multi-version extensions like wrappers (13→1 versions) + alpine vs ubuntu base image

Refactors Docker image testing and CLI smoke testing into reusable Nix packages that work both locally and in CI, while consolidating duplicated workflow logic.

Changes

New Nix Packages:

  • supabase-cli - Supabase CLI v2.75.0 fetched from GitHub releases (x86_64-linux, aarch64-linux, aarch64-darwin)
  • docker-image-test - Runs pg_regress tests against Docker images (replaces test-docker-image.sh usage)
  • cli-smoke-test - Runs Supabase CLI smoke tests against locally built images

New Shared GitHub Action:

  • .github/actions/check-docker-image-changes - Extracts duplicated change detection logic from both workflows

Updated Workflows:

  • docker-image-test.yml - Uses shared action and nix run .#docker-image-test
  • cli-smoke-test.yml - Uses shared action and nix run .#cli-smoke-test

Added to Nix Checks:

  • cli-smoke-test, docker-image-inputs, docker-image-test, supabase-cli added to flake checks for build validation

Usage

Run Docker image tests locally

nix run .#docker-image-test -- Dockerfile-17
nix run .#docker-image-test -- --no-build Dockerfile-15

Run CLI smoke tests locally

nix run .#cli-smoke-test -- 17
nix run .#cli-smoke-test -- --no-build 15

Benefits

  • Local development: Developers can run the same tests locally that CI runs
  • Single source of truth: Test logic defined once in Nix packages
  • Reduced duplication: Shared action for change detection
  • Better validation: Tooling packages included in nix checks/build matrix

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cli-image-reduce

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@samrose samrose force-pushed the cli-image-reduce branch 4 times, most recently from 8156401 to b364e2b Compare January 30, 2026 12:35
samrose and others added 15 commits February 3, 2026 09:53
Add latestOnly parameter that flows through makeOurPostgresPkgs,
makePostgresBin, and makePostgres functions. When true, this parameter
will enable building only the latest version of each extension.

Also adds psql_17_slim package that uses latestOnly=true.

feat(ext): add latestOnly support to pgvector

feat(ext): add latestOnly support to wrappers

Add latestOnly parameter to wrappers extension that:
- Filters versionsToUse when latestOnly=true to build only latest version
- Skips migration SQL file generation when latestOnly=true
- Skips previously packaged version symlinks when latestOnly=true
- Updates library count verification for slim builds (expects 2 files)
- Updates passthru metadata with versionsBuilt and latestOnly flag

This is part of the psql_17_slim implementation to reduce image size.

feat(ext): add latestOnly support to pg_graphql

feat(ext): add latestOnly support to pg_net
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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