Skip to content

Commit b25826a

Browse files
authored
fix: publish action, wrappers package issue, test of 15.8 image upgrade (#1324)
* fix: publish action * chore: cleanup * chore : trigger build on push * chore: trigger build * fix: correct the var in action * fix: git should be a nativeBuildInput and not buildInput * chore: trigger release and publish * chore: try to build and cache deps so that nix does not try to fetch on install * fix: we can build and cache clickouse-rs this way so as to not fetch it * chore: bump to release to staging * chore: trugger upgrade script publish * ichore: trigger release and publish at same time * chore: cleanup pr testing lines * chore: revert for post-pr
1 parent 31ec3d1 commit b25826a

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

.github/workflows/publish-nix-pgupgrade-scripts.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
- name: Grab release version
5050
id: process_release_version
5151
run: |
52-
VERSION=$(sudo nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
53-
VERSION=$(echo $PG_VERSION | tr -d '"') # Remove any surrounding quotes
52+
VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
53+
VERSION=$(echo $VERSION | tr -d '"') # Remove any surrounding quotes
5454
if [[ "${{ inputs.postgresVersion }}" != "" ]]; then
5555
VERSION=${{ inputs.postgresVersion }}
5656
fi
@@ -81,7 +81,6 @@ jobs:
8181
SLACK_COLOR: 'danger'
8282
SLACK_MESSAGE: 'Publishing pg_upgrade scripts failed'
8383
SLACK_FOOTER: ''
84-
8584
publish-prod:
8685
needs: prepare
8786
runs-on: ubuntu-latest
@@ -95,11 +94,13 @@ jobs:
9594
steps:
9695
- name: Checkout Repo
9796
uses: actions/checkout@v3
98-
97+
98+
- uses: DeterminateSystems/nix-installer-action@main
99+
99100
- name: Grab release version
100101
id: process_release_version
101102
run: |
102-
VERSION=$(sudo nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
103+
VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
103104
VERSION=$(echo $PG_VERSION | tr -d '"') # Remove any surrounding quotes
104105
if [[ "${{ inputs.postgresVersion }}" != "" ]]; then
105106
VERSION=${{ inputs.postgresVersion }}

ansible/tasks/stage2-setup-postgres.yml

-17
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
# sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install nixpkgs#openjdk11"
55
# It was decided to leave pljava disabled at https://github.com/supabase/postgres/pull/690 therefore removing this task
66

7-
- name: Install Git for Nix package management
8-
become: yes
9-
apt:
10-
name: git
11-
state: present
12-
update_cache: yes
13-
when: stage2_nix
14-
157
- name: Install Postgres from nix binary cache
168
become: yes
179
shell: |
@@ -42,15 +34,6 @@
4234
shell: |
4335
sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#{{postgresql_version}}_src"
4436
when: stage2_nix
45-
46-
- name: Remove Git after Nix package installations
47-
become: yes
48-
apt:
49-
name: git
50-
state: absent
51-
autoremove: yes
52-
purge: yes
53-
when: stage2_nix
5437

5538
- name: Set ownership and permissions for /etc/ssl/private
5639
become: yes

nix/ext/wrappers/default.nix

+6-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ buildPgrxExtension_0_12_6 rec {
2929
hash = "sha256-CkoNMoh40zbQL4V49ZNYgv3JjoNWjODtTpHn+L8DdZA=";
3030
};
3131

32-
nativeBuildInputs = [ pkg-config cargo ];
33-
buildInputs = [ openssl postgresql git ] ++ lib.optionals (stdenv.isDarwin) [
32+
nativeBuildInputs = [ pkg-config cargo git ];
33+
buildInputs = [ openssl postgresql ] ++ lib.optionals (stdenv.isDarwin) [
3434
darwin.apple_sdk.frameworks.CoreFoundation
3535
darwin.apple_sdk.frameworks.Security
3636
darwin.apple_sdk.frameworks.SystemConfiguration
@@ -52,7 +52,10 @@ buildPgrxExtension_0_12_6 rec {
5252

5353
cargoLock = {
5454
lockFile = "${src}/Cargo.lock";
55-
allowBuiltinFetchGit = true;
55+
allowBuiltinFetchGit = false;
56+
outputHashes = {
57+
"clickhouse-rs-1.1.0-alpha.1" = "sha256-G+v4lNP5eK2U45D1fL90Dq24pUSlpIysNCxuZ17eac0=";
58+
};
5659
};
5760

5861
buildAndTestSubdir = "wrappers";

0 commit comments

Comments
 (0)