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

[WIP] Upgrading Elixir and dependencies #1402

Closed
wants to merge 1 commit into from

Conversation

davejlong
Copy link
Member

@davejlong davejlong commented Sep 28, 2017

Upgrading Elixir support to 1.5. At the same time, upgrading dependencies to support the upgrade.

Fixes #1393

@davejlong
Copy link
Member Author

davejlong commented Sep 28, 2017

Currently tests fail with the following log:

$ ALLOW_WARNINGS=true mix test --exclude integration
Compiling 365 files (.ex)
Generated cog app
2017-09-28T12:55:16.200 module=Probe line=11 [info]  Starting Probe
2017-09-28T12:55:16.209 module=Probe.Configuration line=39 [info]  Writing audit logs to the `/Users/david/Projects/cogbot/cog/data/audit_logs` directory
2017-09-28T12:55:16.219 module=Probe.JSONLogHandler line=24 [info]  Attempting to open JSON-formatted event log file `/Users/david/Projects/cogbot/cog/data/audit_logs/events.log`
2017-09-28T12:55:16.234 module=Probe.JSONLogHandler line=27 [info]  Logging JSON-formatted event stream to `/Users/david/Projects/cogbot/cog/data/audit_logs/events.log`
2017-09-28T12:55:16.758 module=Cog.BusDriver line=62 [info]  Message bus configured for plain TCP
starting emqttd on node 'nonode@nohost'
emqttd ctl is starting...[done]
emqttd hook is starting...[done]
emqttd pubsub is starting...[done]
emqttd stats is starting...[done]
emqttd metrics is starting...[done]
emqttd retainer is starting...[done]
emqttd pooler is starting...[done]
emqttd trace is starting...[done]
emqttd client manager is starting...[done]
emqttd session manager is starting...[done]
emqttd session supervisor is starting...[done]
emqttd wsclient supervisor is starting...[done]
emqttd broker is starting...[done]
emqttd alarm is starting...[done]
emqttd mod supervisor is starting...[done]
emqttd bridge supervisor is starting...[done]
emqttd access control is starting...[done]
emqttd system monitor is starting...[done]
2017-09-28T12:55:23.065 [info]  Application emqttd exited: exited in: :emqttd_app.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function :lager.info/2 is undefined or private
            (lager) :lager.info('Load module ~s successfully', [:presence])
            (stdlib) lists.erl:1338: :lists.foreach/2
            (emqttd) /Users/david/Projects/cogbot/cog/deps/emqttd/src/emqttd_app.erl:53: :emqttd_app.start/2
            (kernel) application_master.erl:273: :application_master.start_it_old/4
2017-09-28T12:55:23.066 [info]  Application mochiweb exited: :stopped
2017-09-28T12:55:23.066 [info]  Application xmerl exited: :stopped
2017-09-28T12:55:23.069 [info]  Application cog exited: Cog.start(:normal, []) returned an error: shutdown: failed to start child: Cog.BusDriver
    ** (EXIT) {:error, {:emqttd, {:bad_return, {{:emqttd_app, :start, [:normal, []]}, {:EXIT, {:undef, [{:lager, :info, ['Load module ~s successfully', [:presence]], []}, {:lists, :foreach, 2, [file: 'lists.erl', line: 1338]}, {:emqttd_app, :start, 2, [file: '/Users/david/Projects/cogbot/cog/deps/emqttd/src/emqttd_app.erl', line: 53]}, {:application_master, :start_it_old, 4, [file: 'application_master.erl', line: 273]}]}}}}}}
