Skip to content

Commit

Permalink
chore: wip upgrade pgroonga to latest (#1418)
Browse files Browse the repository at this point in the history
* chore: wip upgrade pgroonga to latest

* chore: strings for staging tests of image

* chore: staging version

* chore: bump staging vrsion

* chore: GRN_PLUGINS_DIR env var

* chore: make sure nix available

* chore: no longer need sudo

* chore: bump version

* chore: bump upload artifact action
  • Loading branch information
samrose authored and darora committed Feb 5, 2025
1 parent 7bc57c7 commit cf928bb
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-release-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
run: |
echo "${{ steps.output_version.outputs.result }}" >> results.txt # Append results
- name: Upload Results Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: merge_results-${{ matrix.version }}
path: results.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- uses: DeterminateSystems/nix-installer-action@main

- name: Grab release version
id: process_release_version
run: |
VERSION=$(sudo nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
VERSION=$(echo $VERSION | tr -d '"') # Remove any surrounding quotes
if [[ "${{ inputs.postgresVersion }}" != "" ]]; then
VERSION=${{ inputs.postgresVersion }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ EOF
if [ "$IS_NIX_BASED_SYSTEM" = "true" ]; then
UPGRADE_COMMAND=". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && $UPGRADE_COMMAND"
fi
LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc "$UPGRADE_COMMAND --check" -s "$SHELL" postgres
GRN_PLUGINS_DIR=/var/lib/postgresql/.nix-profile/lib/groonga/plugins LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc "$UPGRADE_COMMAND --check" -s "$SHELL" postgres

echo "10. Stopping postgres; running pg_upgrade"
# Extra work to ensure postgres is actually stopped
Expand All @@ -435,7 +435,7 @@ EOF
CI_stop_postgres
fi

LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc "$UPGRADE_COMMAND" -s "$SHELL" postgres
GRN_PLUGINS_DIR=/var/lib/postgresql/.nix-profile/lib/groonga/plugins LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc "$UPGRADE_COMMAND" -s "$SHELL" postgres

# copying custom configurations
echo "11. Copying custom configurations"
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.030-orioledb"
postgres15: "15.8.1.034"
postgresorioledb-17: "17.0.1.31-orioledb"
postgres15: "15.8.1.035"

# Non Postgres Extensions
pgbouncer_release: "1.19.0"
Expand Down
4 changes: 2 additions & 2 deletions nix/ext/pgroonga.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ let
in
stdenv.mkDerivation rec {
pname = "pgroonga";
version = "3.0.7";
version = "3.2.5";
src = fetchurl {
url = "https://packages.groonga.org/source/${pname}/${pname}-${version}.tar.gz";
sha256 = "sha256-iF/zh4zDDpAw5fxW1WG8i2bfPt4VYsnYArwOoE/lwgM=";
sha256 = "sha256-GM9EOQty72hdE4Ecq8jpDudhZLiH3pP9ODLxs8DXcSY=";
};
nativeBuildInputs = [ pkg-config makeWrapper ];

Expand Down
23 changes: 22 additions & 1 deletion nix/tests/expected/z_15_ext_interface.out

Large diffs are not rendered by default.

23 changes: 22 additions & 1 deletion nix/tests/expected/z_17_ext_interface.out

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion nix/tools/run-client.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ while [[ "$#" -gt 0 ]]; do
exit 1
fi
;;
-p|--port)
if [[ -n "$2" && ! "$2" =~ ^- ]]; then
PORTNO="$2"
shift 2
else
echo "Error: --port requires an argument"
exit 1
fi
;;
-h|--help)
print_help
exit 0
Expand Down Expand Up @@ -106,7 +115,6 @@ export PATH=$BINDIR/bin:$PATH
export POSTGRES_DB=postgres
export POSTGRES_HOST=localhost

PORTNO="${2:-@PGSQL_DEFAULT_PORT@}"
PGSQL_SUPERUSER=@PGSQL_SUPERUSER@
MIGRATIONS_DIR=@MIGRATIONS_DIR@
POSTGRESQL_SCHEMA_SQL=@POSTGRESQL_SCHEMA_SQL@
Expand Down

0 comments on commit cf928bb

Please sign in to comment.