From 3d20a75e9a6d0e67d185d173d1860414da51db4c Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Sun, 5 May 2024 15:59:07 -0400 Subject: [PATCH] patroni: 2.1.3 -> 3.3.0 https://github.com/zalando/patroni/blob/v3.3.0/docs/releases.rst#version-330 --- nixos/tests/patroni.nix | 2 +- pkgs/servers/sql/patroni/default.nix | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/nixos/tests/patroni.nix b/nixos/tests/patroni.nix index 1f15cd59677a..68fce4051553 100644 --- a/nixos/tests/patroni.nix +++ b/nixos/tests/patroni.nix @@ -155,7 +155,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: print(node.succeed("patronictl list cluster1")) node.wait_until_succeeds(f"[ $(patronictl list -f json cluster1 | jq 'length') == {expected_replicas + 1} ]") node.wait_until_succeeds("[ $(patronictl list -f json cluster1 | jq 'map(select(.Role | test(\"^Leader$\"))) | map(select(.State | test(\"^running$\"))) | length') == 1 ]") - node.wait_until_succeeds(f"[ $(patronictl list -f json cluster1 | jq 'map(select(.Role | test(\"^Replica$\"))) | map(select(.State | test(\"^running$\"))) | length') == {expected_replicas} ]") + node.wait_until_succeeds(f"[ $(patronictl list -f json cluster1 | jq 'map(select(.Role | test(\"^Replica$\"))) | map(select(.State | test(\"^streaming$\"))) | length') == {expected_replicas} ]") print(node.succeed("patronictl list cluster1")) client.wait_until_succeeds("psql -h 127.0.0.1 -U postgres --command='select 1;'") diff --git a/pkgs/servers/sql/patroni/default.nix b/pkgs/servers/sql/patroni/default.nix index 23c165ab545f..abf1ecbac053 100644 --- a/pkgs/servers/sql/patroni/default.nix +++ b/pkgs/servers/sql/patroni/default.nix @@ -6,24 +6,17 @@ pythonPackages.buildPythonApplication rec { pname = "patroni"; - version = "2.1.3"; + version = "3.3.0"; src = fetchFromGitHub { owner = "zalando"; repo = pname; rev = "v${version}"; - sha256 = "sha256-cBkiBrty/6A3rIv9A1oh8GvPjwxhHwYEKuDIsNzHw1g="; + sha256 = "sha256-gOjjE++hf3GOimvCxBR0jqqi3JNpbejLcWbLHpz2H4Q="; }; - # cdiff renamed to ydiff; remove when patroni source reflects this. - postPatch = '' - for i in requirements.txt patroni/ctl.py tests/test_ctl.py; do - substituteInPlace $i --replace cdiff ydiff - done - ''; - propagatedBuildInputs = with pythonPackages; [ - boto + boto3 click consul dnspython