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

v10.1.3-rc11 #1217

Merged
merged 17 commits into from
Jun 23, 2020
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

# 10.1.3

* Genesis v1.5 and Express v1.0 firmware homing updates.
* Add warning to configurator credentials page.
* Fix bug where configurator would not restart when bad credentials were entered.

# 10.1.2

* Express v1.0 firmware updates.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.1.3-rc3
10.1.3-rc11
2 changes: 1 addition & 1 deletion farmbot_core/lib/farmbot_core/firmware_tty_detector.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ defmodule FarmbotCore.FirmwareTTYDetector do
# unpredictable behavior. Putting ttyAMA0 at the end helps
# prevent the issue.
enumerated = UART.enumerate() |> Map.to_list() |> Enum.sort_by(fn
"ttyAMA0" -> 1
{"ttyAMA0", _} -> 1
_ -> 0
end)

Expand Down
4 changes: 2 additions & 2 deletions farmbot_ext/lib/farmbot_ext/amqp/connection_worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ defmodule FarmbotExt.AMQP.ConnectionWorker do
{:ok, _} <- maybe_purge(chan, chan_name, purge?),
:ok <- Queue.bind(chan, chan_name, @exchange, routing_key: route),
{:ok, _} <- Basic.consume(chan, chan_name, self(), no_ack: true) do
# link to the connection and channel because the
# AMQP lib doesn't handle being disconnected form the
# link to the connection and channel because the
# AMQP lib doesn't handle being disconnected form the
# network very well and these pids will turn into zombies
Process.link(conn.pid)
Process.link(chan.pid)
Expand Down
6 changes: 0 additions & 6 deletions farmbot_ext/lib/farmbot_ext/api/dirty_worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ defmodule FarmbotExt.API.DirtyWorker do
{:ok, %{status: s, body: body}} when s > 199 and s < 300 ->
dirty |> module.changeset(body) |> handle_changeset(module)

# Stale data
{:ok, %{status: s, body: %{} = body}} when s == 409 ->
b = inspect(body)
msg = "FBOS Encountered stale data (#{module}). Resync required. #{b}"
FarmbotCore.Logger.error(2, msg)

# Invalid data
{:ok, %{status: s, body: %{} = body}} when s > 399 and s < 500 ->
FarmbotCore.Logger.error(2, "HTTP Error #{s}. #{inspect(body)}")
Expand Down
17 changes: 14 additions & 3 deletions farmbot_ext/lib/farmbot_ext/bootstrap.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ defmodule FarmbotExt.Bootstrap do
a token, secret, or password for logging into an account
"""

# FarmbotExt.Bootstrap.Authorization.authorize_with_password(email, password, server)
use GenServer
require FarmbotCore.Logger
require Logger
alias FarmbotExt.{Bootstrap, Bootstrap.Authorization}
import FarmbotCore.Config, only: [update_config_value: 4, get_config_value: 3]
Expand Down Expand Up @@ -56,11 +58,20 @@ defmodule FarmbotExt.Bootstrap do
{:ok, pid} <- Supervisor.start_child(FarmbotExt, Bootstrap.Supervisor) do
{:noreply, pid}
else
# User types a bad password into configurator.
er ->
Logger.error("Password auth failed: #{inspect(er)} ")
# Changing the error message on the API
# will break this handler. Hmm...
{:error, "Bad email or password."} ->
msg = "Password auth failed! Check again and reconfigurate."
Logger.error(msg)
FarmbotCore.Logger.debug(3, msg)
FarmbotCeleryScript.SysCalls.factory_reset("farmbot_os")
{:noreply, nil, 5000}

er ->
msg = "Bootstrap try_auth: #{inspect(er)} "
Logger.error(msg)
FarmbotCore.Logger.debug(3, msg)
{:noreply, nil, 5000}
end
end
end
Loading