Skip to content

Add functional options to Runner for dependency injection#817

Merged
christophetd merged 2 commits intomainfrom
simon.marechal/runner-functional-options
Apr 1, 2026
Merged

Add functional options to Runner for dependency injection#817
christophetd merged 2 commits intomainfrom
simon.marechal/runner-functional-options

Conversation

@Minosity-VR
Copy link
Copy Markdown
Collaborator

@Minosity-VR Minosity-VR commented Mar 31, 2026

What does this PR do?

Enhancement: Allow external consumers to inject custom StateManager, TerraformManager, ProviderFactory, Config, and CorrelationID via variadic RunnerOption parameters.

Motivation

Soon™️ we are going to open source a wrapper for stratus to run it as a service. It requires some modifications in the core:

  • control over the runner internals
  • remote state for terraform
  • context propagation to handle cancellation
  • logger control

Allow external consumers to inject custom StateManager, TerraformManager, ProviderFactory, Config, and CorrelationID via variadic RunnerOption parameters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Minosity-VR Minosity-VR requested review from a team as code owners March 31, 2026 13:27
Copy link
Copy Markdown
Contributor

@christophetd christophetd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, always up for more dependency injection!

@christophetd christophetd merged commit 09d59fa into main Apr 1, 2026
5 checks passed
@christophetd christophetd deleted the simon.marechal/runner-functional-options branch April 1, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants