Skip to content

Consider a ci-status composite for the lane-aggregation loop #163

Closed

Description

@kyle-sexton

Observation

The ci-status aggregation shell block is byte-identical between this repo's .github/workflows/ci.yml and melodic-software/.github's:

read -ra results <<< "$RESULTS"
for r in "${results[@]}"; do
  case "$r" in
    success|skipped) ;;
    *) echo "A lane did not pass (result: $r)."; exit 1 ;;
  esac
done

Only the needs/RESULTS lists differ (27 lanes here, 8 there). Candidate: a .github/actions/ci-status composite taking the results string as an input.

This is filed to decide, not to presume

The case is genuinely weak and may well be rejected:

  • The duplication is only partly removable. GitHub offers no "all other jobs" selector, so the needs list stays duplicated in every caller regardless. The composite removes ~8 lines per repo, not the actual maintenance burden.
  • It adds a network-resolved SHA-pinned dependency to the one job that gates every merge. Failure of the aggregator is maximally disruptive. An obvious, self-contained, zero-dependency 8-line shell block is a defensible thing to inline precisely here.

The aggregator pattern itself is not in question and should be kept — a single stable ci-status context decouples the org ci-gate ruleset from lane churn, and avoids the skipped-workflow-leaves-checks-Pending failure mode that per-lane required checks would introduce.

Recorded so the question gets a documented answer rather than being rediscovered.

Notes

Found during a reinvented-wheel audit of melodic-software/.github (see melodic-software/.github#29). No code change made there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions