Skip to content

test(repo): CI & docker caching optimizations, nx-aware infra, reliability fixes#2143

Open
mandarini wants to merge 10 commits intomasterfrom
test/optimizations
Open

test(repo): CI & docker caching optimizations, nx-aware infra, reliability fixes#2143
mandarini wants to merge 10 commits intomasterfrom
test/optimizations

Conversation

@mandarini
Copy link
Contributor

@mandarini mandarini commented Feb 27, 2026

Description

This PR introduces a series of test infrastructure optimizations and quality-of-life improvements across the Supabase JS monorepo, with a strong focus on performance, reliability, and developer experience:

CI/CD & Workflow Optimizations

  • Core CI Improvements: Refactors .github/workflows/ci-core.yml to introduce targeted, package-level affected tracking. Downstream, Docker/infra-heavy jobs now only run if their respective packages are actually changed, significantly reducing unnecessary build time.
  • Efficient Docker Image Caching: All Docker-compose jobs (core, integration, auth, storage, postgrest) now cache/load Docker images using actions/cache, avoiding repeated downloads and cold starts.
  • Parallelization: Auth, storage, and functions tests run in parallel where possible, speeding up overall pipeline execution. Integration between jobs is now based on actual Nx-affected projects.
  • Browser Caching: Puppeteer and Playwright browsers are now cached in .github/workflows/integration-tests.yml for faster integration test setup.
  • Test Coverage Aggregation: Ensures coverage is uploaded for all relevant packages and introduces a final "coverage-report" job to aggregate uploads.

Monorepo / Nx Configuration

  • Nx config updates: Adds new targets for functions-js, disables caching for CI jobs with external state (Docker/infra). Moves all test infra/start/stop commands under npx for consistent local and CI execution. Documents detailed Nx usage/conventions in CLAUDE.md for contributors.
  • Project Definitions: Adds project.json for functions-js.

Docker & Health Checks

  • Robust Compose Healthchecks: Updates test docker-compose for auth-js to use healthchecks, ensuring dependent services only start when Postgres is healthy. This speeds up and stabilizes startup, and enables docker compose up -d --wait for less fragile local/CI test runs.
  • Improved service dependencies: Moves to explicit health dependency syntax (switched from legacy array to mapping with health condition).

SDK/Code Improvements

  • Storage Signed URL: In StorageFileApi.ts, ensures image transformation signed URLs always hit the /render/image/sign/ endpoint, regardless of storage API version.
  • Error Handling: Unifies error object handling and status code extraction for new vs legacy Storage error instances.
  • Test reliability: Small bug fixes to error handling and start/stop commands for PostgREST and Storage.

Dependency Bumps

  • Bumps supabase CLI from 2.76.11 to 2.76.15 for latest fixes in all test environments.

Rationale

These changes collectively speed up CI, reduce infra flakiness, improve local reproducibility, and lay groundwork for even finer-grained Nx-based affected/parallel testing in the future.

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e6bdfe2 and 6b9bc26.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • .github/workflows/ci-core.yml
  • .github/workflows/integration-tests.yml
  • CLAUDE.md
  • nx.json
  • package.json
  • packages/core/auth-js/infra/docker-compose.yml
  • packages/core/auth-js/project.json
  • packages/core/functions-js/project.json
  • packages/core/postgrest-js/project.json
  • packages/core/storage-js/project.json
  • packages/core/storage-js/src/lib/common/fetch.ts
  • packages/core/storage-js/src/packages/StorageFileApi.ts

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced CI/CD pipeline with parallel testing and improved caching for faster builds.
    • Added health checks to test infrastructure for more reliable service startup.
  • Bug Fixes

    • Improved error handling for API responses.
    • Fixed signed URL generation for transformed images.
  • Chores

    • Updated Supabase dependency.

Walkthrough

This PR restructures the CI pipeline in ci-core.yml with affected package detection, parallel test execution, and conditional job gating to optimize build times. Docker image and browser binary caching are added to integration tests. Test infrastructure is updated to use npx supabase commands with explicit working directories and health checks in Docker Compose. Configuration changes include cache settings in nx.json, new test targets in project.json files, and a supabase devDependency version bump. Error handling in storage-js is improved to always attempt JSON parsing for response-like errors and normalize signed URLs for transformed assets.


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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2143

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2143

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2143

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2143

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2143

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2143

commit: f80b902

@mandarini mandarini self-assigned this Feb 27, 2026
@mandarini mandarini changed the title test(repo): optimizations test(repo): CI & docker caching optimizations, nx-aware infra, and reliability fixes Feb 27, 2026
@mandarini mandarini changed the title test(repo): CI & docker caching optimizations, nx-aware infra, and reliability fixes test(repo): CI & docker caching optimizations, nx-aware infra, reliability fixes Feb 27, 2026
@mandarini mandarini marked this pull request as ready for review February 27, 2026 17:45
@mandarini mandarini requested review from a team as code owners February 27, 2026 17:45
@mandarini mandarini enabled auto-merge (squash) February 27, 2026 17:55
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.

1 participant