Skip to content

sugar compose accepts --group instead of --profile` silently, causing unintended environment takedowns #206

Description

@esloch

Description

Using --group dev instead of --profile dev silently affects the staging environment instead of dev, causing unintended service shutdowns. No warning/error is shown despite parameter mismatch.

Expected Behavior

  • Reject --group parameter outright (since documentation specifies --profile)
  • OR show prominent WARNING when unrecognized parameter is used
  • OR fallback to environment detection with explicit confirmation

Actual Behavior

$ sugar compose down --group dev --options "--remove-orphans"
# Silently targets STAGING (infodengue-staging-*) from the ENV (.env) variables instead of dev
Container infodengue-staging-celery-beat-1  Stopping  # WRONG env!

Steps to Reproduce

# User mistakenly types --group instead of --profile
sugar compose down --group dev --options "--remove-orphans"

Environment Details

Name: containers-sugar
Version: 1.19.2
Author: Ivan Ogasawara

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions