Skip to content

fix: support base-image extension dependencies - #338

Open
ardentperf wants to merge 1 commit into
cloudnative-pg:mainfrom
ardentperf:x-ai/ardentperf/fix-extension-dependency-sources
Open

fix: support base-image extension dependencies#338
ardentperf wants to merge 1 commit into
cloudnative-pg:mainfrom
ardentperf:x-ai/ardentperf/fix-extension-dependency-sources

Conversation

@ardentperf

Copy link
Copy Markdown

Current code doesn't work if an extension dependency is in the base image. I ran into this while working on pg-stat-kcache and pgsentinel which both depend on pg_stat_statements.

We need to support both models - some dependencies are not in the base image (eg. pgrouting or mobilitydb)

Proposed behavior

Base-image dependencies use an explicit prefix in the existing
required_extensions field:

required_extensions = ["base-image:pg_stat_statements"]

For such a dependency:

  1. It is omitted from the generated extension image list.
  2. It remains in the generated database extension specification so the test database installs it from the base image.

Unprefixed dependencies retain the current local-repository behavior, and a missing unprefixed dependency remains an error.

Validation

  • DAGGER_SESSION_PORT=1 DAGGER_SESSION_TOKEN=test go test ./...
  • Dagger target discovery across all existing metadata files
  • Repository .github/workflows/test.yml unit-test job via act
  • Docker Buildx --check for pg-crash, pg-ivm, pgaudit, pgrouting, pgvector, postgis, timescaledb-oss, and wal2json

Keep local repository dependency resolution unchanged while allowing required PostgreSQL extensions supplied by the base image to be installed during testing without treating them as extension images.
@ardentperf
ardentperf requested a review from a team as a code owner September 12, 2026 20:45
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