2017-09-28T12:55:23.069 [info]  Application bamboo exited: :stopped
2017-09-28T12:55:23.069 [info]  Application httpoison exited: :stopped
2017-09-28T12:55:23.069 [info]  Application hackney exited: :stopped
2017-09-28T12:55:23.069 [info]  Application metrics exited: :stopped
2017-09-28T12:55:23.069 [info]  Application ssl_verify_fun exited: :stopped
2017-09-28T12:55:23.069 [info]  Application certifi exited: :stopped
2017-09-28T12:55:23.069 [info]  Application mimerl exited: :stopped
2017-09-28T12:55:23.069 [info]  Application idna exited: :stopped
2017-09-28T12:55:23.069 [info]  Application unicode_util_compat exited: :stopped
2017-09-28T12:55:23.069 [info]  Application spanner exited: :stopped
2017-09-28T12:55:23.072 [info]  Application yaml_elixir exited: :stopped
2017-09-28T12:55:23.073 [info]  Application yamerl exited: :stopped
2017-09-28T12:55:23.073 [info]  Application greenbar exited: :stopped
2017-09-28T12:55:23.073 [info]  Application table_rex exited: :stopped
2017-09-28T12:55:23.073 [info]  Application piper exited: :stopped
2017-09-28T12:55:23.073 [info]  Application greenbar_markdown exited: :stopped
2017-09-28T12:55:23.074 [info]  Application comeonin exited: :stopped
2017-09-28T12:55:23.074 [info]  Application phoenix_html exited: :stopped
2017-09-28T12:55:23.075 [info]  Application postgrex exited: :stopped
2017-09-28T12:55:23.076 [info]  Application db_connection exited: :stopped
2017-09-28T12:55:23.076 [info]  Application connection exited: :stopped
2017-09-28T12:55:23.078 [info]  Application phoenix_ecto exited: :stopped
2017-09-28T12:55:23.079 [info]  Application ecto exited: :stopped
2017-09-28T12:55:23.079 [info]  Application poolboy exited: :stopped
2017-09-28T12:55:23.079 [info]  Application decimal exited: :stopped
2017-09-28T12:55:23.080 [info]  Application cowboy exited: :stopped
2017-09-28T12:55:23.080 [info]  Application cowlib exited: :stopped
2017-09-28T12:55:23.080 [info]  Application ranch exited: :stopped
2017-09-28T12:55:23.081 [info]  Application esockd exited: :stopped
2017-09-28T12:55:23.082 [info]  Application gproc exited: :stopped
2017-09-28T12:55:23.082 [info]  Application httpotion exited: :stopped
2017-09-28T12:55:23.085 [info]  Application ibrowse exited: :stopped
2017-09-28T12:55:23.085 [info]  Application logger_file_backend exited: :stopped
2017-09-28T12:55:23.086 [info]  Application probe exited: :stopped

=INFO REPORT==== 28-Sep-2017::08:55:23 ===
    application: logger
    exited: stopped
    type: temporary

=INFO REPORT==== 28-Sep-2017::08:55:23 ===
    application: lager
    exited: stopped
    type: temporary

=INFO REPORT==== 28-Sep-2017::08:55:23 ===
    application: goldrush
    exited: stopped
    type: temporary

=INFO REPORT==== 28-Sep-2017::08:55:23 ===
    application: syntax_tools
    exited: stopped
    type: temporary

@@ -67,7 +67,7 @@ defmodule Cog.Command.Output do
# typed by the user.
defp redirection_error_message(errors) do
all_bad_redirects = errors
|> Enum.map(fn({_,r}) -> r end)
|> Enum.map(fn({_, r}) -> r end)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a function call when a pipeline is only one function long

@@ -133,7 +133,7 @@ defmodule Cog.Bootstrap do
# like the user was attempting to bootstrap via environment we will
# warn about the missing variables.
missing ->
Enum.each(missing, fn({k,_v}) -> Logger.info("Skipping bootstrap: Missing value for #{bootstrap_var_for(k)}.") end)
Enum.each(missing, fn({k, _v}) -> Logger.info("Skipping bootstrap: Missing value for #{bootstrap_var_for(k)}.") end)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function body is nested too deep (max depth is 2, was 3).

result = Repo.transaction fn ->
case bootstrap_from_env do
case bootstrap_from_env() do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function body is nested too deep (max depth is 2, was 3).

@@ -120,7 +120,7 @@ defmodule Cog.Bootstrap do
fields = ~w(username password email_address first_name last_name)
vars =
Enum.map(fields, fn(field) -> { field, System.get_env(bootstrap_var_for(field)) } end)
|> Enum.group_by(fn({_k,v}) -> if (v != nil), do: :found, else: :not_found end)
|> Enum.group_by(fn({_k, v}) -> if v != nil, do: :found, else: :not_found end)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a function call when a pipeline is only one function long

@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 1 possible new issue (including those that may have been commented here).
  • 18 fixed issues! 🎉

You can see more details about this review at https://ebertapp.io/github/operable/cog/pulls/1402.

@davejlong davejlong closed this Feb 15, 2018
@davejlong
Copy link
Member Author

Will circle back to this at a later date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant