From 83cf5427b07065571cf8e0fcfbf13c465c4f8cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Wed, 11 Sep 2024 16:14:19 +0200 Subject: [PATCH 1/7] Bump tzdata See: https://github.com/lau/tzdata/issues/148 --- mix.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mix.lock b/mix.lock index 2a5082b786..2ff68a7a47 100644 --- a/mix.lock +++ b/mix.lock @@ -105,7 +105,7 @@ "postgrex": {:hex, :postgrex, "0.16.5", "fcc4035cc90e23933c5d69a9cd686e329469446ef7abba2cf70f08e2c4b69810", [:mix], [{:connection, "~> 1.1", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "edead639dc6e882618c01d8fc891214c481ab9a3788dfe38dd5e37fd1d5fb2e8"}, "protobuf": {:hex, :protobuf, "0.12.0", "58c0dfea5f929b96b5aa54ec02b7130688f09d2de5ddc521d696eec2a015b223", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "75fa6cbf262062073dd51be44dd0ab940500e18386a6c4e87d5819a58964dc45"}, "quantum": {:hex, :quantum, "3.5.3", "ee38838a07761663468145f489ad93e16a79440bebd7c0f90dc1ec9850776d99", [:mix], [{:crontab, "~> 1.1", [hex: :crontab, repo: "hexpm", optional: false]}, {:gen_stage, "~> 0.14 or ~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.2", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "500fd3fa77dcd723ed9f766d4a175b684919ff7b6b8cfd9d7d0564d58eba8734"}, - "rambo": {:hex, :rambo, "0.3.4", "8962ac3bd1a633ee9d0e8b44373c7913e3ce3d875b4151dcd060886092d2dce7", [:mix], [], "hexpm", "0cc54ed089fbbc84b65f4b8a774224ebfe60e5c80186fafc7910b3e379ad58f1"}, + "rambo": {:git, "https://github.com/myobie/rambo.git", "e321db8e4f035f2a295ee2a5310dcb75034677ce", [ref: "e321db8e4f035f2a295ee2a5310dcb75034677ce"]}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "recon": {:hex, :recon, "2.5.5", "c108a4c406fa301a529151a3bb53158cadc4064ec0c5f99b03ddb8c0e4281bdf", [:mix, :rebar3], [], "hexpm", "632a6f447df7ccc1a4a10bdcfce71514412b16660fe59deca0fcf0aa3c054404"}, "remote_ip": {:hex, :remote_ip, "1.2.0", "fb078e12a44414f4cef5a75963c33008fe169b806572ccd17257c208a7bc760f", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2ff91de19c48149ce19ed230a81d377186e4412552a597d6a5137373e5877cb7"}, @@ -130,7 +130,7 @@ "tesla": {:hex, :tesla, "1.11.2", "24707ac48b52f72f88fc05d242b1c59a85d1ee6f16f19c312d7d3419665c9cd5", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, ">= 1.0.0", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.2", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "c549cd03aec6a7196a641689dd378b799e635eb393f689b4bd756f750c7a4014"}, "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"}, "typed_ecto_schema": {:hex, :typed_ecto_schema, "0.4.1", "a373ca6f693f4de84cde474a67467a9cb9051a8a7f3f615f1e23dc74b75237fa", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}], "hexpm", "85c6962f79d35bf543dd5659c6adc340fd2480cacc6f25d2cc2933ea6e8fcb3b"}, - "tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"}, + "tzdata": {:hex, :tzdata, "1.1.2", "45e5f1fcf8729525ec27c65e163be5b3d247ab1702581a94674e008413eef50b", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "cec7b286e608371602318c414f344941d5eb0375e14cfdab605cca2fe66cba8b"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, "unidecode": {:hex, :unidecode, "1.0.1", "d653e7e9777b7c1bcf48b923bbbb9167ecd21a2a90aabb5a3c65b32c6a359497", [:mix], [], "hexpm", "73b490342603a5b1083e0f8f8b9e9bee4149ada327d1b9cdbaf8259f04699611"}, "unsafe": {:hex, :unsafe, "1.0.2", "23c6be12f6c1605364801f4b47007c0c159497d0446ad378b5cf05f1855c0581", [:mix], [], "hexpm", "b485231683c3ab01a9cd44cb4a79f152c6f3bb87358439c6f68791b85c2df675"}, From 46dbc7bde8394b72985d65789104894ce37268f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Thu, 12 Sep 2024 18:13:15 +0200 Subject: [PATCH 2/7] Remove left-over :focus tags --- apps/transport/test/transport/gtfs_data_test.exs | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/transport/test/transport/gtfs_data_test.exs b/apps/transport/test/transport/gtfs_data_test.exs index 6c74934ebf..82411c218f 100644 --- a/apps/transport/test/transport/gtfs_data_test.exs +++ b/apps/transport/test/transport/gtfs_data_test.exs @@ -43,7 +43,6 @@ defmodule Transport.GTFSDataTest do {data_import, resource, dataset} end - @tag :focus test "build_detailed for map" do {data_import, _resource, _dataset} = insert_gtfs_stops([{2.5, 48.5}]) @@ -65,7 +64,6 @@ defmodule Transport.GTFSDataTest do } end - @tag :focus test "build_detailed for API" do {data_import, resource, dataset} = insert_gtfs_stops([{2.5, 48.5}]) From 707a20c659e04a47ef22f927e2bfc117e3882615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Thu, 12 Sep 2024 18:14:11 +0200 Subject: [PATCH 3/7] Re-introduce test for #3820 It will catch the issue at least locally. But CI must likely be fixed to detect it. --- apps/transport/test/build_test.exs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/transport/test/build_test.exs b/apps/transport/test/build_test.exs index 2e4d57522a..32a2dcb842 100644 --- a/apps/transport/test/build_test.exs +++ b/apps/transport/test/build_test.exs @@ -33,6 +33,13 @@ defmodule TransportWeb.BuildTest do {:ok, %{out: "hello\n"}} = Rambo.run("echo", ["hello"]) end + test "rambo remains on hex version (not the ARM-compatible fork)" do + {%{rambo: rambo}, []} = File.read!("../../mix.lock") |> Code.eval_string() + # if this test fails, it may be because someone with a Mac M1 unintentionally committed `mix.lock` change + # related to a Rambo-tweak, see https://github.com/etalab/transport-site/blob/61eabf185e71b7670e5d750048714636f85c5e58/apps/transport/mix.exs#L99-L111 + assert rambo |> elem(0) == :hex + end + test "make sure Elixir version is same for asdf & CI" do assert System.version() == asdf_elixir_version() end From 7ae07d0288c242854e158a2dca7171dba7e1c851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Thu, 12 Sep 2024 18:59:40 +0200 Subject: [PATCH 4/7] Add temporary printf debugging (TM) to try to figure out the lack of failure on CI --- apps/transport/test/build_test.exs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/transport/test/build_test.exs b/apps/transport/test/build_test.exs index 32a2dcb842..a989ace0be 100644 --- a/apps/transport/test/build_test.exs +++ b/apps/transport/test/build_test.exs @@ -34,7 +34,11 @@ defmodule TransportWeb.BuildTest do end test "rambo remains on hex version (not the ARM-compatible fork)" do - {%{rambo: rambo}, []} = File.read!("../../mix.lock") |> Code.eval_string() + lock_file = File.read!("../../mix.lock") + IO.puts("============= here is the lock file =============") + IO.puts(lock_file) + IO.puts("=================================================") + {%{rambo: rambo}, []} = lock_file |> Code.eval_string() # if this test fails, it may be because someone with a Mac M1 unintentionally committed `mix.lock` change # related to a Rambo-tweak, see https://github.com/etalab/transport-site/blob/61eabf185e71b7670e5d750048714636f85c5e58/apps/transport/mix.exs#L99-L111 assert rambo |> elem(0) == :hex From 25546a186e68496ac4220955355ad33872db5936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Thu, 12 Sep 2024 19:09:16 +0200 Subject: [PATCH 5/7] Verify the destiny of the lock file (likely modified) --- apps/transport/test/build_test.exs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/transport/test/build_test.exs b/apps/transport/test/build_test.exs index a989ace0be..ada365b081 100644 --- a/apps/transport/test/build_test.exs +++ b/apps/transport/test/build_test.exs @@ -38,6 +38,10 @@ defmodule TransportWeb.BuildTest do IO.puts("============= here is the lock file =============") IO.puts(lock_file) IO.puts("=================================================") + {output, _} = System.cmd("git", ["status"]) + IO.puts(output) + IO.puts("=================================================") + {%{rambo: rambo}, []} = lock_file |> Code.eval_string() # if this test fails, it may be because someone with a Mac M1 unintentionally committed `mix.lock` change # related to a Rambo-tweak, see https://github.com/etalab/transport-site/blob/61eabf185e71b7670e5d750048714636f85c5e58/apps/transport/mix.exs#L99-L111 From d5d8ea394b62d0fcdb3e7e9017944213fda327be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Thu, 12 Sep 2024 22:30:19 +0200 Subject: [PATCH 6/7] Implement a CI-reproduction for #3820 --- apps/transport/test/build_test.exs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/transport/test/build_test.exs b/apps/transport/test/build_test.exs index ada365b081..3786223d38 100644 --- a/apps/transport/test/build_test.exs +++ b/apps/transport/test/build_test.exs @@ -34,15 +34,13 @@ defmodule TransportWeb.BuildTest do end test "rambo remains on hex version (not the ARM-compatible fork)" do - lock_file = File.read!("../../mix.lock") - IO.puts("============= here is the lock file =============") - IO.puts(lock_file) - IO.puts("=================================================") - {output, _} = System.cmd("git", ["status"]) - IO.puts(output) - IO.puts("=================================================") - - {%{rambo: rambo}, []} = lock_file |> Code.eval_string() + # NOTE: on ARM architecture (e.g. Mac M1 etc), a local commit can alter `mix.lock`, + # and we want to detect cases where this happens. See: + # https://github.com/etalab/transport-site/issues/3820 + # The test has to take the git-stored version of `mix.lock` and assert on its content, + # because the CI doesn't run ARM and `mix deps.get` will overwrite `mix.lock` at the moment + {output, 0} = System.cmd("git", ["show", "HEAD:../../mix.lock"]) + {%{rambo: rambo}, []} = output |> Code.eval_string() # if this test fails, it may be because someone with a Mac M1 unintentionally committed `mix.lock` change # related to a Rambo-tweak, see https://github.com/etalab/transport-site/blob/61eabf185e71b7670e5d750048714636f85c5e58/apps/transport/mix.exs#L99-L111 assert rambo |> elem(0) == :hex From a9baf6f52419d723c5c94ef8304a18e86cd3dc8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Thu, 12 Sep 2024 22:42:02 +0200 Subject: [PATCH 7/7] Fix regression (#3820) Co-authored-by: Antoine Augusti --- mix.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.lock b/mix.lock index 2ff68a7a47..ced627d17f 100644 --- a/mix.lock +++ b/mix.lock @@ -105,7 +105,7 @@ "postgrex": {:hex, :postgrex, "0.16.5", "fcc4035cc90e23933c5d69a9cd686e329469446ef7abba2cf70f08e2c4b69810", [:mix], [{:connection, "~> 1.1", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "edead639dc6e882618c01d8fc891214c481ab9a3788dfe38dd5e37fd1d5fb2e8"}, "protobuf": {:hex, :protobuf, "0.12.0", "58c0dfea5f929b96b5aa54ec02b7130688f09d2de5ddc521d696eec2a015b223", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "75fa6cbf262062073dd51be44dd0ab940500e18386a6c4e87d5819a58964dc45"}, "quantum": {:hex, :quantum, "3.5.3", "ee38838a07761663468145f489ad93e16a79440bebd7c0f90dc1ec9850776d99", [:mix], [{:crontab, "~> 1.1", [hex: :crontab, repo: "hexpm", optional: false]}, {:gen_stage, "~> 0.14 or ~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.2", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "500fd3fa77dcd723ed9f766d4a175b684919ff7b6b8cfd9d7d0564d58eba8734"}, - "rambo": {:git, "https://github.com/myobie/rambo.git", "e321db8e4f035f2a295ee2a5310dcb75034677ce", [ref: "e321db8e4f035f2a295ee2a5310dcb75034677ce"]}, + "rambo": {:hex, :rambo, "0.3.4", "8962ac3bd1a633ee9d0e8b44373c7913e3ce3d875b4151dcd060886092d2dce7", [:mix], [], "hexpm", "0cc54ed089fbbc84b65f4b8a774224ebfe60e5c80186fafc7910b3e379ad58f1"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "recon": {:hex, :recon, "2.5.5", "c108a4c406fa301a529151a3bb53158cadc4064ec0c5f99b03ddb8c0e4281bdf", [:mix, :rebar3], [], "hexpm", "632a6f447df7ccc1a4a10bdcfce71514412b16660fe59deca0fcf0aa3c054404"}, "remote_ip": {:hex, :remote_ip, "1.2.0", "fb078e12a44414f4cef5a75963c33008fe169b806572ccd17257c208a7bc760f", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2ff91de19c48149ce19ed230a81d377186e4412552a597d6a5137373e5877cb7"},