Skip to content

Commit

Permalink
chore: bump pg_graphql version (#1455)
Browse files Browse the repository at this point in the history
* chore: bump pg_graphql version

* chore: update our nix pkg for pg_graphql too (#1458)

* chore: bump version

---------

Co-authored-by: samrose <[email protected]>
  • Loading branch information
staaldraad and samrose authored Feb 21, 2025
1 parent 1436451 commit 32ccff5
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-15
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ARG rum_release=1.3.13
ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6
ARG libsodium_release=1.0.18
ARG pgsodium_release=3.1.6
ARG pg_graphql_release=1.5.1
ARG pg_graphql_release=1.5.11
ARG pg_stat_monitor_release=1.1.1
ARG pg_jsonschema_release=0.1.4
ARG pg_repack_release=1.4.8
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-orioledb-17
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ARG rum_release=1.3.13
ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6
ARG libsodium_release=1.0.18
ARG pgsodium_release=3.1.6
ARG pg_graphql_release=1.5.1
ARG pg_graphql_release=1.5.11
ARG pg_stat_monitor_release=1.1.1
ARG pg_jsonschema_release=0.1.4
ARG pg_repack_release=1.4.8
Expand Down
4 changes: 2 additions & 2 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ postgres_major:

# Full version strings for each major version
postgres_release:
postgresorioledb-17: "17.0.1.038-orioledb"
postgres15: "15.8.1.043"
postgresorioledb-17: "17.0.1.039-orioledb"
postgres15: "15.8.1.044"

# Non Postgres Extensions
pgbouncer_release: "1.19.0"
Expand Down
6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
buildPgrxExtension_0_12_6 = prev.buildPgrxExtension.override {
cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_12_6;
};

buildPgrxExtension_0_12_9 = prev.buildPgrxExtension.override {
cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_12_9;
};

})
(final: prev: {
postgresql = final.callPackage ./nix/postgresql/default.nix {
Expand Down Expand Up @@ -394,6 +399,7 @@
supabase-groonga = supabase-groonga;
cargo-pgrx_0_11_3 = pkgs.cargo-pgrx.cargo-pgrx_0_11_3;
cargo-pgrx_0_12_6 = pkgs.cargo-pgrx.cargo-pgrx_0_12_6;
cargo-pgrx_0_12_9 = pkgs.cargo-pgrx.cargo-pgrx_0_12_9;
# PostgreSQL versions.
psql_15 = postgresVersions.psql_15;
psql_orioledb-17 = postgresVersions.psql_orioledb-17;
Expand Down
5 changes: 5 additions & 0 deletions nix/cargo-pgrx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,10 @@ in
hash = "sha256-7aQkrApALZe6EoQGVShGBj0UIATnfOy2DytFj9IWdEA=";
cargoHash = "sha256-Di4UldQwAt3xVyvgQT1gUhdvYUVp7n/a72pnX45kP0w=";
};
cargo-pgrx_0_12_9 = generic {
version = "0.12.9";
hash = "sha256-aR3DZAjeEEAjLQfZ0ZxkjLqTVMIEbU0UiZ62T4BkQq8=";
cargoHash = "sha256-53HKhvsKLTa2JCByLEcK3UzWXoM+LTatd98zvS1C9no=";
};
inherit rustPlatform;
}
34 changes: 20 additions & 14 deletions nix/ext/pg_graphql.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
{ lib, stdenv, fetchFromGitHub, postgresql, buildPgrxExtension_0_12_6, cargo, rust-bin }:
{ lib, stdenv, fetchFromGitHub, postgresql, buildPgrxExtension_0_12_9, cargo, rust-bin }:

let
rustVersion = "1.80.0";
cargo = rust-bin.stable.${rustVersion}.default;
rustVersion = "nightly";
cargo = rust-bin.nightly.latest.default;
in
buildPgrxExtension_0_12_6 rec {
buildPgrxExtension_0_12_9 rec {
pname = "pg_graphql";
version = "1.5.9";
version = "1.5.11";
inherit postgresql;

src = fetchFromGitHub {
owner = "supabase";
repo = pname;
rev = "v${version}";
hash = "sha256-YpLN43FtLhp2cb7cyM+4gEx8GTwsRiKTfxaMq0b8hk0=";
hash = "sha256-BMZc9ui+2J3U24HzZZVCU5+KWhz+5qeUsRGeptiqbek=";
};

nativeBuildInputs = [ cargo ];
buildInputs = [ postgresql ];

CARGO="${cargo}/bin/cargo";
#darwin env needs PGPORT to be unique for build to not clash with other pgrx extensions
CARGO = "${cargo}/bin/cargo";

cargoLock = {
lockFile = "${src}/Cargo.lock";
};
# Setting RUSTFLAGS in env to ensure it's available for all phases
env = lib.optionalAttrs stdenv.isDarwin {
POSTGRES_LIB = "${postgresql}/lib";
RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup";
PGPORT = "5434";
RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup";
NIX_BUILD_CORES = "4"; # Limit parallel jobs
CARGO_BUILD_JOBS = "4"; # Limit cargo parallelism
};
cargoHash = "sha256-d2RSHtJgbYlOvArjOTaeYoca01UyWPUEO5vhktxxB6U=";
CARGO_BUILD_RUSTFLAGS = "--cfg tokio_unstable -C debuginfo=0";
CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG = true;

# FIXME (aseipp): disable the tests since they try to install .control
# files into the wrong spot, aside from that the one main test seems
# to work, though

doCheck = false;

meta = with lib; {
Expand All @@ -39,4 +45,4 @@ buildPgrxExtension_0_12_6 rec {
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
};
}
}

0 comments on commit 32ccff5

Please sign in to comment.