Skip to content

[plan] Fix buildCustomJobs() to extract silently-dropped job fields #19398

@github-actions

Description

@github-actions

Objective

Fix buildCustomJobs() in pkg/workflow/compiler_jobs.go to extract the 7 schema-defined job fields that are currently silently dropped at compile time.

Context

From discussion #19383: The buildCustomJobs() function only extracts 8 of the 17 schema-defined job properties. Fields like name, timeout-minutes, env, container, services, and concurrency are accepted by the schema at parse time but silently discarded at compile time — users get no warning.

The Job struct in pkg/workflow/jobs.go already has fields for most of these, and the rendering code in jobs.go already handles them. They just need to be populated during extraction.

Approach

In pkg/workflow/compiler_jobs.go, inside buildCustomJobs() (around line 424), add extraction for each missing field:

  1. name (DisplayName): Extract string from configMap["name"]job.DisplayName
  2. timeout-minutes: Extract int from configMap["timeout-minutes"]job.TimeoutMinutes
  3. concurrency: Extract string from configMap["concurrency"]job.Concurrency
  4. env: Extract map[string]string from configMap["env"]job.Env
  5. container: Use YAML marshal on configMap["container"] to produce a YAML string → job.Container
  6. services: Use YAML marshal on configMap["services"] to produce a YAML string → job.Services
  7. continue-on-error: Add new ContinueOnError bool field to Job struct, extract bool from configMap["continue-on-error"], add rendering in jobs.go

Files to Modify

  • pkg/workflow/compiler_jobs.go — add field extraction in buildCustomJobs()
  • pkg/workflow/jobs.go — add ContinueOnError field to Job struct and rendering logic

Acceptance Criteria

  • All 7 missing fields are extracted and rendered in compiled YAML output
  • container and services use YAML marshaling consistent with top-level extraction pattern
  • continue-on-error: true renders correctly in compiled job YAML
  • Unit tests added/updated to verify each field is preserved through compilation
  • Run make agent-finish before committing

Generated by Plan Command for issue #discussion #19383 ·

  • expires on Mar 5, 2026, 10:49 AM UTC

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions