Skip to content

Commit

Permalink
feat(containers): allow adding ready actions to existing deployments
Browse files Browse the repository at this point in the history
perform a lookup before creating new items

Signed-off-by: Francesco Noacco <[email protected]>
  • Loading branch information
noaccOS committed Nov 26, 2024
1 parent 3407555 commit 482fb30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/lib/edgehog/containers/deployment_ready_action.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ defmodule Edgehog.Containers.DeploymentReadyAction do

argument :deployment, :map

change manage_relationship(:deployment, on_no_match: {:create, :deploy}, on_match: :ignore)
change manage_relationship(:deployment,
on_lookup: :relate,
use_identities: [:_primary_key, :release_instance],
on_no_match: {:create, :deploy},
on_match: :ignore
)

change ManualActions.DeploymentReadyActionAddRelationship
end

Expand Down

0 comments on commit 482fb30

Please sign in to comment.