Add debug logging to trace input binding
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -374,6 +374,7 @@ async def run_recipe(
|
|||||||
# Variable inputs can be referenced by: node_id, config.name, config.input (if string)
|
# Variable inputs can be referenced by: node_id, config.name, config.input (if string)
|
||||||
input_name_to_node = {}
|
input_name_to_node = {}
|
||||||
for node_id, node in nodes.items():
|
for node_id, node in nodes.items():
|
||||||
|
logger.debug(f"Checking node {node_id}: type={node.get('node_type')}, config={node.get('config')}")
|
||||||
if node.get("node_type") == "SOURCE":
|
if node.get("node_type") == "SOURCE":
|
||||||
config = node.get("config", {})
|
config = node.get("config", {})
|
||||||
# Only variable inputs (those with 'input' in config, not fixed assets)
|
# Only variable inputs (those with 'input' in config, not fixed assets)
|
||||||
@@ -391,6 +392,9 @@ async def run_recipe(
|
|||||||
input_name_to_node[node["name"]] = node_id
|
input_name_to_node[node["name"]] = node_id
|
||||||
input_name_to_node[node["name"].replace("-", "_")] = node_id
|
input_name_to_node[node["name"].replace("-", "_")] = node_id
|
||||||
|
|
||||||
|
logger.info(f"Input name to node mapping: {input_name_to_node}")
|
||||||
|
logger.info(f"User-provided inputs: {req.inputs}")
|
||||||
|
|
||||||
# Map user-provided input names to content hashes (for variable inputs)
|
# Map user-provided input names to content hashes (for variable inputs)
|
||||||
for input_name, cid in req.inputs.items():
|
for input_name, cid in req.inputs.items():
|
||||||
# Try direct node ID match first
|
# Try direct node ID match first
|
||||||
@@ -400,6 +404,7 @@ async def run_recipe(
|
|||||||
if "config" not in node:
|
if "config" not in node:
|
||||||
node["config"] = {}
|
node["config"] = {}
|
||||||
node["config"]["cid"] = cid
|
node["config"]["cid"] = cid
|
||||||
|
logger.info(f"Bound input {input_name} directly to node, cid={cid[:16]}...")
|
||||||
# Try input name lookup
|
# Try input name lookup
|
||||||
elif input_name in input_name_to_node:
|
elif input_name in input_name_to_node:
|
||||||
node_id = input_name_to_node[input_name]
|
node_id = input_name_to_node[input_name]
|
||||||
@@ -407,6 +412,14 @@ async def run_recipe(
|
|||||||
if "config" not in node:
|
if "config" not in node:
|
||||||
node["config"] = {}
|
node["config"] = {}
|
||||||
node["config"]["cid"] = cid
|
node["config"]["cid"] = cid
|
||||||
|
logger.info(f"Bound input {input_name} via lookup to node {node_id}, cid={cid[:16]}...")
|
||||||
|
else:
|
||||||
|
logger.warning(f"Input {input_name} not found in nodes or input_name_to_node")
|
||||||
|
|
||||||
|
# Log final DAG nodes for debugging
|
||||||
|
for nid, n in nodes.items():
|
||||||
|
if n.get("node_type") == "SOURCE":
|
||||||
|
logger.info(f"Final SOURCE node {nid}: config={n.get('config')}")
|
||||||
|
|
||||||
# Transform output to output_id
|
# Transform output to output_id
|
||||||
if "output" in dag_copy:
|
if "output" in dag_copy:
|
||||||
|
|||||||
Reference in New Issue
Block a user