Skip to content

Restructure release-automation-reusable.yml into phase jobs with the logic in Python #476

Open

Description

@hdamker

Problem description

.github/workflows/release-automation-reusable.yml is 3,015 lines: 14 inline actions/github-script blocks (~1,060 lines of JavaScript), 24 inline run: blocks (~750 lines of shell), 15 jobs with 59 job outputs and 224 needs.*.outputs references. None of the inline code has a unit test; actionlint runs with shellcheck disabled. Every command is its own job although no job boundary is forced by permissions, environments or runner profile — the YAML's own Phase comments already describe a pipeline. Adding a dimension such as the maintenance base branch (ReleaseManagement#356) would thread one more string through every job.

Possible evolution

Cut the workflow by phase instead of by command: plan (trigger detection, state derivation, command policy; one JSON plan output) → snapshot (needs the validation toolchain) or act (all other commands, dispatched in Python) → finalize (issue sync, result comment, post-release and common-file sync PRs; runs always()). The inline JavaScript and shell move into release_automation/scripts/ modules with pytest coverage; github_client.py and git_operations.py stay the only modules that touch the network. The tooling checkout uses job.workflow_repository / job.workflow_sha instead of the OIDC ref resolvers, which also removes tooling_ref_override and id-token: write.

Behaviour stays identical at every consumer-visible point: same Release Issue markers, labels, sections, bot comments and templates.

Delivery: development on the long-lived branch release-automation-refactor (see release_automation/docs/branching-model.md §3), with ReleaseTest2 consuming the branch head and a floating tag ra-v1-rc2 for pilot repositories (independent-track repositories first, then repositories needing a maintenance release once ReleaseManagement#356 is implemented on the branch). One merge into main at the end moves v1-rc.

Checklist (one PR or a few per item):

Alternative solution

Extracting each inline block into its own file while keeping the 15 jobs: gives tests for the blocks but leaves routing as untested if: expressions and the 224 output references in place. Rejected in favour of the phase cut.

Additional context

Completes the job consolidation started in #101. The validation framework is touched only by the checkout item (the validation.yml PR on main); everything else is release automation. Pre-merge coverage per slice: pytest in Tooling CI, the RA regression canary on the branch, a manual end-to-end cycle on ReleaseTest2 before each ra-v1-rc2 move.

Activity

  1. added
    enhancementNew feature or request
    release automationRelated to the implementation or introduction of new release automation
    pythonPull requests that update Python dependencies
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgithub-actionsRelated to Github ActionspythonPull requests that update Python dependenciesrelease automationRelated to the implementation or introduction of new release automation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions