MCPcopy Create free account
hub / github.com/github/gh-aw / validateConcurrencyConfiguration

Method validateConcurrencyConfiguration

pkg/workflow/compiler_validators.go:202–230  ·  view source on GitHub ↗
(workflowData *WorkflowData, markdownPath string)

Source from the content-addressed store, hash-verified

200}
201
202func (c *Compiler) validateConcurrencyConfiguration(workflowData *WorkflowData, markdownPath string) error {
203 workflowLog.Printf("Validating workflow-level concurrency configuration")
204 if err := validateWorkflowConcurrency(workflowData, markdownPath); err != nil {
205 return err
206 }
207 if workflowData.ConcurrencyJobDiscriminator != "" {
208 if err := validateConcurrencyGroupExpression(workflowData.ConcurrencyJobDiscriminator); err != nil {
209 return formatCompilerError(markdownPath, "error", "concurrency.job-discriminator validation failed: "+err.Error(), err)
210 }
211 }
212 workflowLog.Printf("Validating engine-level concurrency configuration")
213 if workflowData.EngineConfig != nil && workflowData.EngineConfig.Concurrency != "" {
214 if err := validateConcurrencyQueueConfiguration(workflowData.EngineConfig.Concurrency); err != nil {
215 return formatCompilerError(markdownPath, "error", "engine.concurrency validation failed: "+err.Error(), err)
216 }
217 groupExpr := extractConcurrencyGroupFromYAML(workflowData.EngineConfig.Concurrency)
218 if groupExpr != "" {
219 if err := validateConcurrencyGroupExpression(groupExpr); err != nil {
220 return formatCompilerError(markdownPath, "error", "engine.concurrency validation failed: "+err.Error(), err)
221 }
222 }
223 }
224 if workflowData.SafeOutputs != nil && workflowData.SafeOutputs.ConcurrencyGroup != "" {
225 if err := validateConcurrencyGroupExpression(workflowData.SafeOutputs.ConcurrencyGroup); err != nil {
226 return formatCompilerError(markdownPath, "error", "safe-outputs.concurrency-group validation failed: "+err.Error(), err)
227 }
228 }
229 return nil
230}
231
232func validateWorkflowConcurrency(workflowData *WorkflowData, markdownPath string) error {
233 if workflowData.Concurrency == "" {

Callers 1

Calls 7

formatCompilerErrorFunction · 0.85
PrintfMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected