Skip to content

matrix + retries: retry job lacks strategy block #65

Description

@joshua-temple

Problem

writeRetryJob (internal/generate/generator.go) emits a retry job for a callback whenever retries > 0, but it never emits a strategy: / matrix: block. For a build callback that declares both matrix: and retries:, the retry job's with: (reusable path) and inline env: still reference ${{ matrix.<dimension> }}, even though the retry job has no matrix context. GitHub Actions resolves matrix.* to empty in a matrix-less job, so the retry job passes empty values for every matrix dimension.

This is pre-existing: it affects the reusable-workflow retry path too (matrix shipped before inline run), and the inline-run change inherits the same gap via writeInlineRunBody/inlineEnvInputs.

Expected

A retry job for a matrix callback should either fan out over the same matrix (emit the strategy: block and retry per failed matrix leg) or be explicitly disallowed/documented. The current silent empty-value behavior is wrong.

Pointer

internal/generate/generator.gowriteRetryJob: emits needs/if/timeout-minutes then the body, with no writeStrategyBlock(...) call even when info.Matrix != nil.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions