From 8ae1d8bd4e9d4a548c833305dee59060ddc3ba07 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 15 Nov 2025 18:28:36 +0100 Subject: [PATCH 1/5] Elixir: Update to Erlang/OTP 28 and Elixir 1.19 --- .github/workflows/lang-elixir-postgrex.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lang-elixir-postgrex.yml b/.github/workflows/lang-elixir-postgrex.yml index 858f145f..50aae196 100644 --- a/.github/workflows/lang-elixir-postgrex.yml +++ b/.github/workflows/lang-elixir-postgrex.yml @@ -39,8 +39,16 @@ jobs: matrix: os: [ 'ubuntu-latest' ] cratedb-version: [ 'nightly' ] - otp-version: ['26', '27'] - elixir-version: ['1.17', '1.18'] + otp-version: [ + '26', + '27', + '28', + ] + elixir-version: [ + '1.17', + '1.18', + '1.19', + ] services: cratedb: From 1c58dc6f1c997816d5afadc5f5682ae5a1a82003 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 15 Nov 2025 18:55:00 +0100 Subject: [PATCH 2/5] Elixir: Improve test stability By using `ORDER BY VECTOR_SIMILARITY()` within the vector storage integration test, we hope for a better sorting stability, i.e. less flaky outcomes. --- by-language/elixir-postgrex/test/basic_test.exs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/by-language/elixir-postgrex/test/basic_test.exs b/by-language/elixir-postgrex/test/basic_test.exs index d2472df1..4a4d3434 100644 --- a/by-language/elixir-postgrex/test/basic_test.exs +++ b/by-language/elixir-postgrex/test/basic_test.exs @@ -90,9 +90,10 @@ defmodule CrateDBTest do SELECT id FROM testdrive.elixir WHERE knn_match(data, ?, 2) - ORDER BY id; - ", [[0.1, 0.2, 0.3]]) - assert [~c"*", ~c"+", ~c",", ~c"-"] == result.rows + ORDER BY VECTOR_SIMILARITY(data, ?) DESC + LIMIT 3; + ", [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) + assert [[42], [44], [45]] == result.rows end From 16ff4316c7a7c8dbe35e0434f9337fd507aa5975 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 15 Nov 2025 19:00:09 +0100 Subject: [PATCH 3/5] Elixir: Adjust version pinning and CI configuration - Elixir 1.17 is no longer supported on Erlang/OTP 28. - Relax Postgrex dependency to 0.21. --- .github/workflows/lang-elixir-postgrex.yml | 3 +++ by-language/elixir-postgrex/mix.exs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lang-elixir-postgrex.yml b/.github/workflows/lang-elixir-postgrex.yml index 50aae196..1f4a3003 100644 --- a/.github/workflows/lang-elixir-postgrex.yml +++ b/.github/workflows/lang-elixir-postgrex.yml @@ -49,6 +49,9 @@ jobs: '1.18', '1.19', ] + exclude: + - otp-version: '28' + elixir-version: '1.17' services: cratedb: diff --git a/by-language/elixir-postgrex/mix.exs b/by-language/elixir-postgrex/mix.exs index 6a820754..e9236f02 100644 --- a/by-language/elixir-postgrex/mix.exs +++ b/by-language/elixir-postgrex/mix.exs @@ -17,7 +17,7 @@ defmodule CrateDBExample.MixProject do defp deps() do [ {:jason, "~> 1.4"}, - {:postgrex, "~> 0.21.0"}, + {:postgrex, "~> 0.21"}, ] end From c05670f8d95241e3978a7395b766f4cca51d0d28 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 15 Nov 2025 19:15:29 +0100 Subject: [PATCH 4/5] Elixir: Stop testing on Erlang/OTP 26 and Elixir 1.17 --- .github/workflows/lang-elixir-postgrex.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/lang-elixir-postgrex.yml b/.github/workflows/lang-elixir-postgrex.yml index 1f4a3003..febd0c58 100644 --- a/.github/workflows/lang-elixir-postgrex.yml +++ b/.github/workflows/lang-elixir-postgrex.yml @@ -40,12 +40,10 @@ jobs: os: [ 'ubuntu-latest' ] cratedb-version: [ 'nightly' ] otp-version: [ - '26', '27', '28', ] elixir-version: [ - '1.17', '1.18', '1.19', ] From 7cea6ad79ad3de0d497732caed7e356944441e9e Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 15 Nov 2025 22:55:46 +0100 Subject: [PATCH 5/5] Elixir: Remove ineffective exclusion rule on CI, suggested by CodeRabbit --- .github/workflows/lang-elixir-postgrex.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/lang-elixir-postgrex.yml b/.github/workflows/lang-elixir-postgrex.yml index febd0c58..7fe884d4 100644 --- a/.github/workflows/lang-elixir-postgrex.yml +++ b/.github/workflows/lang-elixir-postgrex.yml @@ -47,9 +47,6 @@ jobs: '1.18', '1.19', ] - exclude: - - otp-version: '28' - elixir-version: '1.17' services: cratedb: