Skip to content

[feature] Add environment variable support for pipeline.killProcessThreshold #2458

@moltar

Description

@moltar

Is your feature request related to a problem? Please describe.

When running moon inside Docker containers (e.g. for long-running servers on ECS), I need pipeline.killProcessThreshold set to 0 so that moon doesn't force-kill child processes before the orchestrator's own graceful shutdown window expires. However, this value should differ between local development (where the default 2000 ms is fine) and containerized environments (where it should be 0 or match the ECS/orchestrator stop timeout).

Currently there's no way to override this per-environment without maintaining separate workspace configs or adding wrapper scripts that patch the YAML at build time.

Describe the solution you'd like

Add an environment variable (e.g. MOON_KILL_PROCESS_THRESHOLD) that overrides pipeline.killProcessThreshold, similar to how other settings already support env overrides — for example MOON_OUTPUT_STYLE, MOON_RETRY_COUNT, MOON_REMOTE_HOST, etc.

This would allow a Dockerfile or ECS task definition to simply set MOON_KILL_PROCESS_THRESHOLD=0 without touching the workspace config.

Describe alternatives you've considered

  • Maintaining separate .moon/workspace.yml files per environment — adds complexity and divergence risk.
  • Patching the YAML at Docker build time with sed/yq — fragile and easy to forget.

Additional context

The config framework (schematic) already supports #[setting(env = "...")], so the implementation should be straightforward — just adding the attribute to kill_process_threshold in pipeline_config.rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions