Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade elixir in ci #261

Merged
merged 3 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
strategy:
matrix:
k8s_version: [v1.27.1]
elixir: [1.14.x]
otp: [26.x]
steps:
- uses: actions/checkout@v3.5.3

Expand All @@ -29,8 +27,10 @@ jobs:
- name: Setup elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}}
otp-version: ${{matrix.otp}}
version-file: .tool-versions
version-type: strict
install-rebar: true
install-hex: true

- name: Retrieve Build Cache
uses: actions/cache@v3
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/elixir_matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ jobs:
matrix:
# See https://hexdocs.pm/elixir/1.13/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp
otp: ["23.x", "24.x", "25.x", "26.x"]
elixir: ["1.14.x"]
elixir: ["1.14.x", "1.15.x"]
exclude:
# OTP 23
- elixir: "1.15.x"
otp: "23.x"

steps:
- uses: actions/checkout@v3.5.3
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/k8s_matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
strategy:
matrix:
k8s_version: [v1.22.17, v1.23.17, v1.24.12, v1.25.8, v1.26.3, v1.27.1]
otp: [26.x]
elixir: [1.14.x]
steps:
- uses: engineerd/setup-kind@v0.5.0
id: kind
Expand All @@ -23,22 +21,24 @@ jobs:
- uses: actions/checkout@v3.5.3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
version-file: .tool-versions
version-type: strict
install-rebar: true
install-hex: true

- name: Retrieve Build Cache
uses: actions/cache@v3
id: build-folder-cache
with:
path: _build
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v3
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- run: mix local.rebar --force
- run: mix local.hex --force
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
erlang 26.0.1
elixir 1.14.5
elixir 1.15.0
k3d 5.4.6
kind 0.18.0
6 changes: 3 additions & 3 deletions lib/k8s/client/mint/http_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ defmodule K8s.Client.Mint.HTTPAdapter do
{:noreply, struct!(state, conn: conn)}

{:error, conn, error} ->
Logger.warn(
Logger.warning(
log_prefix(
"An error occurred when streaming the request body: #{Exception.message(error)}"
),
Expand All @@ -281,7 +281,7 @@ defmodule K8s.Client.Mint.HTTPAdapter do
struct!(state, conn: conn)

{:error, conn, error, responses} ->
Logger.warn(
Logger.warning(
log_prefix(
"An error occurred when streaming the response: #{Exception.message(error)}"
),
Expand Down Expand Up @@ -339,7 +339,7 @@ defmodule K8s.Client.Mint.HTTPAdapter do
Process.send_after(self(), :healthcheck, @healthcheck_freq * 1_000)
{:noreply, state}
else
Logger.warn(
Logger.warning(
log_prefix("Connection closed for reading and writing - stopping this process."),
library: :k8s
)
Expand Down
10 changes: 5 additions & 5 deletions lib/k8s/client/runner/stream/watch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ defmodule K8s.Client.Runner.Stream.Watch do
{:ok, stream}
else
error when retries > 0 ->
Logger.warn(
Logger.warning(
log_prefix(
"Error when starting stream. Waiting #{@time_before_retry}s before retrying. #{retries} retries left."
),
Expand All @@ -91,7 +91,7 @@ defmodule K8s.Client.Runner.Stream.Watch do
do_resource(conn, operation, http_opts, resource_version, retries - 1)

error ->
Logger.warn(log_prefix("Error when starting stream."), library: :k8s, error: error)
Logger.warning(log_prefix("Error when starting stream."), library: :k8s, error: error)
error
end
end
Expand All @@ -113,7 +113,7 @@ defmodule K8s.Client.Runner.Stream.Watch do
end

defp reduce({:error, reason}, state) do
Logger.warn(
Logger.warning(
log_prefix(
"Error #{inspect(reason)} received from the watcher. Waiting #{@time_before_retry} before restarting the watcher"
),
Expand All @@ -129,7 +129,7 @@ defmodule K8s.Client.Runner.Stream.Watch do
end

defp reduce({:status, 410}, state) do
Logger.warn(
Logger.warning(
log_prefix("410 Gone received from watcher - resetting the resource version"),
library: :k8s
)
Expand All @@ -140,7 +140,7 @@ defmodule K8s.Client.Runner.Stream.Watch do
end

defp reduce({:status, status}, _state) do
Logger.warn(
Logger.warning(
log_prefix("Erronous async status #{status} received from watcher - aborting the watch"),
library: :k8s
)
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"},
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
"poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
"telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
"yamerl": {:hex, :yamerl, "0.10.0", "4ff81fee2f1f6a46f1700c0d880b24d193ddb74bd14ef42cb0bcf46e81ef2f8e", [:rebar3], [], "hexpm", "346adb2963f1051dc837a2364e4acf6eb7d80097c0f53cbdc3046ec8ec4b4e6e"},
Expand Down
6 changes: 3 additions & 3 deletions test/k8s/conn_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ defmodule K8s.ConnTest do
RequestOptions.generate(conn)

assert [Authorization: _bearer_token] = headers
assert [verify: :verify_none, cacertfile: '/etc/ssl/cert.pem'] = ssl_options
assert [verify: :verify_none, cacertfile: ~c"/etc/ssl/cert.pem"] = ssl_options
end

test "generates ssl_options for the given auth provider" do
Expand All @@ -179,7 +179,7 @@ defmodule K8s.ConnTest do

assert headers == []

assert [cert: _, key: _, verify: :verify_none, cacertfile: '/etc/ssl/cert.pem'] =
assert [cert: _, key: _, verify: :verify_none, cacertfile: ~c"/etc/ssl/cert.pem"] =
ssl_options
end

Expand All @@ -203,7 +203,7 @@ defmodule K8s.ConnTest do

assert headers == []

assert [cert: _, key: _, verify: :verify_none, cacertfile: '/etc/ssl/cert.pem'] =
assert [cert: _, key: _, verify: :verify_none, cacertfile: ~c"/etc/ssl/cert.pem"] =
ssl_options
end
end
Expand Down