Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

agent: handle skipped deployments

+13 -2
+2 -2
apps/sower/lib/sower/orchestration.ex
··· 993 993 where: 994 994 d.agent_id == ^agent_id and 995 995 d.content_hash == ^content_hash and 996 - d.result == :success, 997 - order_by: [desc: d.deployed_at], 996 + (d.result == :success or is_nil(d.result)), 997 + order_by: [desc: d.inserted_at], 998 998 limit: 1 999 999 ) 1000 1000
+9
apps/sower_agent/lib/sower_agent/client.ex
··· 168 168 ) 169 169 when topic == agent_sid do 170 170 case SowerClient.Orchestration.Deployment.cast(payload) do 171 + {:ok, %{skipped: true} = deployment} -> 172 + Logger.info( 173 + msg: "Deployment skipped by server", 174 + request_id: deployment.request_id, 175 + deployment_sid: deployment.sid 176 + ) 177 + 178 + {:ok, socket} 179 + 171 180 {:ok, deployment} -> 172 181 Logger.debug( 173 182 msg: "Received deployment",
+1
apps/sower_agent/lib/sower_agent/scheduler.ex
··· 52 52 end 53 53 |> Quantum.Job.set_timezone(get_timezone()) 54 54 |> Quantum.Job.set_schedule(cron) 55 + |> Quantum.Job.set_overlap(false) 55 56 |> Quantum.Job.set_task(fn -> 56 57 subscriptions = SowerAgent.Storage.read().subscriptions || [] 57 58
+1
docs/principles.org
··· 1 + - When in doubt, deployment should move forward with a sane default. This strives to avoid a node that cannot upgrade itself. e.g. the default activation mode for nixos is `switch`, rather than a failure, so that a misconfiguration cannot break management.