Skip to content

Commit

Permalink
Revert "Use the new deployments orchestrator by default (#1922)"
Browse files Browse the repository at this point in the history
This reverts commit 8a00cca.
  • Loading branch information
nshoes committed Feb 26, 2025
1 parent 3849a57 commit 8212bad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions lib/nerves_hub/deployments/deployment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ defmodule NervesHub.Deployments.Deployment do
field(:device_count, :integer, virtual: true)

# temporary addition while we feature test a new deployment management strategy
field(:orchestrator_strategy, Ecto.Enum,
values: [:multi, :distributed],
default: :distributed
)
field(:orchestrator_strategy, Ecto.Enum, values: [:multi, :distributed], default: :multi)

timestamps()
end
Expand Down
4 changes: 1 addition & 3 deletions lib/nerves_hub/deployments/distributed/orchestrator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ defmodule NervesHub.Deployments.Distributed.Orchestrator do
def start_orchestrator(
%Deployment{is_active: true, orchestrator_strategy: :distributed} = deployment
) do
if Application.get_env(:nerves_hub, :deploy_env) != "test" do
ProcessHub.start_child(:deployment_orchestrators, child_spec(deployment))
end
ProcessHub.start_child(:deployment_orchestrators, child_spec(deployment))
end

def start_orchestrator(_) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ defmodule NervesHub.Repo.Migrations.SetDefaultDeploymentOrchestratorStrategy do
alias NervesHub.Repo

def change do
Repo.update_all(Deployment, set: [orchestrator_strategy: "distributed"])
Repo.update_all(Deployment, set: [orchestrator_strategy: "multi"])
end
end
2 changes: 1 addition & 1 deletion test/nerves_hub_web/channels/websocket_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule NervesHubWeb.WebsocketTest do
alias NervesHub.AuditLogs
alias NervesHub.AuditLogs.AuditLog
alias NervesHub.Deployments
alias NervesHub.Deployments.Distributed.Orchestrator
alias NervesHub.Deployments.Orchestrator
alias NervesHub.Devices
alias NervesHub.Devices.Connections
alias NervesHub.Devices.Device
Expand Down

0 comments on commit 8212bad

Please sign in to comment.