Skip to content

Commit

Permalink
chore: upgrade elixir, otp and debian (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwittstruck authored Nov 17, 2024
1 parent 8dcc71e commit 10a1148
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 49 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/on_push_branch__execute_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# Currently, this need to be synced manually with the Dockerfile. In the future, the workflow should be changed,
# so that a development container is built from the Dockerfile, pushed, and then re-used in the following steps.
# This would also remove the need to install cmake manually in each step:
container: hexpm/elixir:1.15.8-erlang-26.2.5-debian-bullseye-20240513-slim
container: hexpm/elixir:1.17.3-erlang-27.1.2-debian-bookworm-20241111-slim

steps:
# See https://github.com/actions/checkout
Expand All @@ -39,7 +39,7 @@ jobs:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in
container: hexpm/elixir:1.15.8-erlang-26.2.5-debian-bullseye-20240513-slim
container: hexpm/elixir:1.17.3-erlang-27.1.2-debian-bookworm-20241111-slim

needs: build_deps

Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:

check_mix_format:
runs-on: ubuntu-latest
container: hexpm/elixir:1.15.8-erlang-26.2.5-debian-bullseye-20240513-slim
container: hexpm/elixir:1.17.3-erlang-27.1.2-debian-bookworm-20241111-slim

needs: build_deps

Expand All @@ -116,7 +116,7 @@ jobs:

check_mix_gettext_extract_up_to_date:
runs-on: ubuntu-latest
container: hexpm/elixir:1.15.8-erlang-26.2.5-debian-bullseye-20240513-slim
container: hexpm/elixir:1.17.3-erlang-27.1.2-debian-bookworm-20241111-slim

needs: build_deps

Expand All @@ -137,7 +137,7 @@ jobs:

check_mix_sobelow:
runs-on: ubuntu-latest
container: hexpm/elixir:1.15.8-erlang-26.2.5-debian-bullseye-20240513-slim
container: hexpm/elixir:1.17.3-erlang-27.1.2-debian-bookworm-20241111-slim

needs: build_deps

Expand All @@ -159,7 +159,7 @@ jobs:

check_mix_credo:
runs-on: ubuntu-latest
container: hexpm/elixir:1.15.8-erlang-26.2.5-debian-bullseye-20240513-slim
container: hexpm/elixir:1.17.3-erlang-27.1.2-debian-bookworm-20241111-slim

needs: build_deps

Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.15.8-otp-26
erlang 26.2.5
elixir 1.17.3-otp-27
erlang 27.1.2
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# - https://pkgs.org/ - resource for finding needed packages
# - Ex: hexpm/elixir:1.13.1-erlang-24.2-debian-bullseye-20210902-slim
#
ARG ELIXIR_VERSION=1.15.8
ARG OTP_VERSION=26.2.5
ARG DEBIAN_VERSION=bullseye-20240513-slim
ARG ELIXIR_VERSION=1.17.3
ARG OTP_VERSION=27.1.2
ARG DEBIAN_VERSION=bookworm-20241111-slim

ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"
Expand Down
30 changes: 11 additions & 19 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,18 @@ if config_env() != :test do
# disable on prod, because logger_json will take care of this. set to :debug for test and dev
ecto_log_level = if config_env() == :prod, do: false, else: :debug

# default ssl_opts:
ssl_opts = [
verify: :verify_peer,
depth: 3,
versions: [:"tlsv1.3"],
server_name_indication: String.to_charlist(System.get_env("DATABASE_HOST")),
customize_hostname_check: [
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
]
]

# either use system certificates or specify files:
ssl_opts =
if System.get_env("DATABASE_CERT_FILE") do
Logger.info("Loading DATABASE_CERT_FILE")
ssl_opts ++ [cacertfile: System.get_env("DATABASE_CERT_FILE")]
ssl_config =
if System.get_env("DATABASE_SSL", "true") == "true" do
if System.get_env("DATABASE_CERT_FILE") do
Logger.info("Loading DATABASE_CERT_FILE")
[cacertfile: System.get_env("DATABASE_CERT_FILE")]
else
Logger.info("Loading System Certificates")
[cacerts: :public_key.cacerts_get()]
end
else
Logger.info("Loading System Certificates")
ssl_opts ++ [cacerts: :public_key.cacerts_get()]
nil
end

config :mindwendel, Mindwendel.Repo,
Expand All @@ -79,8 +72,7 @@ if config_env() != :test do
url: System.get_env("DATABASE_URL"),
timeout: String.to_integer(System.get_env("DATABASE_TIMEOUT", "15000")),
log: ecto_log_level,
ssl: System.get_env("DATABASE_SSL", "true") == "true",
ssl_opts: ssl_opts
ssl: ssl_config

secret_key_base =
System.get_env("SECRET_KEY_BASE") ||
Expand Down
4 changes: 2 additions & 2 deletions elixir_buildpack.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
elixir_version=1.15.8
erlang_version=26.2.5
elixir_version=1.17.3
erlang_version=27.1.2
release=false
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Mindwendel.MixProject do
[
app: :mindwendel,
version: "0.2.9",
elixir: "~> 1.15.8",
elixir: "~> 1.17",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
Expand Down
10 changes: 5 additions & 5 deletions priv/gettext/de/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ msgstr "Keine Ideen? Hier gibts Gedankenanstöße!"
msgid "Idea created successfully"
msgstr "Idee erstellt"

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:53
#: lib/mindwendel_web/templates/layout/root.html.heex:53
#, elixir-autogen, elixir-format
msgid "New brainstorming"
msgstr "Neues Brainstorming"
Expand Down Expand Up @@ -154,7 +154,7 @@ msgstr "Sortiere nach Label"
msgid "Sort by likes"
msgstr "Sortiere nach Likes"

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:66
#: lib/mindwendel_web/templates/layout/root.html.heex:66
#, elixir-autogen, elixir-format
msgid "Your brainstormings"
msgstr "Deine Brainstormings"
Expand Down Expand Up @@ -332,7 +332,7 @@ msgstr "Achtung: Brainstormings werden %{available_until} nach dem letzten Zugri
msgid "Allow users to change the order of ideas"
msgstr "Nutzern das Verschieben und Sortieren von Ideen erlauben"

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:29
#: lib/mindwendel_web/templates/layout/root.html.heex:29
#, elixir-autogen, elixir-format
msgid "Back"
msgstr "Zurück"
Expand Down Expand Up @@ -558,14 +558,14 @@ msgstr "Zeige Idee"
msgid "Your comment"
msgstr "Kommentar"

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:86
#: lib/mindwendel_web/controllers/static_page_html/home.html.heex:75
#: lib/mindwendel_web/templates/layout/root.html.heex:86
#, elixir-autogen, elixir-format
msgid "Legal Disclosure"
msgstr "Impressum"

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:82
#: lib/mindwendel_web/controllers/static_page_html/home.html.heex:76
#: lib/mindwendel_web/templates/layout/root.html.heex:82
#, elixir-autogen, elixir-format
msgid "Privacy"
msgstr "Datenschutzerklärung"
Expand Down
10 changes: 5 additions & 5 deletions priv/gettext/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ msgstr ""
msgid "Idea created successfully"
msgstr ""

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:53
#: lib/mindwendel_web/templates/layout/root.html.heex:53
#, elixir-autogen, elixir-format
msgid "New brainstorming"
msgstr ""
Expand Down Expand Up @@ -153,7 +153,7 @@ msgstr ""
msgid "Sort by likes"
msgstr ""

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:66
#: lib/mindwendel_web/templates/layout/root.html.heex:66
#, elixir-autogen, elixir-format
msgid "Your brainstormings"
msgstr ""
Expand Down Expand Up @@ -331,7 +331,7 @@ msgstr ""
msgid "Allow users to change the order of ideas"
msgstr ""

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:29
#: lib/mindwendel_web/templates/layout/root.html.heex:29
#, elixir-autogen, elixir-format
msgid "Back"
msgstr ""
Expand Down Expand Up @@ -557,14 +557,14 @@ msgstr ""
msgid "Your comment"
msgstr ""

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:86
#: lib/mindwendel_web/controllers/static_page_html/home.html.heex:75
#: lib/mindwendel_web/templates/layout/root.html.heex:86
#, elixir-autogen, elixir-format
msgid "Legal Disclosure"
msgstr ""

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:82
#: lib/mindwendel_web/controllers/static_page_html/home.html.heex:76
#: lib/mindwendel_web/templates/layout/root.html.heex:82
#, elixir-autogen, elixir-format
msgid "Privacy"
msgstr ""
Expand Down
10 changes: 5 additions & 5 deletions priv/gettext/en/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ msgstr ""
msgid "Idea created successfully"
msgstr ""

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:53
#: lib/mindwendel_web/templates/layout/root.html.heex:53
#, elixir-autogen, elixir-format
msgid "New brainstorming"
msgstr ""
Expand Down Expand Up @@ -154,7 +154,7 @@ msgstr ""
msgid "Sort by likes"
msgstr ""

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:66
#: lib/mindwendel_web/templates/layout/root.html.heex:66
#, elixir-autogen, elixir-format
msgid "Your brainstormings"
msgstr ""
Expand Down Expand Up @@ -332,7 +332,7 @@ msgstr ""
msgid "Allow users to change the order of ideas"
msgstr "Allow users to change the order of ideas"

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:29
#: lib/mindwendel_web/templates/layout/root.html.heex:29
#, elixir-autogen, elixir-format
msgid "Back"
msgstr ""
Expand Down Expand Up @@ -558,14 +558,14 @@ msgstr ""
msgid "Your comment"
msgstr ""

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:86
#: lib/mindwendel_web/controllers/static_page_html/home.html.heex:75
#: lib/mindwendel_web/templates/layout/root.html.heex:86
#, elixir-autogen, elixir-format
msgid "Legal Disclosure"
msgstr ""

#: lib/mindwendel_web/components/../templates/layout/root.html.heex:82
#: lib/mindwendel_web/controllers/static_page_html/home.html.heex:76
#: lib/mindwendel_web/templates/layout/root.html.heex:82
#, elixir-autogen, elixir-format
msgid "Privacy"
msgstr ""
Expand Down
3 changes: 2 additions & 1 deletion test/mindwendel/idea_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ defmodule Mindwendel.IdeaTest do
end
end

@tag :skip
describe "#update_idea" do
@describetag :skip

setup do
%{idea: Factory.insert!(:idea)}
end
Expand Down

0 comments on commit 10a1148

Please sign in to comment.