From 0f096c76eba9f691cd11ba11a16bebecbabc3668 Mon Sep 17 00:00:00 2001
From: Vladimir Vagaytsev <10628074+vvagaytsev@users.noreply.github.com>
Date: Tue, 29 Oct 2024 14:08:22 +0100
Subject: [PATCH] revert: fix: fail-safe dependency config lookup in action
 config processing (#6549)

---
 core/src/graph/actions.ts | 24 +++---------------------
 1 file changed, 3 insertions(+), 21 deletions(-)

diff --git a/core/src/graph/actions.ts b/core/src/graph/actions.ts
index 88f91dc901..f1fa42f984 100644
--- a/core/src/graph/actions.ts
+++ b/core/src/graph/actions.ts
@@ -1013,28 +1013,10 @@ const dependenciesFromActionConfig = profile(function dependenciesFromActionConf
       const depKey = actionReferenceToString(d)
       const depConfig = configsByKey[depKey]
 
-      // When a dependency config is missing here, 99% of the time this indicates a user error in a templated action name
-      // from a config template (e.g. an expression or part of an expression evaluating to null or undefined,
-      // and this then being interpolated into the string value for the action name).
       if (!depConfig) {
-        const actionTemplateInfo = () => {
-          const configTemplateName = config.internal.templateName
-          if (!configTemplateName) {
-            return ""
-          }
-          return `The action was rendered from the configuration template ${styles.highlight(configTemplateName)}.`
-        }
-
-        log.warn(
-          deline`
-          Found a missing dependency with name ${styles.highlight(`"${name}"`)}.
-          The template expression for this action name (or part of it) may have unintentionally resolved to null or
-          undefined. Please take a look at the template expression in question in the configuration
-          for action ${styles.highlight(depKey)} or in its configuration template if any.
-          ${actionTemplateInfo()}
-          `
-        )
-        return undefined
+        throw new ConfigurationError({
+          message: `${description} references dependency ${depKey}, but no such action could be found`,
+        })
       }
 
       return {