Document custom job dependencies (needs) for agentic workflows#14305
Document custom job dependencies (needs) for agentic workflows#14305
needs) for agentic workflows#14305Conversation
…stigation - Add comprehensive documentation for custom job dependencies in frontmatter.md - Add dynamic vs static parallelization section to orchestration.md - Create test workflow demonstrating job dependencies with outputs - Add MATRIX_JOBS_INVESTIGATION.md with complete analysis - Confirm needs field is fully supported, matrix jobs not needed for agentic patterns Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
needs) for agentic workflows
|
@copilot update |
…s syntax - Add "Custom Job Dependencies" section with comprehensive example - Show dependency chains, multiple dependencies, and job outputs - Update design guidelines to reference needs for custom job dependencies - Add cross-reference to frontmatter documentation Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Updated |
|
@copilot Maybe this should be rephrased as for orchestration where order matters? Or should be solved more naturally by orchestration cycles/runs? |
- Rename section to "When Execution Order Matters" to focus on deterministic ordering - Add clear guidance on when to use needs vs dispatch-workflow - Simplify example to show pre/post-processing pattern - Contrast single-run dependencies with multi-run orchestration - Emphasize that needs is for fixed order, dispatch-workflow for dynamic decisions Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Rephrased the section to focus on "When Execution Order Matters" - clarified that |
Investigation Complete: Matrix Jobs and Job Dependencies for Project Boards and Orchestration
Summary
Finding: The
needsfield for job dependencies is already fully supported. Matrix jobs are not beneficial for project boards or orchestration patterns due to their dynamic, agentic nature.Key Discoveries
needsfield fully functional - custom jobs can define complex dependency chainsneedssupportneedsvs orchestrationChanges Made
1. Documentation Enhancements ✅
docs/src/content/docs/reference/frontmatter.mdneeds)" section with examplesneeds: [job1, job2]${{ needs.job.outputs.value }}docs/src/content/docs/patterns/orchestration.md.github/aw/orchestration.mdneeds(deterministic single-run order) vsdispatch-workflow(dynamic multi-run orchestration)2. Test Validation ✅
.github/workflows/test-custom-jobs-needs.mdneeds: [agent, collect_data]3. Investigation Report ✅
MATRIX_JOBS_INVESTIGATION.mdWhen to Use Each Pattern
Use
needsfor deterministic execution order (single workflow run):Use
dispatch-workflowfor dynamic orchestration (multiple workflow runs):Dependency Graph from Test Workflow
Why Matrix Jobs Are Not Needed
ProjectOps: Content-driven decisions require dynamic routing
update_projectwithmax) is correctOrchestration: Intelligent worker dispatch based on analysis
dispatch-workflowwithmax) is correctBottom Line
✅
needsalready works - now documented with clear guidance on when to use it❌ Matrix not needed - incompatible with agentic patterns
✅ Current patterns correct - dynamic decision-making preserved
✅ No code changes required - feature already exists and functions properly
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.