diff --git a/pkg/workflow/compiler_activation_jobs.go b/pkg/workflow/compiler_activation_jobs.go index 6d6d7a3b14e..fa68aaa9e43 100644 --- a/pkg/workflow/compiler_activation_jobs.go +++ b/pkg/workflow/compiler_activation_jobs.go @@ -434,8 +434,9 @@ func (c *Compiler) buildActivationJob(data *WorkflowData, preActivationJobCreate if data.SafeOutputs != nil && data.SafeOutputs.Messages != nil { messagesJSON, err := serializeMessagesConfig(data.SafeOutputs.Messages) if err != nil { - compilerActivationJobsLog.Printf("Warning: failed to serialize messages config for activation job: %v", err) - } else if messagesJSON != "" { + return nil, fmt.Errorf("failed to serialize messages config for activation job: %w", err) + } + if messagesJSON != "" { steps = append(steps, fmt.Sprintf(" GH_AW_SAFE_OUTPUT_MESSAGES: %q\n", messagesJSON)) } } diff --git a/pkg/workflow/compiler_yaml_main_job.go b/pkg/workflow/compiler_yaml_main_job.go index e21cdeb1d6a..961e1bb03df 100644 --- a/pkg/workflow/compiler_yaml_main_job.go +++ b/pkg/workflow/compiler_yaml_main_job.go @@ -76,10 +76,9 @@ func (c *Compiler) generateMainJobSteps(yaml *strings.Builder, data *WorkflowDat // Convert to JSON array for the script repoImportsJSON, err := json.Marshal(data.RepositoryImports) if err != nil { - compilerYamlLog.Printf("Warning: failed to marshal repository imports: %v", err) - } else { - fmt.Fprintf(yaml, " GH_AW_REPOSITORY_IMPORTS: '%s'\n", string(repoImportsJSON)) + return fmt.Errorf("failed to marshal repository imports for merge step: %w", err) } + fmt.Fprintf(yaml, " GH_AW_REPOSITORY_IMPORTS: '%s'\n", string(repoImportsJSON)) } // Set agent import spec if present (legacy path)