diff --git a/.github/workflows/bigquery-ded.yml b/.github/workflows/bigquery-ded.yml index 636dbeb61..a54fce797 100644 --- a/.github/workflows/bigquery-ded.yml +++ b/.github/workflows/bigquery-ded.yml @@ -5,7 +5,7 @@ on: types: [closed, unlabeled, labeled, synchronize] env: - NODE_VERSION: 14 + NODE_VERSION: 18.16 jobs: @@ -14,7 +14,7 @@ jobs: github.event.label.name == 'dedicated_bigquery' || (github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'dedicated_bigquery')) || (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'dedicated_bigquery')) - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 env: GCLOUD_VERSION: 500.0.0 diff --git a/.github/workflows/bigquery.yml b/.github/workflows/bigquery.yml index ad315d205..528953768 100644 --- a/.github/workflows/bigquery.yml +++ b/.github/workflows/bigquery.yml @@ -15,15 +15,15 @@ on: workflow_call: env: - NODE_VERSION: 14 - PYTHON3_VERSION: 3.8.10 - VIRTUALENV_VERSION: 20.21.1 + NODE_VERSION: 18.16 + PYTHON3_VERSION: 3.8.18 + VIRTUALENV_VERSION: 20.15.1 GCLOUD_VERSION: 500.0.0 jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 30 env: BQ_PREFIX: ci_${{ github.sha }}_${{ github.run_id }}_${{ github.run_attempt }}_ @@ -67,7 +67,7 @@ jobs: deploy-internal: if: github.ref_name == 'main' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 strategy: matrix: @@ -103,7 +103,7 @@ jobs: deploy: if: github.ref_name == 'stable' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 strategy: fail-fast: false @@ -148,7 +148,7 @@ jobs: publish: if: github.ref_name == 'stable' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 10 env: PACKAGE_BUCKET: gs://carto-analytics-toolbox-core/bigquery diff --git a/.github/workflows/databricks.yml b/.github/workflows/databricks.yml index 23ad6904a..8082f5f07 100644 --- a/.github/workflows/databricks.yml +++ b/.github/workflows/databricks.yml @@ -15,8 +15,8 @@ on: workflow_call: env: - PYTHON3_VERSION: 3.8.11 - VIRTUALENV_VERSION: 20.21.1 + PYTHON3_VERSION: 3.8.18 + VIRTUALENV_VERSION: 20.15.1 GCLOUD_VERSION: 500.0.0 GOOGLE_SECRET_MANAGER_PROJECT: ${{ secrets.GOOGLE_SECRET_MANAGER_PROJECT }} @@ -24,7 +24,7 @@ jobs: test: if: false - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 30 env: DB_PREFIX: ci_${{ github.sha }}_${{ github.run_id }}_${{ github.run_attempt }}_ @@ -71,7 +71,7 @@ jobs: deploy-internal: if: github.ref_name == 'main' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 strategy: matrix: @@ -120,7 +120,7 @@ jobs: publish: needs: test if: github.ref_name == 'stable' - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 10 env: PACKAGE_BUCKET: gs://carto-analytics-toolbox-core/databricks diff --git a/.github/workflows/postgres-ded.yml b/.github/workflows/postgres-ded.yml index db50fcc16..79bcae83d 100644 --- a/.github/workflows/postgres-ded.yml +++ b/.github/workflows/postgres-ded.yml @@ -6,8 +6,8 @@ on: env: NODE_VERSION: 14 - PYTHON3_VERSION: 3.8.10 - VIRTUALENV_VERSION: 20.21.1 + PYTHON3_VERSION: 3.8.18 + VIRTUALENV_VERSION: 20.15.1 jobs: @@ -16,7 +16,7 @@ jobs: github.event.label.name == 'dedicated_postgres' || (github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'dedicated_postgres')) || (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'dedicated_postgres')) - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 env: PG_HOST: ${{ secrets.PG_HOST_CD }} diff --git a/.github/workflows/postgres.yml b/.github/workflows/postgres.yml index 813c620d2..44fbe609e 100644 --- a/.github/workflows/postgres.yml +++ b/.github/workflows/postgres.yml @@ -16,14 +16,14 @@ on: env: NODE_VERSION: 14 - PYTHON3_VERSION: 3.8.10 - VIRTUALENV_VERSION: 20.21.1 + PYTHON3_VERSION: 3.8.18 + VIRTUALENV_VERSION: 20.15.1 GCLOUD_VERSION: 500.0.0 jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 30 env: PG_PREFIX: ci_${{ github.sha }}_${{ github.run_id }}_${{ github.run_attempt }}_ @@ -57,7 +57,7 @@ jobs: deploy-internal: if: github.ref_name == 'main' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 strategy: matrix: @@ -98,7 +98,7 @@ jobs: publish: if: github.ref_name == 'stable' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 10 env: PACKAGE_BUCKET: gs://carto-analytics-toolbox-core/postgres diff --git a/.github/workflows/redshift-ded.yml b/.github/workflows/redshift-ded.yml index 333159823..84e5b0e58 100644 --- a/.github/workflows/redshift-ded.yml +++ b/.github/workflows/redshift-ded.yml @@ -7,7 +7,7 @@ on: env: NODE_VERSION: 14 PYTHON2_VERSION: 2.7.18 - PYTHON3_VERSION: 3.8.10 + PYTHON3_VERSION: 3.8.18 VIRTUALENV_VERSION: 20.15.1 jobs: @@ -17,7 +17,7 @@ jobs: github.event.label.name == 'dedicated_redshift' || (github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'dedicated_redshift')) || (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'dedicated_redshift')) - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 container: python:2.7.18-buster timeout-minutes: 20 env: diff --git a/.github/workflows/redshift.yml b/.github/workflows/redshift.yml index 5fbe9a858..2242c3405 100644 --- a/.github/workflows/redshift.yml +++ b/.github/workflows/redshift.yml @@ -17,14 +17,14 @@ on: env: NODE_VERSION: 14 PYTHON2_VERSION: 2.7.18 - PYTHON3_VERSION: 3.8.10 + PYTHON3_VERSION: 3.8.18 VIRTUALENV_VERSION: 20.15.1 GCLOUD_VERSION: 500.0.0 jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 container: python:2.7.18-buster timeout-minutes: 30 env: @@ -75,7 +75,7 @@ jobs: deploy-internal: if: github.ref_name == 'main' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 container: python:2.7.18-buster timeout-minutes: 20 strategy: @@ -142,7 +142,7 @@ jobs: publish: if: github.ref_name == 'stable' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 container: python:2.7.18-buster timeout-minutes: 10 env: diff --git a/.github/workflows/snowflake-ded.yml b/.github/workflows/snowflake-ded.yml index d022bc061..ae5665774 100644 --- a/.github/workflows/snowflake-ded.yml +++ b/.github/workflows/snowflake-ded.yml @@ -14,7 +14,7 @@ jobs: github.event.label.name == 'dedicated_snowflake' || (github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'dedicated_snowflake')) || (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'dedicated_snowflake')) - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 env: SF_ACCOUNT: ${{ secrets.SF_ACCOUNT_CD }} diff --git a/.github/workflows/snowflake.yml b/.github/workflows/snowflake.yml index 456e76ea4..13416a010 100644 --- a/.github/workflows/snowflake.yml +++ b/.github/workflows/snowflake.yml @@ -17,13 +17,13 @@ on: env: NODE_VERSION: 18.16 PYTHON3_VERSION: 3.8.18 - VIRTUALENV_VERSION: 20.21.1 + VIRTUALENV_VERSION: 20.15.1 GCLOUD_VERSION: 500.0.0 jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 30 env: SF_PREFIX: ci_${{ github.sha }}_${{ github.run_id }}_${{ github.run_attempt }}_ @@ -58,7 +58,7 @@ jobs: deploy-internal: if: github.ref_name == 'main' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 strategy: matrix: @@ -91,7 +91,7 @@ jobs: deploy-internal-stable: if: github.ref_name == 'stable' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 strategy: matrix: @@ -124,7 +124,7 @@ jobs: deploy-internal-app: if: github.ref_name == 'main' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 30 env: APP_PACKAGE_NAME: ${{ secrets.SF_NATIVE_APP_PACKAGE_NAME_CD }} @@ -155,7 +155,7 @@ jobs: deploy-share: if: github.ref_name == 'stable' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 20 env: SF_ACCOUNT: ${{ secrets.SF_ACCOUNT_SHARE }} @@ -183,7 +183,7 @@ jobs: publish: if: github.ref_name == 'stable' needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 10 env: PACKAGE_BUCKET: gs://carto-analytics-toolbox-core/snowflake diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe33779a..755011411 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ CARTO Analytics Toolbox Core. All notable commits to this project will be documented in this file. +## 2025-04-30 + +- chore(bq,sf,rs|clustering): ST_CLUSTERKMEANS procedure throwing error for null geoms (#550) +- fix(rs): set autocommit in run_query function (#552) +- chore: update deprecated ubuntu image for ci (#553) + ## 2025-01-30 - chore(sf): deploy snowflake in CARTO.CARTO when releasing (#536) diff --git a/clouds/bigquery/CHANGELOG.md b/clouds/bigquery/CHANGELOG.md index 09929a730..dd09d3dfa 100644 --- a/clouds/bigquery/CHANGELOG.md +++ b/clouds/bigquery/CHANGELOG.md @@ -4,6 +4,10 @@ CARTO Analytics Toolbox Core for BigQuery. All notable commits to this project will be documented in this file. +## [1.2.6] - 2025-04-30 + +- chore(clustering): ST_CLUSTERKMEANS procedure throwing error for null geoms (#550) + ## [1.2.5] - 2025-01-30 - chore: add skip dependency tag in bigquery build_modules (#538) diff --git a/clouds/bigquery/modules/sql/clustering/ST_CLUSTERKMEANS.sql b/clouds/bigquery/modules/sql/clustering/ST_CLUSTERKMEANS.sql index 109b67a51..df97e9d49 100644 --- a/clouds/bigquery/modules/sql/clustering/ST_CLUSTERKMEANS.sql +++ b/clouds/bigquery/modules/sql/clustering/ST_CLUSTERKMEANS.sql @@ -12,6 +12,9 @@ AS """ if (!geojson) { return null; } + if (geojson.some(x => x === null)) { + throw new Error("No null geometries allowed in input array"); + } const options = {}; if (numberOfClusters != null) { options.numberOfClusters = Number(numberOfClusters); diff --git a/clouds/bigquery/version b/clouds/bigquery/version index c813fe116..3c43790f5 100644 --- a/clouds/bigquery/version +++ b/clouds/bigquery/version @@ -1 +1 @@ -1.2.5 +1.2.6 diff --git a/clouds/redshift/CHANGELOG.md b/clouds/redshift/CHANGELOG.md index 86dd8ef25..3cfd15cfa 100644 --- a/clouds/redshift/CHANGELOG.md +++ b/clouds/redshift/CHANGELOG.md @@ -4,6 +4,11 @@ CARTO Analytics Toolbox Core for Redshift. All notable commits to this project will be documented in this file. +## [1.1.3] - 2025-04-30 + +- chore(clustering): ST_CLUSTERKMEANS procedure throwing error for null geoms (#550) +- fix: set autocommit in run_query function (#552) + ## [1.1.2] - 2024-10-28 - chore(h3,quadbin): added "geo" aliases for certain functions (#526) diff --git a/clouds/redshift/common/test_utils/__init__.py b/clouds/redshift/common/test_utils/__init__.py index a547aedc0..71b757b20 100644 --- a/clouds/redshift/common/test_utils/__init__.py +++ b/clouds/redshift/common/test_utils/__init__.py @@ -13,6 +13,7 @@ def run_query(query): user=os.environ['RS_USER'], password=os.environ['RS_PASSWORD'], ) + conn.autocommit = True cursor = conn.cursor() cursor.execute(query.replace('@@RS_SCHEMA@@', os.environ['RS_SCHEMA'])) try: diff --git a/clouds/redshift/version b/clouds/redshift/version index 45a1b3f44..781dcb07c 100644 --- a/clouds/redshift/version +++ b/clouds/redshift/version @@ -1 +1 @@ -1.1.2 +1.1.3 diff --git a/clouds/snowflake/CHANGELOG.md b/clouds/snowflake/CHANGELOG.md index f0e703b58..465fe4a56 100644 --- a/clouds/snowflake/CHANGELOG.md +++ b/clouds/snowflake/CHANGELOG.md @@ -4,6 +4,10 @@ CARTO Analytics Toolbox Core for Snowflake. All notable commits to this project will be documented in this file. +## [1.2.7] - 2025-04-30 + +- chore(clustering): ST_CLUSTERKMEANS procedure throwing error for null geoms (#550) + ## [1.2.6] - 2024-10-28 - chore(h3,quadbin): added "geo" aliases for certain functions (#526) diff --git a/clouds/snowflake/version b/clouds/snowflake/version index 3c43790f5..c04c650a7 100644 --- a/clouds/snowflake/version +++ b/clouds/snowflake/version @@ -1 +1 @@ -1.2.6 +1.2.7