Skip to content

Support configurable default parameters via application config - #230

Merged
akashdw merged 1 commit into
mainfrom
ad/configurable-default-params
Jul 21, 2026
Merged

Support configurable default parameters via application config#230
akashdw merged 1 commit into
mainfrom
ad/configurable-default-params

Conversation

@akashdw

@akashdw akashdw commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew build --write-locks to refresh dependencies)
  • Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

Default parameters currently ship only as packaged classpath resources under maestro-engine/src/main/resources/defaultparams/. This PR lets them be overridden or extended from Spring application config, so a deployment can adjust defaults without editing the bundled files or forking them.

A new maestro.default-params config carries a YAML blob per category (workflow, step, dry-run, and per step type). Each blob is merged onto the bundled defaults by parameter name, using the same YAML mapper already used to read the resource files. Behavior is unchanged when no config is present.

maestro:
  default-params:
    workflow: |
      cluster:
        value: staging
        type: STRING

For example, the same default parameter often needs a different value per environment. Setting a cluster default to staging in the staging cluster, and to the production cluster name in production, lets each deployment supply its own value in config rather than by patching the packaged defaultparams/*.yaml. cluster is only an illustration; any default parameter can be overridden or added the same way.

@rdeepak2002 rdeepak2002 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the PR, this is a good step toward making Maestro more configurable

[out of scope of this pr] Along those lines, I’ve also noticed other areas of the codebase that are hard to extend, such as the StepType enum. For example, if someone wanted to introduce a new step type, they’d have to modify that enum directly, as there’s currently no straightforward way to "register" a new step type.

@akashdw
akashdw merged commit abdbdad into main Jul 21, 2026
1 check passed

@praneethy91 praneethy91 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

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.

4 participants