Troubleshooting
Troubleshooting¶
Common issues with workflow composition and their solutions.
Circular Dependency Errors¶
Error:
Cause: Workflow inheritance or imports form a cycle.
Solution:
# Bad: Circular dependency
# workflow-a.yml extends workflow-b.yml
# workflow-b.yml extends workflow-a.yml
# Good: Use common base
# base.yml (no extends)
# workflow-a.yml extends base.yml
# workflow-b.yml extends base.yml
Debugging:
The error message doesn't include the dependency chain. To diagnose which workflows are involved:
# Use verbose mode to see composition steps
prodigy run workflow.yml --dry-run -vv
# Manually trace the chain
# 1. Check what the workflow extends
grep "^extends:" workflow-a.yml
# 2. Check what that workflow extends
grep "^extends:" workflow-b.yml
# 3. Continue until you find the cycle
Source: Error generated in src/cook/workflow/composition/composer.rs:727
Template Not Found in Registry¶
Error:
Cause: Template doesn't exist in the template search path.
Solutions:
- Verify template locations (searched in order):
Prodigy searches for templates in this priority order:
# 1. Global templates (highest priority, shared across repos)
ls ~/.prodigy/templates/ci-pipeline.yml
# 2. Project-local templates
ls .prodigy/templates/ci-pipeline.yml
# 3. Legacy project-local templates
ls templates/ci-pipeline.yml
Source: Template search path defined in src/cook/workflow/composer_integration.rs:94-110
-
Check template name:
-
Add template to registry:
-
Use file-based template instead:
See also: Template System for more details on template sources.
Parameter Validation Failures¶
Error:
Cause: Parameter type mismatch.
Solutions:
-
Check parameter type:
-
Verify validation expression:
-
Check required vs optional:
See also: Parameter Definitions for complete parameter validation reference.
Import Path Resolution Errors¶
Error:
Cause: Import path doesn't exist or is incorrect.
Solutions:
-
Use absolute path:
-
Verify relative path:
-
Check current directory:
Type Mismatch Errors¶
Error:
Cause: Parameter value type doesn't match definition.
Solutions:
-
Pass correct type:
-
Check parameter file format:
Base Workflow Resolution Failures¶
Error:
Cause: Extended workflow file not found.
Solutions:
-
Verify extends path:
-
Use absolute path:
-
Check file exists:
Parameter Substitution Issues¶
Error:
Cause: Parameter not found in the parameters map, or incorrect syntax.
Status: Parameter substitution is fully implemented and works in all command types.
Source: Implemented in src/cook/workflow/composition/composer.rs:760-877 (supports Simple, Structured, WorkflowStep, and SimpleObject command types)
Solutions:
-
Verify parameter is defined:
-
Check parameter is provided:
-
Use correct syntax:
-
Parameter substitution works in all command types:
Supported value types: - Strings: Used as-is - Numbers: Converted to string representation - Booleans: Converted to "true" or "false" - Arrays/Objects: Serialized as JSON - Null: Becomes empty string
See also: Parameter Definitions for parameter syntax reference.
Sub-Workflow Execution Issues¶
Error:
Status: Sub-workflow execution is fully implemented via SubWorkflowExecutor.
Source: Implemented in src/cook/workflow/composition/sub_workflow.rs:67-176
Common Issues:
- Sub-workflow file path incorrect:
-
Parameter type mismatch:
-
Input/output mapping errors:
-
Timeout too short:
Supported features:
- Parameter passing (JSON values)
- Input/output variable mapping
- Context isolation (sub-workflow has clean context)
- Error handling with continue_on_error flag
- Timeout support
- Parallel execution with parallel: true
See also: Sub-Workflows for complete usage guide.
Default Values Not Applied¶
Error:
Status: Default values are fully applied through the apply_defaults method.
Source: Implemented in src/cook/workflow/composition/composer.rs:217-257
How defaults work:
-
Workflow-level defaults are applied to environment variables:
-
Parameter-level defaults work differently:
-
Precedence order (highest to lowest):
- Explicitly provided parameter values (--param)
- Parameter definition defaults
- Workflow-level defaults
- No value (error if required parameter)
Common mistakes:
-
Workflow defaults don't set parameter values:
-
Existing values are not overwritten:
See also: Default Values for complete default value semantics.
URL Template Source Errors¶
Error:
Cause: URL-based template loading is planned but not implemented.
Solutions:
-
Download template to file:
-
Use file-based template:
-
Add to registry:
Debugging Strategies¶
Enable Verbose Logging:
# Show composition steps
prodigy run workflow.yml -v
# Show detailed debug output
prodigy run workflow.yml -vv
# Show trace-level output (includes full composition details)
prodigy run workflow.yml -vvv
Dry-Run Validation:
# Validate composition without execution
prodigy run workflow.yml --dry-run
# Combine with verbose mode to see composition steps
prodigy run workflow.yml --dry-run -vv
Isolate Composition Layers:
# Test base workflow alone
prodigy run base-config.yml --dry-run
# Add one composition feature at a time
# 1. Test with imports only
# 2. Add extends
# 3. Add template
# 4. Add parameters
Check File Permissions:
# Verify read access
ls -la workflow.yml base-config.yml
# Check registry permissions
ls -la ~/.prodigy/templates/
ls -la .prodigy/templates/
Verify JSON Syntax:
Trace Parameter Substitution:
# Use verbose mode to see parameter values
prodigy run workflow.yml --param environment="prod" -vv
# Check which parameters are being substituted
Debug Sub-Workflow Execution:
# Test sub-workflow independently first
prodigy run workflows/build.yml --dry-run
# Then test from parent workflow
prodigy run main.yml -vv # See sub-workflow execution logs
Getting Help¶
If issues persist:
- Check implementation status in relevant subsection docs
- Review error context in error messages
- Use verbose mode (-vv or -vvv) to understand what's happening
- Test components independently (base workflows, sub-workflows, templates)
- File issue with minimal reproduction case
- Include:
- Workflow files
- Command used
- Full error output
- Prodigy version
- Output from verbose mode (-vv)