Browse Source

chg: dev: no need to check constraints on infered relation when running action

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

4
bin/compose-core

@ -3805,7 +3805,7 @@ get_docker_charm_action_help() {
local services service charm relation_name target_service relation_config \ local services service charm relation_name target_service relation_config \
target_charm target_charm
services=($(get_compose_yml_content | shyaml keys 2>/dev/null)) services=($(get_compose_yml_content | shyaml keys 2>/dev/null))
get_all_relations "${services[@]}" >/dev/null 2>&1 || exit 1
NO_CONSTRAINT_CHECK=1 get_all_relations "${services[@]}" >/dev/null || return 1
for service in "${services[@]}"; do for service in "${services[@]}"; do
out=$( out=$(
charm=$(get_service_charm "$service") || return 1 charm=$(get_service_charm "$service") || return 1
@ -4303,7 +4303,7 @@ if [ -z "$is_docker_compose_action" -a "$action" ]; then
## Required by has_service_action ## Required by has_service_action
array_read-0 services_args < <(printf "%s" "$COMPOSE_YML_CONTENT" | shyaml keys-0 2>/dev/null) array_read-0 services_args < <(printf "%s" "$COMPOSE_YML_CONTENT" | shyaml keys-0 2>/dev/null)
get_all_relations "${services_args[@]}" >/dev/null 2>&1 || exit 1
NO_CONSTRAINT_CHECK=1 get_all_relations "${services_args[@]}" >/dev/null || exit 1
remainder_args=("${remainder_args[@]:1}") remainder_args=("${remainder_args[@]:1}")
if has_service_action "$action_service" "$action" >/dev/null; then if has_service_action "$action_service" "$action" >/dev/null; then

Loading…
Cancel
Save