Skip to content

Commit ad9184e

Browse files
committed
version: 1.19.0-SNAPSHOT
1 parent 16a72e5 commit ad9184e

186 files changed

Lines changed: 1799 additions & 1056 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab/Release.md.template

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ EOF
4343
sh -x stackgres-k8s/ci/utils/update-version.sh "${VERSION}"
4444
```
4545
1. [ ] Update `CHANGELOG.md` (review commit messages to populate the changelog: `git log`)
46-
1. [ ] Add ${VERSION} section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions.properties`
46+
1. [ ] Add ${VERSION} section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions-${VERSION%.*}.properties`
4747
1. [ ] Check the changes to ensure everything is correct before commit:
4848
```
4949
git diff
@@ -246,15 +246,7 @@ $(
246246
```
247247
git push origin add-version-${NEXT_MINOR_VERSION}
248248
```
249-
1. [ ] Wait for the pipeline of `add-version-${NEXT_MINOR_VERSION}` branch to complete
250-
1. [ ] Merge local branch `add-version-${NEXT_MINOR_VERSION}` into `main`:
251-
```
252-
git checkout main && git pull && git merge --ff-only add-version-${NEXT_MINOR_VERSION}
253-
```
254-
1. [ ] Push `main` to origin:
255-
```
256-
git push
257-
```
249+
1. [ ] Create a MR using the link provided by the previous command (against the `main` branch) and merge it when all checks pass.
258250
1. [ ] Change scheduled pipeline description and `STACKGRES_PREVIOUS_VERSION` environment variable to test upgrade from version `${TO_REMOVE_MINOR_VERSION}` to version `${MINOR_VERSION}`: https://gitlab.com/ongresinc/stackgres/-/pipeline_schedules/237754/edit?id=237754
259251
1. [ ] Change scheduled pipeline description and `STACKGRES_VERSION` environment variable to test from version `${TO_REMOVE_MINOR_VERSION}` to version `${MINOR_VERSION}`: https://gitlab.com/ongresinc/stackgres/-/pipeline_schedules/262456/edit?id=262456 or https://gitlab.com/ongresinc/stackgres/-/pipeline_schedules/235791/edit?id=235791
260252
EOF

.gitlab/issue_templates/Beta Release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sh stackgres-k8s/ci/utils/generate-release-template.sh $VERSION
2929
sh -x stackgres-k8s/ci/utils/update-version.sh "1.18.0-beta1"
3030
```
3131
1. [ ] Update `CHANGELOG.md` (review commit messages to populate the changelog: `git log`)
32-
1. [ ] Add 1.18.0-beta1 section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions.properties`
32+
1. [ ] Add 1.18.0-beta1 section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions-${VERSION%.*}.properties`
3333
1. [ ] Check the changes to ensure everything is correct before commit:
3434
```
3535
git diff

.gitlab/issue_templates/GA Release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sh stackgres-k8s/ci/utils/generate-release-template.sh $VERSION
2929
sh -x stackgres-k8s/ci/utils/update-version.sh "1.18.0"
3030
```
3131
1. [ ] Update `CHANGELOG.md` (review commit messages to populate the changelog: `git log`)
32-
1. [ ] Add 1.18.0 section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions.properties`
32+
1. [ ] Add 1.18.0 section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions-${VERSION%.*}.properties`
3333
1. [ ] Check the changes to ensure everything is correct before commit:
3434
```
3535
git diff

.gitlab/issue_templates/Patch Release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sh stackgres-k8s/ci/utils/generate-release-template.sh $VERSION
2929
sh -x stackgres-k8s/ci/utils/update-version.sh "1.17.5"
3030
```
3131
1. [ ] Update `CHANGELOG.md` (review commit messages to populate the changelog: `git log`)
32-
1. [ ] Add 1.17.5 section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions.properties`
32+
1. [ ] Add 1.17.5 section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions-${VERSION%.*}.properties`
3333
1. [ ] Check the changes to ensure everything is correct before commit:
3434
```
3535
git diff

.gitlab/issue_templates/RC Release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sh stackgres-k8s/ci/utils/generate-release-template.sh $VERSION
2929
sh -x stackgres-k8s/ci/utils/update-version.sh "1.18.0-rc2"
3030
```
3131
1. [ ] Update `CHANGELOG.md` (review commit messages to populate the changelog: `git log`)
32-
1. [ ] Add 1.18.0-rc2 section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions.properties`
32+
1. [ ] Add 1.18.0-rc2 section in `doc/content/en/01-introduction/06-versions/_index.md` with values from `stackgres-k8s/src/common/src/main/resources/versions-${VERSION%.*}.properties`
3333
1. [ ] Check the changes to ensure everything is correct before commit:
3434
```
3535
git diff

stackgres-k8s/e2e/spec/dbops-security-upgrade

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ e2e_test_install() {
2828
VERSION_AS_NUMBER_1_15_0="$(get_version_as_number 1.15.0-SNAPSHOT)"
2929
VERSION_AS_NUMBER_1_16_0="$(get_version_as_number 1.16.0-SNAPSHOT)"
3030
VERSION_AS_NUMBER_1_17_0="$(get_version_as_number 1.17.0-SNAPSHOT)"
31-
VERSION_AS_NUMBER_1_18_0="$(get_version_as_number 1.18.0-SNAPSHOT)"
31+
VERSION_AS_NUMBER_1_17_2="$(get_version_as_number 1.17.2-SNAPSHOT)"
3232

3333
CLUSTER_CRD="sgclusters.stackgres.io"
3434

@@ -51,7 +51,7 @@ e2e_test_install() {
5151
PREVIOUS_PATRONI_IMAGE="$(printf %s "$PREVIOUS_PATRONI_IMAGE" | grep '/patroni\(-ext\)\?:v[0-9.]\+-pg')"
5252
if [ "$PREVIOUS_VERSION_AS_NUMBER" -ge "$VERSION_AS_NUMBER_1_15_0" ]
5353
then
54-
PREVIOUS_DISTRIBUTEDLOGS_PATRONI_IMAGE="$(printf '%s' "$PREVIOUS_PATRONI_IMAGE" | tail -n 1)"
54+
PREVIOUS_DISTRIBUTEDLOGS_PATRONI_IMAGE="$(printf '%s' "$PREVIOUS_PATRONI_IMAGE" | grep '/patroni\(-ext\)\?:v[0-9.]\+-pg17\.')"
5555
else
5656
PREVIOUS_DISTRIBUTEDLOGS_PATRONI_IMAGE="$(printf '%s' "$PREVIOUS_PATRONI_IMAGE" | grep '/patroni\(-ext\)\?:v[0-9.]\+-pg12\.')"
5757
fi
@@ -784,36 +784,9 @@ check_cluster_before_security_upgrade() {
784784
| del(.postgresql.pg_hba)
785785
')"
786786
fi
787-
jq -Sc '.
788-
| if .synchronous_mode then . else del(.synchronous_node_count) end
789-
| .postgresql.parameters = (.postgresql.parameters
790-
| if .ssl == null then .ssl = "on" else . end
791-
| if .ssl_cert_file == null then .ssl_cert_file = "/etc/ssl/tls.crt" else . end
792-
| if .ssl_key_file == null then .ssl_key_file = "/etc/ssl/tls.key" else . end
793-
| if .port == null then .port = "5432" else . end
794-
| if .autovacuum_vacuum_cost_delay == "2" then .autovacuum_vacuum_cost_delay = "2ms" else . end
795-
| if .checkpoint_timeout == "30" then .checkpoint_timeout = "30s" else . end
796-
| if .log_autovacuum_min_duration == "0" then .log_autovacuum_min_duration = "0ms" else . end
797-
| if .log_min_duration_statement == "1000" then .log_min_duration_statement = "1s" else . end
798-
| if .log_rotation_age == "30" then .log_rotation_age = "30min" else . end
799-
| if .log_rotation_size == "0" then .log_rotation_size = "0kB" else . end
800-
| if .log_temp_files == "0" then .log_temp_files = "0kB" else . end
801-
| if .track_activity_query_size == "4096" then .track_activity_query_size = "4kB" else . end
802-
| if .restore_command != null then .restore_command = null else . end)
803-
| .postgresql.recovery_conf = (if .postgresql.recovery_conf == null
804-
then { restore_command: "exec-with-env '"'backup'"' -- wal-g wal-fetch %f %p" }
805-
else .postgresql.recovery_conf end)
806-
| if (.postgresql | has("use_slots"))
807-
then .
808-
else .postgresql.use_slots = true end
809-
' "$PREVIOUS_PATRONI_CONFIG_PATH" > "$LOG_PATH/previous-patroni-config-filtered.json"
787+
PATRONI_CONFIG="$(printf %s "$PATRONI_CONFIG" | normalize_patroni_config)"
788+
normalize_patroni_config "$PREVIOUS_PATRONI_CONFIG_PATH" > "$LOG_PATH/previous-patroni-config-filtered.json"
810789
PREVIOUS_PATRONI_CONFIG="$(cat "$LOG_PATH/previous-patroni-config-filtered.json")"
811-
if [ "$CLUSTER_NAME" = "$DISTRIBUTEDLOGS_NAME" ]
812-
then
813-
PREVIOUS_PATRONI_CONFIG="$(printf '%s' "$PREVIOUS_PATRONI_CONFIG" | jq -Sc '.
814-
| del(.postgresql.recovery_conf)
815-
')"
816-
fi
817790
if [ "$CLUSTER_NAME" = "$DISTRIBUTEDLOGS_NAME" ] \
818791
&& [ "$PREVIOUS_VERSION_AS_NUMBER" -lt "$VERSION_AS_NUMBER_1_17_0" ]
819792
then
@@ -828,7 +801,7 @@ check_cluster_before_security_upgrade() {
828801
| del(.postgresql.parameters.ssl_key_file)
829802
')"
830803
fi
831-
if [ "$PREVIOUS_VERSION_AS_NUMBER" -lt "$VERSION_AS_NUMBER_1_18_0" ]
804+
if [ "$PREVIOUS_VERSION_AS_NUMBER" -lt "$VERSION_AS_NUMBER_1_17_2" ]
832805
then
833806
PREVIOUS_PATRONI_CONFIG="$(printf '%s' "$PREVIOUS_PATRONI_CONFIG" | jq -Sc '.
834807
| .postgresql.parameters.listen_addresses = "localhost,::1"
@@ -856,11 +829,10 @@ check_cluster_before_security_upgrade() {
856829
PGBOUNCER_CONFIG="$(kubectl get configmap -n "$CLUSTER_NAMESPACE" "$CLUSTER_NAME-connection-pooling-config" --template '{{ index .data "pgbouncer.ini" }}')"
857830
PGBOUNCER_CONFIG="$(printf '%s' "$PGBOUNCER_CONFIG")"
858831
cat "$PREVIOUS_PGBOUNCER_CONFIG_PATH" \
859-
| sed '\#^auth_user = #a client_tls_cert_file = /etc/ssl/tls.crt\nclient_tls_key_file = /etc/ssl/tls.key\nclient_tls_sslmode = prefer' \
860832
| sed '/server_check_query = ;/d' \
861833
| sed 's/stats_users = /server_check_query = ;\nstats_users = /' > "$LOG_PATH/previous-pgbouncer-config-filtered.ini"
862834
PREVIOUS_PGBOUNCER_CONFIG="$(cat "$LOG_PATH/previous-pgbouncer-config-filtered.ini")"
863-
if [ "$PREVIOUS_VERSION_AS_NUMBER" -lt "$VERSION_AS_NUMBER_1_18_0" ]
835+
if [ "$PREVIOUS_VERSION_AS_NUMBER" -lt "$VERSION_AS_NUMBER_1_17_2" ]
864836
then
865837
PGBOUNCER_CONFIG="$(printf '%s' "$PGBOUNCER_CONFIG" \
866838
| sed "s/listen_addr = [\"']\?127\.0\.0\.1.*/listen_addr = 127.0.0.1,::1/")"
@@ -1266,3 +1238,28 @@ check_returned_namespaces() {
12661238
[ "$NAMESPACES_IN_RESPONSE" = "$NAMESPACES_IN_K8S" ]
12671239
}
12681240
1241+
normalize_patroni_config() {
1242+
jq -Sc '.
1243+
| if .synchronous_mode then . else del(.synchronous_node_count) end
1244+
| .postgresql.parameters = (.postgresql.parameters
1245+
| if .ssl == null then .ssl = "on" else . end
1246+
| if .ssl_cert_file == null then .ssl_cert_file = "/etc/ssl/tls.crt" else . end
1247+
| if .ssl_key_file == null then .ssl_key_file = "/etc/ssl/tls.key" else . end
1248+
| if .port == null then .port = "5432" else . end
1249+
| if .autovacuum_vacuum_cost_delay == "2" then .autovacuum_vacuum_cost_delay = "2ms" else . end
1250+
| if .checkpoint_timeout == "30" then .checkpoint_timeout = "30s" else . end
1251+
| if .log_autovacuum_min_duration == "0" then .log_autovacuum_min_duration = "0ms" else . end
1252+
| if .log_min_duration_statement == "1000" then .log_min_duration_statement = "1s" else . end
1253+
| if .log_rotation_age == "30" then .log_rotation_age = "30min" else . end
1254+
| if .log_rotation_size == "0" then .log_rotation_size = "0kB" else . end
1255+
| if .log_temp_files == "0" then .log_temp_files = "0kB" else . end
1256+
| if .track_activity_query_size == "4096" then .track_activity_query_size = "4kB" else . end
1257+
| if .restore_command != null then .restore_command = null else . end)
1258+
| .postgresql.recovery_conf = (if .postgresql.recovery_conf == null
1259+
then { restore_command: "exec-with-env '"'backup'"' -- wal-g wal-fetch %f %p" }
1260+
else .postgresql.recovery_conf end)
1261+
| if (.postgresql | has("use_slots"))
1262+
then .
1263+
else .postgresql.use_slots = true end
1264+
' "$@"
1265+
}

stackgres-k8s/e2e/spec/operator-helm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ e2e_test() {
2727
run_test "Check that operator can be upgrade from 1st older minor version" check_operator_upgrade_first_old_minor
2828
run_test "Check that operator can be upgrade from 2nd older minor version" check_operator_upgrade_second_old_minor
2929
run_test "Check that operator can not be upgrade with an SGCluster that uses version 0.9.5" check_operator_upgrade_with_cluster_using_0_9_5
30-
run_test "Check that operator can be upgrade with an SGCluster that uses 1st and 2nd older minot versions" check_operator_upgrade_with_cluster_using_first_and_second_old_versions
30+
run_test "Check that operator can be upgrade with an SGCluster that uses 1st and 2nd older minor versions" check_operator_upgrade_with_cluster_using_first_and_second_old_versions
3131
run_test "Check that operator can be deleted" check_operator_delete
3232
run_test "Check that operator can be installed from outside" check_operator_install_outside
3333
run_test "Check that operator can be installed with load balancer" check_operator_install_load_balancer

stackgres-k8s/e2e/spec/previous/1.16/spec/abstract/sharded-dbops

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)