Skip to content

stacker service add rewrites stacker.yml destructively — strips existing config #215

Description

@vsilent

Description

stacker service add redis rewrites the entire stacker.yml file, injecting null structural fields and collapsing existing config_contract details.

Affected Projects

ArchiveBox (likely all projects with config_contract)

Steps to Reproduce

  1. Start with a valid stacker.yml with populated config_contract
  2. Run stacker service add redis
  3. Compare original stacker.yml with the rewritten version

Expected Behavior

Append the requested service while preserving existing config structure and values.

Actual Behavior

  • Injects null fields: organization: null, app.dockerfile: null, etc.
  • Collapses config_contract.services.app to {}
  • Removes explicit ADMIN_PASSWORD contract detail
  • File becomes invalid until stacker config fix is run

Example Diff

# Before
config_contract:
  services:
    app:
      environment:
        - name: ADMIN_PASSWORD
          required: true
          secret: true

# After (broken)
config_contract:
  services:
    app: {}

Environment

  • Stacker CLI version: latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions