Skip to content

Commit 552528d

Browse files
aerosolruslandoga
andauthored
Bump elixir to 1.17.3 and OTP to 27.2.1 (#5040)
* Bump elixir to 1.17.3 and OTP to 27.2.1 To address erlang/otp#8588 * Bump cache * Bump secondary alpine * Try unzip due to `{:error, :bad_eocd}` on OTP 27.2.1 * jfc * Revert "jfc" This reverts commit 018d33f. * Revert "Try unzip due to `{:error, :bad_eocd}` on OTP 27.2.1" This reverts commit e04750f. * huh * Use Plausible.File.mv! * Another one * fixup * Format * Another one * Format * Update test/plausible/exports_test.exs Co-authored-by: ruslandoga <[email protected]> * Bump CI cache again --------- Co-authored-by: ruslandoga <[email protected]>
1 parent 2cc3615 commit 552528d

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

.github/workflows/elixir.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
env:
14-
CACHE_VERSION: v8
14+
CACHE_VERSION: v10
1515
PERSISTENT_CACHE_DIR: cached
1616

1717
jobs:

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
erlang 27.0
2-
elixir 1.17.1-otp-27
1+
erlang 27.2.1
2+
elixir 1.17.3-otp-27
33
nodejs 21.7.3

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# platform specific, it makes sense to build it in the docker
33

44
#### Builder
5-
FROM hexpm/elixir:1.17.1-erlang-27.0-alpine-3.20.1 AS buildcontainer
5+
FROM hexpm/elixir:1.17.3-erlang-27.2.1-alpine-3.20.5 AS buildcontainer
66

77
ARG MIX_ENV=ce
88

@@ -54,7 +54,7 @@ COPY rel rel
5454
RUN mix release plausible
5555

5656
# Main Docker Image
57-
FROM alpine:3.20.1
57+
FROM alpine:3.20.5
5858
LABEL maintainer="plausible.io <[email protected]>"
5959

6060
ARG BUILD_METADATA={}

test/plausible/exports_test.exs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ defmodule Plausible.ExportsTest do
8989
end)
9090

9191
assert {:ok, files} =
92-
:zip.unzip(to_charlist(Path.join(tmp_dir, "numbers.zip")), cwd: tmp_dir)
92+
:zip.unzip(to_charlist(Path.join(tmp_dir, "numbers.zip")),
93+
cwd: to_charlist(tmp_dir)
94+
)
9395

9496
assert Enum.map(files, &Path.basename/1) == ["1.csv", "2.csv"]
9597

@@ -137,8 +139,10 @@ defmodule Plausible.ExportsTest do
137139
end)
138140
end
139141

140-
assert {:error, :einval} =
141-
:zip.unzip(to_charlist(Path.join(tmp_dir, "failed.zip")), cwd: tmp_dir)
142+
assert {:error, :bad_eocd} =
143+
:zip.unzip(to_charlist(Path.join(tmp_dir, "failed.zip")),
144+
cwd: to_charlist(tmp_dir)
145+
)
142146
end
143147
end
144148
end

test/plausible/imported/csv_importer_test.exs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,17 +1228,19 @@ defmodule Plausible.Imported.CSVImporterTest do
12281228
)
12291229
)
12301230
else
1231-
File.rename!(context.local_path, Path.join(tmp_dir, "plausible-export.zip"))
1231+
Plausible.File.mv!(context.local_path, Path.join(tmp_dir, "plausible-export.zip"))
12321232
end
12331233

12341234
context
12351235
end
12361236

12371237
defp unzip_archive(%{tmp_dir: tmp_dir} = context) do
12381238
assert {:ok, files} =
1239-
:zip.unzip(to_charlist(Path.join(tmp_dir, "plausible-export.zip")), cwd: tmp_dir)
1239+
:zip.unzip(to_charlist(Path.join(tmp_dir, "plausible-export.zip")),
1240+
cwd: to_charlist(tmp_dir)
1241+
)
12401242

1241-
Map.put(context, :exported_files, files)
1243+
Map.put(context, :exported_files, Enum.map(files, &to_string/1))
12421244
end
12431245

12441246
defp upload_csvs(%{exported_files: files} = context) do

0 commit comments

Comments
 (0)