Skip to content

atmos tf plan --all prompts for component selection, then errors when one is selected #1945

@osterman

Description

@osterman

Bug Description

When running atmos tf plan --all --stack <stack>, atmos displays a list of components and prompts the user to select one. However, if a component is selected, it errors out with:

ℹ Selected component  mycomponent

 Error

 Error: component  mycomponent : the component argument can't be used with the multi-component (bulk operations) flags  --affected ,  --all ,  --query  and  --components

Expected Behavior

When using --all flag, atmos should either:

  1. Not prompt for component selection at all (since --all implies all components), or
  2. If prompting is intentional for filtering, it should handle the selection without erroring

Root Cause (suspected)

The recently added feature for atmos to automatically prompt for missing positional arguments appears to conflict with the --all flag. It seems the prompt logic wasn't tested together with the bulk operation flags.

Steps to Reproduce

  1. Run atmos tf plan --all --stack <stack>
  2. Observe the component selection prompt
  3. Select any component from the list
  4. Observe the error

Environment

  • atmos with auto-prompt for missing positional arguments feature enabled

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