Browse Source

new: consider all relations involved in an indirect action upon call of indirect action

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cache-relation
Valentin Lab 2 years ago
parent
commit
7c23009e9e
  1. 3
      bin/compose-core

3
bin/compose-core

@ -4409,12 +4409,14 @@ if [ -z "$is_docker_compose_action" -a "$action" ]; then
remainder_args=("${remainder_args[@]:1}")
if has_service_action "$action_service" "$action" >/dev/null; then
is_service_action=true
services_args=("$action_service")
{
read-0 action_type
case "$action_type" in
"relation")
read-0 _ target_service _target_charm relation_name _ action_script_path
debug "Found action $DARKYELLOW${action_service}$NORMAL/$DARKBLUE$relation_name$NORMAL/$DARKCYAN$action$NORMAL (in $DARKYELLOW$target_service$NORMAL)"
services_args+=("$target_service")
;;
"direct")
read-0 _ action_script_path
@ -4422,7 +4424,6 @@ if [ -z "$is_docker_compose_action" -a "$action" ]; then
;;
esac
} < <(has_service_action "$action_service" "$action")
services_args=("$action_service")
get_all_relations "${services_args[@]}" >/dev/null || {
echo " Hint: if this is unexpected, you can try to delete caches, and re-run the command." >&2
exit 1

Loading…
Cancel
Save