Skip to content

Commit

Permalink
Elixir 1.15 (#997)
Browse files Browse the repository at this point in the history
* bump elixir and erlang

* changelog for elixir 1.15

* The elixir/1.15.4 image appears to have OTP26 already

---------

Co-authored-by: Stuart Corbishley <[email protected]>
  • Loading branch information
taylordowns2000 and stuartc authored Jul 31, 2023
1 parent 5f857e3 commit e4941f5
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
elixir_version:
description: Elixir version
type: string
default: "1.14.1"
default: "1.15.4" # Looks like it's pinned at OTP26
nodejs_version:
description: NodeJS version
type: string
Expand All @@ -46,7 +46,7 @@ jobs:
parallelism: 1
docker:
- image: elixir:<< parameters.elixir_version >>
- image: cimg/postgres:14.2
- image: cimg/postgres:15.3

steps:
- checkout
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
erlang 25.2
elixir 1.14.2-otp-25
erlang 26.0.2
elixir 1.15.4-otp-26
nodejs 18.12.0
k6 0.43.1
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ and this project adheres to

### Changed

- Moved to Elixir 1.15 and Erlang 26.0.2 to sort our an annoying ElixirLS issue
that was slowing down our engineers.

### Fixed

- Fix issue creating a new credential from the Job editor where the new
Expand Down
4 changes: 3 additions & 1 deletion lib/lightning/adaptor_service.ex
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ defmodule Lightning.AdaptorService do
"""
@callback list_local(path :: String.t()) :: list(Adaptor.t())
def list_local(path, _depth \\ 4) when is_binary(path) do
System.cmd("npm", ~w[list --global --json --long --prefix #{path}], env: [])
System.cmd("npm", ~w[list --global --json --long --prefix #{path}],
env: []
)
|> case do
{stdout, 0} ->
stdout
Expand Down
2 changes: 1 addition & 1 deletion lib/lightning/task_worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ defmodule Lightning.TaskWorker do
GenServer.start_link(__MODULE__, init_opts, opts)
end

@spec start_task(worker :: GenServer.name(), (() -> any)) ::
@spec start_task(worker :: GenServer.name(), (-> any)) ::
{:error, :too_many_processes} | term()
def start_task(worker, fun) when is_function(fun, 0) do
GenServer.call(worker, :checkout)
Expand Down
8 changes: 6 additions & 2 deletions lib/lightning_web/live/dataclip_live/form_component.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
>
<div class="grid grid-cols-6 gap-6">
<div class="col-span-3">
<%= label(f, :type, class: "block text-sm font-medium text-secondary-700") %>
<%= label(f, :type,
class: "block text-sm font-medium text-secondary-700"
) %>
<div class="flex w-full items-center gap-2 pb-3">
<div class="grow">
<.select_field
Expand All @@ -26,7 +28,9 @@
</div>
<div class="grid grid-cols-6 gap-6">
<div class="col-span-3">
<%= label(f, :body, class: "block text-sm font-medium text-secondary-700") %>
<%= label(f, :body,
class: "block text-sm font-medium text-secondary-700"
) %>
<%= textarea(f, :body,
disabled: true,
class:
Expand Down
2 changes: 1 addition & 1 deletion lib/mix/tasks/install_schemas.ex
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ defmodule Mix.Tasks.Lightning.InstallSchemas do
write_schema(dir, package_name, body)

{:ok, %HTTPoison.Response{status_code: status_code}} ->
Logger.warn(
Logger.warning(
"Unable to fetch #{package_name} configuration schema. status=#{status_code}"
)
end
Expand Down
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 Lightning.MixProject do
[
app: :lightning,
version: "0.7.0",
elixir: "~> 1.13",
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),
start_permanent: Mix.env() == :prod,
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"sentry": {:hex, :sentry, "8.0.6", "c8de1bf0523bc120ec37d596c55260901029ecb0994e7075b0973328779ceef7", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "051a2d0472162f3137787c7c9d6e6e4ef239de9329c8c45b1f1bf1e9379e1883"},
"sleeplocks": {:hex, :sleeplocks, "1.1.2", "d45aa1c5513da48c888715e3381211c859af34bee9b8290490e10c90bb6ff0ca", [:rebar3], [], "hexpm", "9fe5d048c5b781d6305c1a3a0f40bb3dfc06f49bf40571f3d2d0c57eaa7f59a5"},
"sobelow": {:hex, :sobelow, "0.11.1", "23438964486f8112b41e743bbfd402da3e5b296fdc9eacab29914b79c48916dd", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "9897363a7eff96f4809304a90aad819e2ad5e5d24db547af502885146746a53c"},
"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"},
"sweet_xml": {:hex, :sweet_xml, "0.7.3", "debb256781c75ff6a8c5cbf7981146312b66f044a2898f453709a53e5031b45b", [:mix], [], "hexpm", "e110c867a1b3fe74bfc7dd9893aa851f0eed5518d0d7cad76d7baafd30e4f5ba"},
"swoosh": {:hex, :swoosh, "1.9.1", "0a5d7bf9954eb41d7e55525bc0940379982b090abbaef67cd8e1fd2ed7f8ca1a", [:mix], [{:cowboy, "~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:ex_aws, "~> 2.1", [hex: :ex_aws, repo: "hexpm", optional: true]}, {:finch, "~> 0.6", [hex: :finch, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.13 or ~> 1.0", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mail, "~> 0.2", [hex: :mail, repo: "hexpm", optional: true]}, {:mime, "~> 1.1 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_cowboy, ">= 1.0.0", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "76dffff3ffcab80f249d5937a592eaef7cc49ac6f4cdd27e622868326ed6371e"},
"tailwind": {:hex, :tailwind, "0.1.10", "21ed80ae1f411f747ee513470578acaaa1d0eb40170005350c5b0b6d07e2d624", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "e0fc474dfa8ed7a4573851ac69c5fd3ca70fbb0a5bada574d1d657ebc6f2f1f1"},
Expand Down
4 changes: 3 additions & 1 deletion test/lightning/jobs/job_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ defmodule Lightning.Jobs.JobTest do
for _ <- 1..length,
into: "",
do:
<<Enum.random('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ')>>
<<Enum.random(
~c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "
)>>
end

describe "changeset/2" do
Expand Down
5 changes: 4 additions & 1 deletion test/lightning/workflows_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ defmodule Lightning.WorkflowsTest do
assert {:ok, workflow} =
Lightning.Workflows.update_workflow(workflow, valid_attrs)

assert Repo.get_by(Lightning.Jobs.Job, id: job_id, name: "some-job-renamed")
assert Repo.get_by(Lightning.Jobs.Job,
id: job_id,
name: "some-job-renamed"
)

assert workflow.name == "some-name"
assert workflow.edges |> List.first() == edge
Expand Down
10 changes: 6 additions & 4 deletions test/lightning_web/live/work_order_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,8 @@ defmodule LightningWeb.RunWorkOrderTest do
conn,
Routes.project_run_index_path(conn, :index, project.id)
)
|> IO.inspect()

Routes.project_run_index_path(conn, :index, project.id)
|> IO.inspect()

# assert destination =~
# "/projects/#{project.id}/runs?filters[body]=true&filters[crash]=true&filters[date_after]="
Expand Down Expand Up @@ -1136,7 +1134,9 @@ defmodule LightningWeb.RunWorkOrderTest do
run = run_fixture(started_at: started_at, finished_at: finished_at)

html =
render_component(&LightningWeb.RunLive.Components.run_details/1, run: run)
render_component(&LightningWeb.RunLive.Components.run_details/1,
run: run
)
|> Floki.parse_fragment!()

assert html
Expand All @@ -1162,7 +1162,9 @@ defmodule LightningWeb.RunWorkOrderTest do
run = run_fixture(started_at: started_at)

html =
render_component(&LightningWeb.RunLive.Components.run_details/1, run: run)
render_component(&LightningWeb.RunLive.Components.run_details/1,
run: run
)
|> Floki.parse_fragment!()

assert html
Expand Down
2 changes: 1 addition & 1 deletion test/support/fixtures/workflows_fixtures.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule Lightning.WorkflowsFixtures do
|> Enum.into(%{
name:
Enum.take_random(
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ',
~c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ",
10
)
|> to_string()
Expand Down

0 comments on commit e4941f5

Please sign in to comment.