From 1288869185b52d1ac845f6ae122a70af9fd06a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20No=C3=ABl?= <21990816+philippemnoel@users.noreply.github.com> Date: Sat, 7 Dec 2024 17:41:25 -0500 Subject: [PATCH] feat: Upgrade ParadeDB to 0.13.1 (#63) --- charts/paradedb/Chart.yaml | 4 +-- charts/paradedb/README.md | 2 +- .../paradedb/examples/image-catalog-ref.yaml | 2 +- charts/paradedb/examples/image-catalog.yaml | 2 +- charts/paradedb/examples/paradedb.yaml | 4 +-- .../01-paradedb-NCC-1701-D_cluster.yaml | 2 +- .../paradedb-enterprise/02-paradedb_test.yaml | 18 ++++--------- .../paradedb-enterprise/chainsaw-test.yaml | 11 +++++++- .../01-paradedb_cluster.yaml | 2 +- .../02-paradedb_write.yaml | 16 +++--------- .../03-paradedb_test.yaml | 2 +- .../chainsaw-test.yaml | 26 ++++++++++++++++++- charts/paradedb/values.yaml | 4 +-- 13 files changed, 56 insertions(+), 39 deletions(-) diff --git a/charts/paradedb/Chart.yaml b/charts/paradedb/Chart.yaml index 1a9092b39..e6d1f3ade 100644 --- a/charts/paradedb/Chart.yaml +++ b/charts/paradedb/Chart.yaml @@ -20,8 +20,8 @@ icon: https://raw.githubusercontent.com/paradedb/paradedb/main/docs/logo/light.s type: application # The Chart version, set in the publish CI workflow from GitHub Actions Variables -# We default to v0.12.2 for testing and local development -version: 0.12.2 +# We default to v0.13.1 for testing and local development +version: 0.13.1 sources: - https://github.com/paradedb/charts diff --git a/charts/paradedb/README.md b/charts/paradedb/README.md index 37a52181e..3fc4d8438 100644 --- a/charts/paradedb/README.md +++ b/charts/paradedb/README.md @@ -307,7 +307,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat | recovery.secret.create | bool | `true` | Whether to create a secret for the backup credentials | | recovery.secret.name | string | `""` | Name of the backup credentials secret | | type | string | `"paradedb"` | Type of the CNPG database. Available types: * `paradedb` * `paradedb-enterprise` | -| version.paradedb | string | `"0.12.2"` | We default to v0.12.2 for testing and local development | +| version.paradedb | string | `"0.13.1"` | We default to v0.13.1 for testing and local development | | version.postgresql | string | `"17"` | PostgreSQL major version to use | | poolers[].name | string | `` | Name of the pooler resource | | poolers[].instances | number | `1` | The number of replicas we want | diff --git a/charts/paradedb/examples/image-catalog-ref.yaml b/charts/paradedb/examples/image-catalog-ref.yaml index d702d7fce..00d82045b 100644 --- a/charts/paradedb/examples/image-catalog-ref.yaml +++ b/charts/paradedb/examples/image-catalog-ref.yaml @@ -2,7 +2,7 @@ type: postgresql mode: standalone version: major: "17" - paradedb: "0.12.2" + paradedb: "0.13.1" cluster: instances: 1 imageCatalogRef: diff --git a/charts/paradedb/examples/image-catalog.yaml b/charts/paradedb/examples/image-catalog.yaml index b3125e57f..7f4d8a77c 100644 --- a/charts/paradedb/examples/image-catalog.yaml +++ b/charts/paradedb/examples/image-catalog.yaml @@ -2,7 +2,7 @@ type: postgresql mode: standalone version: major: "17" - paradedb: "0.12.2" + paradedb: "0.13.1" cluster: instances: 1 backups: diff --git a/charts/paradedb/examples/paradedb.yaml b/charts/paradedb/examples/paradedb.yaml index 5046469b0..c123d7d2d 100644 --- a/charts/paradedb/examples/paradedb.yaml +++ b/charts/paradedb/examples/paradedb.yaml @@ -1,8 +1,8 @@ type: paradedb mode: standalone version: - postgresql: "17.0" - paradedb: "0.12.2" + postgresql: "17" + paradedb: "0.13.1" cluster: instances: 1 backups: diff --git a/charts/paradedb/test/paradedb-enterprise/01-paradedb-NCC-1701-D_cluster.yaml b/charts/paradedb/test/paradedb-enterprise/01-paradedb-NCC-1701-D_cluster.yaml index d74c534c8..22d1c6da1 100644 --- a/charts/paradedb/test/paradedb-enterprise/01-paradedb-NCC-1701-D_cluster.yaml +++ b/charts/paradedb/test/paradedb-enterprise/01-paradedb-NCC-1701-D_cluster.yaml @@ -2,7 +2,7 @@ type: paradedb-enterprise mode: standalone version: major: "17" - paradedb: "0.12.2" + paradedb: "0.13.1" cluster: instances: 1 storage: diff --git a/charts/paradedb/test/paradedb-enterprise/02-paradedb_test.yaml b/charts/paradedb/test/paradedb-enterprise/02-paradedb_test.yaml index 950c33448..36716e801 100644 --- a/charts/paradedb/test/paradedb-enterprise/02-paradedb_test.yaml +++ b/charts/paradedb/test/paradedb-enterprise/02-paradedb_test.yaml @@ -22,23 +22,15 @@ spec: psql "$DB_URI" <<-EOSQL CALL paradedb.create_bm25_test_table( schema_name => 'public', - table_name => 'mock_items' - ); - CALL paradedb.create_bm25( - index_name => 'search_idx', - table_name => 'mock_items', - key_field => 'id', - text_fields => paradedb.field('description') || paradedb.field('category'), - numeric_fields => paradedb.field('rating'), - boolean_fields => paradedb.field('in_stock'), - datetime_fields => paradedb.field('created_at'), - json_fields => paradedb.field('metadata'), - range_fields => paradedb.field('weight_range') + table_name => 'mock_items_paradedb_enterprise' ); + CREATE INDEX search_idx_paradedb_enterprise_ ON mock_items_paradedb_enterprise + USING bm25 (id, description, category, rating, in_stock, created_at, metadata, weight_range) + WITH (key_field='id'); EOSQL RESULT=$(psql "$DB_URI" -t) <<-EOSQL SELECT description - FROM mock_items + FROM mock_items_paradedb_enterprise WHERE description @@@ '"bluetooth speaker"~1' LIMIT 1; EOSQL diff --git a/charts/paradedb/test/paradedb-enterprise/chainsaw-test.yaml b/charts/paradedb/test/paradedb-enterprise/chainsaw-test.yaml index 4c982523f..17c79f865 100644 --- a/charts/paradedb/test/paradedb-enterprise/chainsaw-test.yaml +++ b/charts/paradedb/test/paradedb-enterprise/chainsaw-test.yaml @@ -42,13 +42,22 @@ spec: - assert: file: 02-paradedb_test-assert.yaml catch: + - describe: + apiVersion: v1 + kind: Pod - describe: apiVersion: batch/v1 kind: Job - podLogs: - selector: batch.kubernetes.io/job-name=data-test + selector: cnpg.io/cluster=paradedb-ncc-1701-d - name: Cleanup try: - script: content: | helm uninstall --namespace $NAMESPACE paradedb-ncc-1701-d + catch: + - describe: + apiVersion: v1 + kind: Pod + - podLogs: + selector: cnpg.io/cluster=paradedb-ncc-1701-d diff --git a/charts/paradedb/test/paradedb-minio-backup-restore/01-paradedb_cluster.yaml b/charts/paradedb/test/paradedb-minio-backup-restore/01-paradedb_cluster.yaml index 856b0e731..51a405ea8 100644 --- a/charts/paradedb/test/paradedb-minio-backup-restore/01-paradedb_cluster.yaml +++ b/charts/paradedb/test/paradedb-minio-backup-restore/01-paradedb_cluster.yaml @@ -2,7 +2,7 @@ type: paradedb mode: standalone version: major: "17" - paradedb: "0.12.2" + paradedb: "0.13.1" cluster: instances: 2 storage: diff --git a/charts/paradedb/test/paradedb-minio-backup-restore/02-paradedb_write.yaml b/charts/paradedb/test/paradedb-minio-backup-restore/02-paradedb_write.yaml index 2ae6607a7..80e622b7e 100644 --- a/charts/paradedb/test/paradedb-minio-backup-restore/02-paradedb_write.yaml +++ b/charts/paradedb/test/paradedb-minio-backup-restore/02-paradedb_write.yaml @@ -22,17 +22,9 @@ spec: psql "$DB_URI" <<-EOSQL CALL paradedb.create_bm25_test_table( schema_name => 'public', - table_name => 'mock_items' - ); - CALL paradedb.create_bm25( - index_name => 'search_idx', - table_name => 'mock_items', - key_field => 'id', - text_fields => paradedb.field('description') || paradedb.field('category'), - numeric_fields => paradedb.field('rating'), - boolean_fields => paradedb.field('in_stock'), - datetime_fields => paradedb.field('created_at'), - json_fields => paradedb.field('metadata'), - range_fields => paradedb.field('weight_range') + table_name => 'mock_items_paradedb_minio_backup_restore' ); + CREATE INDEX search_idx_paradedb_minio_backup_restore ON mock_items_paradedb_minio_backup_restore + USING bm25 (id, description, category, rating, in_stock, created_at, metadata, weight_range) + WITH (key_field='id'); EOSQL diff --git a/charts/paradedb/test/paradedb-minio-backup-restore/03-paradedb_test.yaml b/charts/paradedb/test/paradedb-minio-backup-restore/03-paradedb_test.yaml index 8840d9d7c..502be690f 100644 --- a/charts/paradedb/test/paradedb-minio-backup-restore/03-paradedb_test.yaml +++ b/charts/paradedb/test/paradedb-minio-backup-restore/03-paradedb_test.yaml @@ -21,7 +21,7 @@ spec: apk --no-cache add postgresql-client RESULT=$(psql "$DB_URI" -t) <<-EOSQL SELECT description - FROM mock_items + FROM mock_items_paradedb_minio_backup_restore WHERE description @@@ '"bluetooth speaker"~1' LIMIT 1; EOSQL diff --git a/charts/paradedb/test/paradedb-minio-backup-restore/chainsaw-test.yaml b/charts/paradedb/test/paradedb-minio-backup-restore/chainsaw-test.yaml index 313b1285b..c7cba65e1 100644 --- a/charts/paradedb/test/paradedb-minio-backup-restore/chainsaw-test.yaml +++ b/charts/paradedb/test/paradedb-minio-backup-restore/chainsaw-test.yaml @@ -81,16 +81,40 @@ spec: kind: Job - podLogs: selector: batch.kubernetes.io/job-name=data-test - - name: Create a backup + - name: Start a backup try: - apply: file: ./05-backup.yaml - assert: file: ./05-backup_running-assert.yaml + catch: + - describe: + apiVersion: postgresql.cnpg.io/v1 + kind: Backup + - podLogs: + selector: cnpg.io/cluster=paradedb + - describe: + apiVersion: postgresql.cnpg.io/v1 + kind: Cluster + - podLogs: + selector: cnpg.io/cluster=paradedb-paradedb + - name: Complete a backup + try: - apply: file: ./05-checkpoint.yaml - assert: file: ./05-backup_completed-assert.yaml + catch: + - describe: + apiVersion: postgresql.cnpg.io/v1 + kind: Backup + - podLogs: + selector: cnpg.io/cluster=paradedb + - describe: + apiVersion: postgresql.cnpg.io/v1 + kind: Cluster + - podLogs: + selector: cnpg.io/cluster=paradedb-paradedb - name: Write more data to the database after the backup try: - apply: diff --git a/charts/paradedb/values.yaml b/charts/paradedb/values.yaml index c76c4de25..450c8ade8 100644 --- a/charts/paradedb/values.yaml +++ b/charts/paradedb/values.yaml @@ -13,8 +13,8 @@ version: # -- PostgreSQL major version to use postgresql: "17" # -- The ParadeDB version, set in the publish CI workflow from the latest paradedb/paradedb GitHub tag - # -- We default to v0.12.2 for testing and local development - paradedb: "0.12.2" + # -- We default to v0.13.1 for testing and local development + paradedb: "0.13.1" ### # -- Cluster mode of operation. Available modes: