Deployment and lifecycle management for Nix
0
fork

Configure Feed

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

chore: alphabetize

+31 -33
+31 -32
apps/sower/lib/sower/orchestration.ex
··· 4 4 """ 5 5 6 6 alias Sower.Orchestration.Agent 7 + alias Sower.Orchestration.AgentSeedGeneration 7 8 alias Sower.Orchestration.Deployment 8 9 alias Sower.Orchestration.Subscription 9 - alias Sower.Orchestration.AgentSeedGeneration 10 10 11 11 # Agent delegates 12 - defdelegate list_agents(), to: Agent 13 - defdelegate list_agents_with_latest_deployment(), to: Agent 14 - defdelegate get_agent(hello, socket), to: Agent 12 + defdelegate change_agent(agent, attrs \\ %{}), to: Agent 13 + defdelegate create_agent(attrs \\ %{}), to: Agent 14 + defdelegate delete_agent(agent), to: Agent 15 15 defdelegate get_agent!(id), to: Agent 16 + defdelegate get_agent(hello, socket), to: Agent 17 + defdelegate get_agent_local_sid!(local_sid), to: Agent 18 + defdelegate get_agent_local_sid(local_sid), to: Agent 16 19 defdelegate get_agent_sid!(sid), to: Agent 17 20 defdelegate get_agent_sid(sid), to: Agent 18 - defdelegate get_agent_local_sid(local_sid), to: Agent 19 - defdelegate get_agent_local_sid!(local_sid), to: Agent 20 - defdelegate create_agent(attrs \\ %{}), to: Agent 21 + defdelegate list_agents(), to: Agent 22 + defdelegate list_agents_with_latest_deployment(), to: Agent 21 23 defdelegate update_agent(agent, attrs), to: Agent 22 - defdelegate delete_agent(agent), to: Agent 23 - defdelegate change_agent(agent, attrs \\ %{}), to: Agent 24 24 25 25 # Subscription delegates 26 - defdelegate list_subscriptions(), to: Subscription 27 - defdelegate list_subscriptions_for_agent(agent), to: Subscription 26 + defdelegate change_subscription(subscription, attrs \\ %{}), to: Subscription 27 + defdelegate create_subscription(attrs \\ %{}), to: Subscription 28 + defdelegate delete_subscription(subscription), to: Subscription 29 + defdelegate find_subscription(seed), to: Subscription 28 30 defdelegate get_subscription!(id), to: Subscription 29 31 defdelegate get_subscription_sid!(sid), to: Subscription 30 32 defdelegate get_subscription_sid(sid), to: Subscription 31 33 defdelegate get_subscription_sid_with_deployments!(sid), to: Subscription 32 34 defdelegate get_subscription_sid_with_deployments(sid), to: Subscription 33 35 defdelegate get_subscription_sids(sids), to: Subscription 34 - defdelegate find_subscription(seed), to: Subscription 35 - defdelegate create_subscription(attrs \\ %{}), to: Subscription 36 + defdelegate list_subscriptions(), to: Subscription 37 + defdelegate list_subscriptions_for_agent(agent), to: Subscription 36 38 defdelegate register_subscription(req, agent_id), to: Subscription 37 39 defdelegate sync_subscriptions(subscriptions, agent_id), to: Subscription 38 40 defdelegate update_subscription(subscription, attrs), to: Subscription 39 - defdelegate delete_subscription(subscription), to: Subscription 40 - defdelegate change_subscription(subscription, attrs \\ %{}), to: Subscription 41 41 42 42 # Deployment delegates 43 - defdelegate list_deployments(), to: Deployment 44 - defdelegate list_deployments(agent, opts \\ []), to: Deployment 45 - defdelegate list_unresolved_deployments_for_agent(agent, opts \\ []), to: Deployment 43 + defdelegate change_deployment(deployment, attrs \\ %{}), to: Deployment 44 + defdelegate create_deployment(attrs \\ %{}), to: Deployment 45 + defdelegate delete_deployment(deployment), to: Deployment 46 + defdelegate deploy_subscription(subscription, opts \\ []), to: Deployment 47 + defdelegate finalize_stale_deployments(opts \\ []), to: Deployment 46 48 defdelegate get_deployment!(id), to: Deployment 47 49 defdelegate get_deployment_sid!(sid), to: Deployment 48 50 defdelegate get_deployment_sid(sid), to: Deployment 49 - defdelegate create_deployment(attrs \\ %{}), to: Deployment 50 - defdelegate update_deployment(deployment, attrs), to: Deployment 51 - defdelegate delete_deployment(deployment), to: Deployment 52 - defdelegate change_deployment(deployment, attrs \\ %{}), to: Deployment 53 - defdelegate retry_deployment(deployment, user_id), to: Deployment 54 - defdelegate replay_unresolved_deployments(agent, opts \\ []), to: Deployment 51 + defdelegate handle_deployment_request(payload, agent), to: Deployment 52 + defdelegate list_deployments(), to: Deployment 53 + defdelegate list_deployments(agent, opts \\ []), to: Deployment 54 + defdelegate list_matching_seeds(subscription, limit \\ 10), to: Deployment 55 + defdelegate list_unresolved_deployments_for_agent(agent, opts \\ []), to: Deployment 55 56 defdelegate match_seed(subscription), to: Deployment 56 - defdelegate list_matching_seeds(subscription, limit \\ 10), to: Deployment 57 - defdelegate deploy_subscription(subscription, opts \\ []), to: Deployment 58 - defdelegate request_deployment(request), to: Deployment 59 - defdelegate handle_deployment_request(payload, agent), to: Deployment 60 57 defdelegate process_deployment(request_id, subscriptions, agent, opts \\ []), to: Deployment 61 58 defdelegate record_deployment(result), to: Deployment 62 - defdelegate finalize_stale_deployments(opts \\ []), to: Deployment 59 + defdelegate replay_unresolved_deployments(agent, opts \\ []), to: Deployment 60 + defdelegate request_deployment(request), to: Deployment 61 + defdelegate retry_deployment(deployment, user_id), to: Deployment 62 + defdelegate update_deployment(deployment, attrs), to: Deployment 63 63 64 64 # AgentSeedGeneration delegates 65 65 defdelegate list_agent_seed_generation(agent), to: AgentSeedGeneration 66 + defdelegate list_agent_seed_generation_profile(agent_id, profile_id), to: AgentSeedGeneration 66 67 defdelegate list_current_seed_generation(agent), to: AgentSeedGeneration 67 - defdelegate list_agent_seed_generation_profile(agent_id, profile_id), to: AgentSeedGeneration 68 + defdelegate update_agent_seed_generations(report, agent), to: AgentSeedGeneration 68 69 69 70 defdelegate upsert_agent_generation(agent_id, profile_id, seed_id, attrs), 70 71 to: AgentSeedGeneration 71 - 72 - defdelegate update_agent_seed_generations(report, agent), to: AgentSeedGeneration 73 72 end
-1
apps/sower/priv/repo/migrations/20260305120000_add_state_to_deployments.exs
··· 19 19 alter table(:deployments) do 20 20 modify :state, :string, null: false 21 21 end 22 - 23 22 end 24 23 25 24 def down do