ci: install AMI postgres profile via nix-env --set - #2309
Open
brainrake wants to merge 14 commits into
Open
Conversation
PostgreSQL Extension Dependency Analysis: PR #2309
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
brainrake
force-pushed
the
worktree-postgres-env-nix-set
branch
from
July 23, 2026 02:11
0f24caf to
6b01469
Compare
…file install Bundle psql/bin, pg_prove, supabase-groonga, and postgresql_src/_debug into a single postgres-*-profile derivation per major version, so the AMI build resolves and installs it with one nix-env --set instead of looping nix profile install over five separate flake attrs. Gatekeeper is not included here: it lives in the site-env-* profiles from #2283 instead, since it needs to roll out independently of a full AMI rebuild.
brainrake
force-pushed
the
worktree-postgres-env-nix-set
branch
from
July 23, 2026 02:16
5d6c4b9 to
1f57f4c
Compare
PostgreSQL Package Dependency Analysis: PR #2309
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…rofile.nix - Reformat the profile paths list per treefmt (pre-commit-run/treefmt-check were failing on all platforms). - Re-add gatekeeper (pam_jit_pg.so) to the profile for Linux, non-PG15 builds — it was dropped when the profile packages were introduced, which broke testinfra's test_jit_pam_module_installed for PG17/orioledb-17. - Move the postgres-profile package definitions into their own nix/packages/postgres-profile.nix, imported from default.nix, and rename postgres-<version>-profile to postgres-profile-<version>.
Temporary change to avoid colliding with real production version tags while manually triggering ami-release-nix.yml against this branch. Will be reverted once the AMI/smoke tests pass.
…erge Deliberately not adopting develop's version bump (.011/.158/.158) yet — the currently published AMIs are tagged with the old -site versions. Will switch to the real bumped versions once smoke tests against those AMIs pass.
The previous -site suffix broke platform's parseAMIVersion regex (expects a numeric 4th segment), causing every smoke test project to get stuck in COMING_UP regardless of engine/arch. Use an unused numeric patch number instead, consistent with the version format platform already parses correctly.
Renames nix/packages/postgres-profile.nix -> postgres-env.nix,
postgres-profile-{15,17,orioledb-17} packages -> postgres-env-*, and
updates ansible/tasks/stage2-setup-postgres.yml accordingly.
Collaborator
Author
|
Note: gatekeeper is baked into |
brainrake
marked this pull request as ready for review
July 31, 2026 02:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #2283 (site-profiles).
Summary
postgres-env-{15,17,orioledb-17}packages (nix/packages/postgres-env.nix) that bundle everything the AMI build installs for the postgres user:psql_<v>/bin,pg_prove,supabase-groonga,postgresql_<v>_src,postgresql_<v>_debug(Linux only), andgatekeeper(Linux, non-PG15) forpam_jit_pg.so.nix-env --set, which is what gives it history/generations and a "latest" pointer.ansible/tasks/stage2-setup-postgres.yml: replace the 5-itemnix profile installloop withnix build --print-out-paths(registered) followed bynix-env --setto install the resolved env into the profile.Switching to
nix-env --setavoids mixingnix profile install's manifest format withnix-env's on the same default profile path.Test plan
nix eval .#packages.aarch64-darwin.postgres-env-{15,17,orioledb-17}.name— all three packages evaluatenix build .#postgres-env-{15,17,orioledb-17}— all three build successfully; verifiedbin/psql,bin/pg_provepresent,gatekeeper'spam_jit_pg.sopresent for 17/orioledb-17nix-env --profile <scratch> --set <resolved store path>— profile correctly set to a single new generation,psql --versionworks from ittest_jit_pam_module_installed(testinfra) passes for PG17/orioledb-17