-
Notifications
You must be signed in to change notification settings - Fork 28
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Objective
Extract 20 YAML generation functions from the oversized pkg/workflow/compiler.go (3,472 lines) into a new dedicated file pkg/workflow/yaml_generation.go.
Context
Part of issue #2273. The compiler.go file is too large and mixes multiple responsibilities. This task focuses on extracting generation functions to improve code organization and maintainability.
Functions to Extract
Move these 20 generation functions from compiler.go to new yaml_generation.go:
generateJobNamegenerateYAMLgenerateMainJobStepsgenerateUploadAgentLogsgenerateUploadAssetsgenerateLogParsinggenerateErrorValidationgenerateUploadAwInfogenerateUploadPromptgenerateExtractAccessLogsgenerateUploadAccessLogsgenerateUploadMCPLogsgeneratePromptgenerateCacheMemoryPromptStepgenerateSafeOutputsPromptStepgeneratePostStepsgenerateEngineExecutionStepsgenerateAgentVersionCapturegenerateCreateAwInfogenerateOutputCollectionStepconvertGoPatternToJavaScriptconvertErrorPatternsToJavaScript
Approach
- Create new file
pkg/workflow/yaml_generation.go - Move all 20 generation functions from
compiler.gotoyaml_generation.go - Ensure all receiver methods remain on
*Compilertype - Update imports as needed
- Verify no broken references
Files to Modify
- Create:
pkg/workflow/yaml_generation.go - Update:
pkg/workflow/compiler.go(remove moved functions)
Acceptance Criteria
- New
yaml_generation.gofile created with all 20 generation functions - Functions removed from
compiler.go - All tests pass:
make test-unit - Code compiles successfully:
make build - No import errors or broken references
-
compiler.goreduced by approximately 500-800 lines
Related to [refactor] 🔧 Semantic Function Clustering Analysis - Refactoring Opportunities #2273
AI generated by Plan Command for #2273
Copilot