Skip to content

Feature: generate distributed matrix workflows from capability requirements; refresh the stale GitHubPipelineFileWriter #3545

Description

@thomhurst

Category: feature — Breaking: no

Single-job workflow generation exists two ways: the MSBuild ModularPipelinesBuildSystem property (docs/how-to/build-server-files.md) and GitHubPipelineFileWriter — which is stale (hardcoded actions/checkout@v3, setup-dotnet@v3, dotnet 8; ModularPipelines.GitHub/PipelineWriters/GitHubPipelineFileWriter.cs:34-49). Meanwhile distributed runs on GitHub Actions require hand-writing the matrix YAML shown in docs/distributed/github-actions.md, even though modules already declare OS needs via [RequiresCapability] and OsCapabilityDetector exists.

Proposal: WriteDistributedWorkflow(new DistributedWorkflowOptions { Backend = DistributedBackend.Redis, ExtraWorkers = 1 }) derives the matrix (master + workers whose runs-on comes from the union of registered modules' capability attributes, INSTANCE_INDEX/TOTAL_INSTANCES env wiring, Redis secret reference) and writes the workflow file; regenerating on registration drift keeps YAML honest. Fold in refreshing the stale action/SDK versions in the existing writer.

Part of #3239 (round 2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: hygiene and nice-to-haves - wheneverenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions