Skip to content

4.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Nov 13:48

ModularPipelines 4.0

ModularPipelines 4.0 consolidates module configuration, makes pipeline options immutable, and
standardizes the public API. It is a breaking release: follow the
v3 to v4 migration guide
before upgrading from 3.2.8.

Upgrading

  • Upgrade every ModularPipelines package your pipeline uses to 4.0.0 together, including custom
    integration projects and test helpers.
  • Pipeline projects now target .NET 11, with C# 14 or later for the generated
    context.Tools.<Tool> properties. The applications your pipeline builds can keep their own
    target frameworks.
  • Add .modularpipelines/run-history/ to .gitignore, or disable history with
    RunReport.HistoryRetention = 0. Run reports are now saved by default.

Breaking changes

The six biggest changes:

  1. Register modules on builder, then use await builder.RunAsync() or
    await builder.BuildAsync(). Build() and ExecutePipelineAsync() are gone, and building
    now validates the pipeline.
  2. Replace mutable builder.Options assignments with
    builder.ConfigureOptions(options => options with { ... }).
  3. Override void Configure(ModuleConfigurationBuilder module) and move dependencies, retries,
    and metadata into it.
  4. Import ModularPipelines for core authoring types and use context.Tools.<Tool> for
    integrations.
  5. Use Task<T> for Module<T>, typed result variants, and summary.Results.
  6. Use Async command methods, cancellationToken:, and the regenerated CLI option contracts.
var builder = Pipeline.CreateBuilder(args);
builder.AddModule<BuildModule>().AddModule<TestModule>();
await builder.RunAsync();

Some changes need checking even after the code compiles:

  • A required dependency that is skipped now skips its consumers too.
  • HTTP retries default to idempotent methods only; 3.x retried every method.
  • ExecutionTimeout = null on a command now removes the limit instead of meaning 30 minutes, and
    module timeouts apply to each retry attempt rather than the whole sequence.
  • Command results capture at most 1,048,576 characters per output stream by default.
  • Canceled commands terminate their descendant processes.
  • OpenTelemetry module status values are lowercase snake_case, such as succeeded and
    timed_out.
  • IsBuildServer is now IsCI, and it also honors a truthy CI environment variable.

The migration guide covers the
full list of runtime behavior changes,
a breaking API reference,
and a reference for automated migrations.

New in 4.0

Feedback

Search or open a GitHub issue with the old
and new package versions, a minimal module or command example, and the compiler or runtime error.

Full Changelog: v3.2.8...v4.0.0