From 2858820c995466f4c1a1e712d7ee211f471b5520 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Wed, 27 Aug 2025 08:18:52 +0200 Subject: [PATCH 01/11] Let's see --- .github/workflows/elixir.yml | 15 +++++++++++++-- test/plausible/stats/time_test.exs | 4 ++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 6205ffb3597f..10efea9223a2 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -114,13 +114,24 @@ jobs: - run: make minio if: env.MIX_ENV == 'test' - - run: mix test --include slow --include minio --include migrations --include kaffy_quirks --max-failures 1 --warnings-as-errors --partitions 6 + - run: | + mix test --include slow --include minio --include migrations --max-failures 1 --warnings-as-errors --partitions 6 | tee test_output.log + if grep -E '\.+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3} \[[^]]+\]' test_output.log; then + echo "The tests are prodcuing output, this usually indicates some error" + exit 1 + fi if: env.MIX_ENV == 'test' env: MINIO_HOST_FOR_CLICKHOUSE: "172.17.0.1" MIX_TEST_PARTITION: ${{ matrix.mix_test_partition }} - - run: mix test --include slow --include migrations --max-failures 1 --warnings-as-errors --partitions 4 + + - run: | + mix test --include slow --include migrations --max-failures 1 --warnings-as-errors --partitions 4 | tee test_output.log + if grep -E '\.+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3} \[[^]]+\]' test_output.log; then + echo "The tests are prodcuing output, this usually indicates some error" + exit 1 + fi if: env.MIX_ENV == 'ce_test' env: MIX_TEST_PARTITION: ${{ matrix.mix_test_partition }} diff --git a/test/plausible/stats/time_test.exs b/test/plausible/stats/time_test.exs index ba3dfb7a462b..ce65f6fc273c 100644 --- a/test/plausible/stats/time_test.exs +++ b/test/plausible/stats/time_test.exs @@ -4,8 +4,12 @@ defmodule Plausible.Stats.TimeTest do import Plausible.Stats.Time alias Plausible.Stats.DateTimeRange + require Logger + describe "time_labels/1" do test "with time:month dimension" do + Logger.warning("hi") + assert time_labels(%{ dimensions: ["visit:device", "time:month"], utc_time_range: DateTimeRange.new!(~D[2022-01-17], ~D[2022-02-01], "UTC"), From a885fc1c1a10bb82973af629c567bcb7765df84e Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Wed, 27 Aug 2025 08:23:25 +0200 Subject: [PATCH 02/11] test error --- test/plausible/stats/time_test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plausible/stats/time_test.exs b/test/plausible/stats/time_test.exs index ce65f6fc273c..219b94cd3649 100644 --- a/test/plausible/stats/time_test.exs +++ b/test/plausible/stats/time_test.exs @@ -8,7 +8,7 @@ defmodule Plausible.Stats.TimeTest do describe "time_labels/1" do test "with time:month dimension" do - Logger.warning("hi") + Logger.error("hi") assert time_labels(%{ dimensions: ["visit:device", "time:month"], From fb435d8e3567378b270057eff550c457d4b2690d Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Wed, 27 Aug 2025 08:26:56 +0200 Subject: [PATCH 03/11] Revert test changes --- test/plausible/stats/time_test.exs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/plausible/stats/time_test.exs b/test/plausible/stats/time_test.exs index 219b94cd3649..ba3dfb7a462b 100644 --- a/test/plausible/stats/time_test.exs +++ b/test/plausible/stats/time_test.exs @@ -4,12 +4,8 @@ defmodule Plausible.Stats.TimeTest do import Plausible.Stats.Time alias Plausible.Stats.DateTimeRange - require Logger - describe "time_labels/1" do test "with time:month dimension" do - Logger.error("hi") - assert time_labels(%{ dimensions: ["visit:device", "time:month"], utc_time_range: DateTimeRange.new!(~D[2022-01-17], ~D[2022-02-01], "UTC"), From 438ffd1e04578cac817d8cd6b2f5f2e47ec745f4 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Mon, 1 Sep 2025 08:49:32 +0200 Subject: [PATCH 04/11] Bump --- config/test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/test.exs b/config/test.exs index e14369e60ef9..e336763e4401 100644 --- a/config/test.exs +++ b/config/test.exs @@ -8,7 +8,7 @@ config :bcrypt_elixir, :log_rounds, 4 config :plausible, Plausible.Repo, pool: Ecto.Adapters.SQL.Sandbox, - pool_size: System.schedulers_online() * 2 + pool_size: System.schedulers_online() * 3 config :plausible, Plausible.ClickhouseRepo, loggers: [Ecto.LogEntry], From 753c0e310d308945c2c3d809112a2066b5fced57 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Fri, 12 Dec 2025 10:34:55 +0100 Subject: [PATCH 05/11] schedulers --- config/test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/test.exs b/config/test.exs index e336763e4401..17f97b139843 100644 --- a/config/test.exs +++ b/config/test.exs @@ -8,7 +8,7 @@ config :bcrypt_elixir, :log_rounds, 4 config :plausible, Plausible.Repo, pool: Ecto.Adapters.SQL.Sandbox, - pool_size: System.schedulers_online() * 3 + pool_size: System.schedulers_online() config :plausible, Plausible.ClickhouseRepo, loggers: [Ecto.LogEntry], From 3983ab2e7f756449aca154a50777c213fd21a053 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Fri, 12 Dec 2025 10:58:30 +0100 Subject: [PATCH 06/11] tmp --- test/test_helper.exs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_helper.exs b/test/test_helper.exs index 9dbbed101880..b1dc90028da5 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1,3 +1,5 @@ +IO.puts("Schedulers online #{System.schedulers_online()}") + if not Enum.empty?(Path.wildcard("lib/**/*_test.exs")) do raise "Oops, test(s) found in `lib/` directory. Move them to `test/`." end From 9548dd6e7f58f373a7f133498dcac8b41041654b Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Fri, 12 Dec 2025 12:23:05 +0100 Subject: [PATCH 07/11] Bump timex --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index a436efdefec7..5eb6309ee4b6 100644 --- a/mix.lock +++ b/mix.lock @@ -159,7 +159,7 @@ "telemetry_metrics": {:hex, :telemetry_metrics, "1.1.0", "5bd5f3b5637e0abea0426b947e3ce5dd304f8b3bc6617039e2b5a008adc02f8f", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e7b79e8ddfde70adb6db8a6623d1778ec66401f366e9a8f5dd0955c56bc8ce67"}, "telemetry_metrics_prometheus_core": {:hex, :telemetry_metrics_prometheus_core, "1.2.1", "c9755987d7b959b557084e6990990cb96a50d6482c683fb9622a63837f3cd3d8", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.6 or ~> 1.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "5e2c599da4983c4f88a33e9571f1458bf98b0cf6ba930f1dc3a6e8cf45d5afb6"}, "telemetry_poller": {:hex, :telemetry_poller, "1.3.0", "d5c46420126b5ac2d72bc6580fb4f537d35e851cc0f8dbd571acf6d6e10f5ec7", [:rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "51f18bed7128544a50f75897db9974436ea9bfba560420b646af27a9a9b35211"}, - "timex": {:hex, :timex, "3.7.11", "bb95cb4eb1d06e27346325de506bcc6c30f9c6dea40d1ebe390b262fad1862d1", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.20", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "8b9024f7efbabaf9bd7aa04f65cf8dcd7c9818ca5737677c7b76acbc6a94d1aa"}, + "timex": {:hex, :timex, "3.7.13", "0688ce11950f5b65e154e42b47bf67b15d3bc0e0c3def62199991b8a8079a1e2", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.26", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "09588e0522669328e973b8b4fd8741246321b3f0d32735b589f78b136e6d4c54"}, "tls_certificate_check": {:hex, :tls_certificate_check, "1.30.0", "ef9bdfcb5b551b747cad231a65ebd449623628bb72471c1d2aefcbbc5730683d", [:rebar3], [{:ssl_verify_fun, "~> 1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "dfbada8fddb80ae19b8aeaac34d95cfce98c91393b0db9c3ee079b488fd68d81"}, "tzdata": {:hex, :tzdata, "1.1.3", "b1cef7bb6de1de90d4ddc25d33892b32830f907e7fc2fccd1e7e22778ab7dfbc", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "d4ca85575a064d29d4e94253ee95912edfb165938743dbf002acdf0dcecb0c28"}, "ua_inspector": {:git, "https://github.com/plausible/ua_inspector.git", "25cba4c910e80d7c34bbb1bbb939372260d088e8", [branch: "sanitize-pre"]}, From 916ef88872f510c7ea3f9526c3ee07a8c8f86dc2 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Fri, 12 Dec 2025 12:32:12 +0100 Subject: [PATCH 08/11] ignore libcluster warning --- .github/workflows/elixir.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 10efea9223a2..0ddfe86f8a4a 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -116,7 +116,7 @@ jobs: if: env.MIX_ENV == 'test' - run: | mix test --include slow --include minio --include migrations --max-failures 1 --warnings-as-errors --partitions 6 | tee test_output.log - if grep -E '\.+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3} \[[^]]+\]' test_output.log; then + if grep -E '\.+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3} \[[^]]+\]' test_output.log | grep -v 'libcluster'; then echo "The tests are prodcuing output, this usually indicates some error" exit 1 fi @@ -128,7 +128,7 @@ jobs: - run: | mix test --include slow --include migrations --max-failures 1 --warnings-as-errors --partitions 4 | tee test_output.log - if grep -E '\.+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3} \[[^]]+\]' test_output.log; then + if grep -E '\.+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3} \[[^]]+\]' test_output.log | grep -v 'libcluster'; then echo "The tests are prodcuing output, this usually indicates some error" exit 1 fi From 01df032125a8c41df09f1a29fc2891e689ab5280 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Fri, 12 Dec 2025 12:35:18 +0100 Subject: [PATCH 09/11] fixup --- test/test_helper.exs | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/test_helper.exs b/test/test_helper.exs index b1dc90028da5..9dbbed101880 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1,5 +1,3 @@ -IO.puts("Schedulers online #{System.schedulers_online()}") - if not Enum.empty?(Path.wildcard("lib/**/*_test.exs")) do raise "Oops, test(s) found in `lib/` directory. Move them to `test/`." end From c483d557e48d3fff5491ffd52c8138f24480ba46 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Sun, 14 Dec 2025 11:44:29 +0100 Subject: [PATCH 10/11] fix typo --- .github/workflows/elixir.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 0ddfe86f8a4a..829a74d2b08c 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -117,7 +117,7 @@ jobs: - run: | mix test --include slow --include minio --include migrations --max-failures 1 --warnings-as-errors --partitions 6 | tee test_output.log if grep -E '\.+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3} \[[^]]+\]' test_output.log | grep -v 'libcluster'; then - echo "The tests are prodcuing output, this usually indicates some error" + echo "The tests are producing output, this usually indicates some error" exit 1 fi if: env.MIX_ENV == 'test' @@ -129,7 +129,7 @@ jobs: - run: | mix test --include slow --include migrations --max-failures 1 --warnings-as-errors --partitions 4 | tee test_output.log if grep -E '\.+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3} \[[^]]+\]' test_output.log | grep -v 'libcluster'; then - echo "The tests are prodcuing output, this usually indicates some error" + echo "The tests are producing output, this usually indicates some error" exit 1 fi if: env.MIX_ENV == 'ce_test' From 7483907a4b4a1c8e34e0d8364e26f444cb4adac4 Mon Sep 17 00:00:00 2001 From: Adam Rutkowski Date: Sun, 14 Dec 2025 11:45:40 +0100 Subject: [PATCH 11/11] Set shell: bash --- .github/workflows/elixir.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 829a74d2b08c..7a23c8cebfd8 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -120,6 +120,7 @@ jobs: echo "The tests are producing output, this usually indicates some error" exit 1 fi + shell: bash if: env.MIX_ENV == 'test' env: MINIO_HOST_FOR_CLICKHOUSE: "172.17.0.1" @@ -132,6 +133,7 @@ jobs: echo "The tests are producing output, this usually indicates some error" exit 1 fi + shell: bash if: env.MIX_ENV == 'ce_test' env: MIX_TEST_PARTITION: ${{ matrix.mix_test_partition }}